Step 1: Get Your API Token
Get your API token by going to the top right corner and clicking on your profile settings, then navigate to account settings.
Click on Generate Token (if token doesn't exists).
Copy the API Token
Step 2: Make a POST Request
To trigger a call, send a POST request to:
https://api.altahq.com/v1/assistant/calls
Include the following headers (for authentication):
Authorization: Bearer <YOUR_API_TOKEN>
Include the following fields in the body:
{
"assistantId": <ASSISTANT_ID>
"name": "John Doe",
"phoneNumber": "+14155552671",
"email": "[email protected]",
"timezone": "America/New_York"
}Optional fields:
add metadata - you can include any key-value pairs under the data property to provide additional context for the call. Example:
"data": {
"ticketId": "T12345",
"priority": "high"
}call transfer - if your assistant has call transfer configuration, you can include the following in the body:
"callTransfer": {
"phoneNumber": "+14085551234",
"description": "Transfer to senior agent",
"message": "Please take over this call",
"messageToReceiver": "Incoming call from VIP customer"
}
Explanation of fields:
Field | Required | Description |
assistandId | Yes | ID of the assistant handling the call. |
name | Yes | Name of the call receiver. |
phoneNumber | Yes | Phone number of the receiver (must be verified). |
No | Optional email of the receiver. | |
timezone | No | Optional timezone of the receiver. |