The /outbound-call-uat
Endpoint
Authentication
A valid API key is required in the request headers. You can use either the internal or external key, depending on the nature of your application.
External Key:
x-api-key (KEY GENERATION REQUIRED)
If no valid key is provided, the request will be rejected with a 401 Unauthorized
status.
This endpoint initiates an outbound call for a specific AI assistant, whose ID is provided in the request body. This is a general-purpose endpoint often used for testing or on-demand calls where the assistant can change.
URL:
{base_url}/api/outbound-call
Method:
POST
Body: A JSON object that must include a
client
object with contact details and theassistantId
to make the call.
Example Request:
Responses:
200 OK: A successful response indicating the call was initiated. The
data
field contains details from the external VoIP handler.400 Bad Request: Occurs if any required fields in the request body are missing.
Assistant Prompt
The assistant's prompt can include these variables:
{{customer_name}}
{{customer_info}}
{{company_name}}
{{company_details}}
These are necessary for supabase comany_name and company_details if the user wants to include them:
Supabase project URL
service_role key
Database table names relevant to company_details
Example Request:
Prompt
They can also be added in the assistantFirstMessage:
