Approve Reply Draft
Approve a pending draft, optionally with a final edit. Nothing is sent yet.
API key access
/api/v1/reply-drafts/{draft_id}/approveAccess 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).
Response Body
curl -X POST "http://localhost:8000/api/v1/reply-drafts/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve" \ -H "X-Workspace-Id: string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
"classification_id": "47ac1861-59ea-4c4a-93ac-eecdeb4d654d",
"mailbox_id": "4d23d1af-2eef-4598-a5e0-1f19ae0b0c14",
"kind": "reply",
"call_id": "0d0a16ab-a508-4d58-bf24-5dc3cb248f3e",
"category": "interested",
"status": "pending",
"subject": "string",
"body": "string",
"edited_body": "string",
"final_body": "string",
"sources": [
{
"id": "string",
"chunk_id": "string",
"document_id": "string",
"title": "string",
"source_url": "string",
"score": 0,
"used": false
}
],
"prompt_id": "string",
"model": "string",
"reviewed_by_id": "855af0f3-1bf5-496a-8d36-7729a807a554",
"reviewed_at": "2019-08-24T14:15:22Z",
"reject_reason": "string",
"sent_at": "2019-08-24T14:15:22Z",
"sent_message_id": "10e758d6-1ff1-42da-b026-45795a3d5469",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"lead": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "string",
"company_name": "string"
},
"inbound": {
"classification_id": "47ac1861-59ea-4c4a-93ac-eecdeb4d654d",
"category": "interested",
"summary": "string",
"received_at": "2019-08-24T14:15:22Z",
"subject": "string",
"snippet": "string"
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Test Provider
One tiny call to the provider with a strict timeout (`PROVIDERS_TEST_TIMEOUT_SECONDS`, 10 s): a 1-token completion, a one-word embedding, a 1-result search, a model or voice list, a LiveKit room list, or (a `streaming_ws` speech-to-text server) a WebSocket handshake with the protocol's start and stop messages, expecting a JSON reply or a clean close (RO-256). Without a body the saved override is tested (and its last result recorded); with a body those values are tested (a missing `api_key` uses the stored one for the same provider). Answers 200 with `ok: false` when the provider fails.
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.