Skip to main content

How to Trigger a Call via API

This guide will walk you through every step of triggering a call programmatically using Alta’s API - from setting up your request to confirming the call.

Sharon Drelevich avatar
Written by Sharon Drelevich
Updated this week

Step 1: Get Your API Token

  1. Get your API token by going to the top right corner and clicking on your profile settings, then navigate to account settings.

  2. Click on Generate Token (if token doesn't exists).

  3. Copy the API Token

Step 2: Make a POST Request

  1. 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>

  2. Include the following fields in the body:

    {
    "assistantId": <ASSISTANT_ID>
    "name": "John Doe",
    "phoneNumber": "+14155552671",
    "email": "[email protected]",
    "timezone": "America/New_York"
    }

  3. Optional fields:

    1. 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"
      }

    2. 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).

email

No

Optional email of the receiver.

timezone

No

Optional timezone of the receiver.

Did this answer your question?