Decide an SMS draft
Changed onApproves or rejects an SMS draft card that the Insight Assistant produced with the draft_message tool. On approve the platform sends the drafted SMS (to the stored recipient and text, from the account's default sender) without involving the LLM, and records the result in the aicall's message history. On reject nothing is sent and the rejection is recorded. The draft id is the id of the tool message that carries the sms_draft block. A draft can be decided once. A repeated or opposite decision is refused with DRAFT_ALREADY_DECIDED. A draft that is not decided within 10 minutes of its creation (the default; operators can change it) is refused with DRAFT_EXPIRED. Both refusals answer with HTTP 409. An unknown draft, or a draft of another aicall or customer, is refused with DRAFT_NOT_FOUND. The aicall must belong to the service agent's own customer. A send failure is returned as a normal response whose message content has result set to failed.
Request
- Base URLhttps://api.voipbin.net/v1.0
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"aicall_id": "5e4a0680-804e-11ec-8477-2fea5968d85b",
"draft_id": "7a1c3f80-804e-11ec-8477-2fea5968d85b",
"decision": "approve"
}Response
The tool message that records the decision result.
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"customer_id": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
"aicall_id": "550e8400-e29b-41d4-a716-446655440000",
"activeflow_id": "550e8400-e29b-41d4-a716-446655440000",
"active_ai_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"role": "assistant",
"content": "Hello, how can I help you today?",
"direction": "incoming",
"origin": "proactive",
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"San Francisco\"}"
}
}
],
"tool_call_id": "call_abc123",
"tm_create": "2026-01-15T09:30:00.000000Z"
}Changes
- info
endpoint added
- info