Draft Email
Draft a new email to the lead for review (RO-300). Nothing is sent: the draft joins the reply-draft review queue (`kind = compose`, `pending`) for a person to approve and send. The lead's address is checked first like a one-off send (suppressions, `can_contact` for email/marketing, contact pressure): a permanent denial is a 409 and nothing is stored; a contact-pressure hold stores the draft with `send_not_before`. Sending re-checks everything.
API key access
replies:write scope with an API key (ro_pat_...). A signed-in session uses the caller's role./api/v1/leads/{lead_id}/draft-emailAccess token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Path Parameters
uuidHeader Parameters
Id of the workspace to act on (must be a member).
1 <= length <= 998Plain text.
1 <= length <= 20000The connected mailbox to send from (default: the workspace's oldest connected one).
uuidResponse Body
curl -X POST "http://localhost:8000/api/v1/leads/497f6eca-6276-4993-bfeb-53cbbbba6f08/draft-email" \ -H "X-Workspace-Id: string" \ -H "Content-Type: application/json" \ -d '{ "subject": "string", "body": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
"kind": "string",
"status": "string",
"to": "string",
"subject": "string",
"body": "string",
"mailbox_id": "4d23d1af-2eef-4598-a5e0-1f19ae0b0c14",
"created_at": "2019-08-24T14:15:22Z",
"send_not_before": "2019-08-24T14:15:22Z",
"warnings": [
"string"
],
"review": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}