HappHapp Docs
Assistants

Initiate outgoing call

POST
/api/assistants/{id}/originate

Initiates an outgoing call to a specified phone number using the assistant's configured phone number. The call is processed asynchronously: a successful response means the request was accepted, not that the call has started. The call enters the telephony provider's dial queue and starts as soon as a line is free — usually within seconds, but under load it may wait up to ~5 minutes; if the wait expires, the call ends with the not_dialed status without dialing. The call outcome, transcript and recording appear in the call history after the call finishes, and are also delivered to the assistant's configured post-call webhooks.

Authorization

access-token
X-Access-Token<token>

Enter your Access Token (format: happ_...)

In: header

Path Parameters

id*string

Assistant unique identifier

Request Body

application/json

Target phone number, optional caller assistant override, and optional dynamicVariables forwarded to the voice assistant as dynamic_variables (key/value map for personalizing the conversation: customer name, order id, etc.). callerAssistantId must belong to the same company as the route assistant; when omitted, the route assistant is used as the caller.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/assistants/123e4567-e89b-12d3-a456-426614174000/originate" \  -H "Content-Type: application/json" \  -d '{    "phoneNumber": "+380501234567",    "callerAssistantId": "123e4567-e89b-12d3-a456-426614174000",    "dynamicVariables": {      "customer_name": "John Doe",      "order_id": "ORD-12345",      "preferred_language": "en"    }  }'
{  "success": true,  "workflowId": "originate-call-123e4567-e89b-12d3-a456-426614174000-1717600000000"}
Empty
Empty