Replies

Approve Reply Draft

Approve a pending draft, optionally with a final edit. Nothing is sent yet.

API key access

Not available to API keys or connected apps: only a signed-in person can call this route.
POST/api/v1/reply-drafts/{draft_id}/approve
AuthorizationBearer <token>

Access 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

draft_idDraft Id
Formatuuid

Header Parameters

X-Workspace-Id?X-Workspace-Id

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": {}
    }
  ]
}