# POST /outreach-agents

**Resource:** [OUTREACH_AGENTS](./outreach-agents.md)  
**MCP tool:** `create_outreach_agent`  
**Scopes:** `outreach-agents:write`  
**Write operation:** yes

Create an outreach agent: it texts a saved list of old leads one by one, picking up where things were left off with each, and hands every reply to the SMS auto-responder. It starts as a draft. Next: preview_outreach_audience to see who it would text, build_outreach_list to add them (limit 20 for a pilot), draft_outreach_message to read a few sample messages, then update_outreach_agent status "active". To test offers, create an A/B test with subject_type "outreach_agent" and this agent's id (create_ab_test); each lead then gets one version's offer or wording.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `name` | body | string | yes | A name a person will recognise, e.g. "Reawaken old leads". |
| `audience` | body | object | yes | Who the agent texts. { "stage_ids": [...], "pipeline_ids": [...], "exclude_pipeline_ids": [...], "exclude_stage_ids": [...], "older_than_days": 60 }. Leads whose opportunity sits in any of stage_ids, or anywhere in pipeline_ids, are taken. Anyone with an opportunity in exclude_pipeline_ids or exclude_stage_ids (e.g. an existing clients pipeline, a do-not-call stage) is left out. People who opted out of texts, have no mobile number, already bought (a won opportunity) or were archived are always left out. Ids come from list_pipelines. |
| `goal` | body | string | no | What a good conversation ends in, in plain words, e.g. "Book a 15 minute call to see what we built". |
| `instructions` | body | string | no | How to write: tone, who it is from and how to sign off, what to mention or avoid. E.g. "From Simon at FinalPiece. Casual, Australian, no jargon." |
| `offer` | body | string | no | The offer in words, e.g. "$129 a seat, setup free". Leave empty when the offer is being A/B tested (the test's versions give it). |
| `phone_number_id` | body | string | no | The workspace SMS number to text from (list_phone_numbers). Default: the workspace's usual SMS line. Replies to this number are answered by its SMS auto-responder. |
| `daily_limit` | body | number | no | Most messages a day (first messages and follow-ups together). Default 30. |
| `max_attempts` | body | number | no | Most messages per lead without a reply, including the first. Default 3. |
| `days_between_attempts` | body | number | no | Days to wait for a reply before the next message. Default 3. |
| `send_window` | body | object | no | Sending hours in each LEAD's own time zone: { "start_hour": 9, "end_hour": 17, "days": [1,2,3,4,5] } (days 0 = Sunday). Default weekdays 9am to 5pm. |
| `approve_first` | body | number | no | The first this many messages wait in Approvals for a person's OK; after that they send by themselves. Default 20. 0 sends from the start. |
| `report_email` | body | string | no | Where the weekly report goes (replies, bookings, sales, and which A/B version is winning). Empty for no email. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/outreach-agents"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","audience":"...","goal":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`