API EndpointsApi Reference/initiate Call

Initiate a Call

Triggers a single outbound AI voice call to a specified phone number using a published assistant.

This endpoint is non-blocking — it returns immediately once the call is queued. Use the returned call_id with Get Call Detail to fetch results once the call completes.

Calling window: Calls are only placed between 9:00 AM and 9:00 PM IST to prevent your number from being flagged as spam. Calls triggered outside this window are queued and placed at 9:00 AM the following day.

curl -X POST "https://api.twentytwo.in/api/agent/trigger-outbound-call" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic YOUR_CREDENTIALS" \
  -d '{
  "assistant_id": "69de483c68b23495c853b43a",
  "callee_phone": "9999999999",
  "caller_phone": "9999999999",
  "input_parameters": {
    "customerName": "Rohit"
  }
}'
{
  "success": true,
  "statusCode": 201,
  "data": {
    "call_id": "6a329e7c5a54529ba7f0b4e6",
    "message": "Call queued successfully."
  }
}
POST
/agent/trigger-outbound-call
POST
Base URLstring

Target server for requests. Edit to use your own host.

Basic Authentication
Usernamestring
Required

Username for basic authentication

Passwordpassword
Required

Password for basic authentication

Base64-encode your credentials in the format api_key:api_key_secret and pass the result in the Authorization header: ``http Authorization: Basic BASE64(api_key:api_key_secret) `` Generate your API Key and Secret from **Profile → Integrations → Build with Twenty2 API → Create new**.
Content-Typestring
Required

The media type of the request body

Options: application/json
assistant_idstring
Required

The ID of the published assistant to use for the call. To find it, go to My Assistants, click the three-dot menu on the assistant, and select Copy Assistant ID.

callee_phonestring
Required

The recipient's 10-digit phone number. Do not include the country code prefix (+91 or 91).

caller_phonestring
Required

The phone number to call from. Must be an active number in your workspace under Manage Numbers.

input_parametersobject

Key-value pairs passed into the assistant's script at runtime. Keys must match the Input Variables defined in the assistant's configuration. Required only if the assistant has mandatory input variables.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Basic authentication credentials. Base64-encode your credentials in the format api_key:api_key_secret and pass the result in the Authorization header:

Authorization: Basic BASE64(api_key:api_key_secret)

Generate your API Key and Secret from Profile → Integrations → Build with Twenty2 API → Create new.

Body

application/json
assistant_idstring
Required

The ID of the published assistant to use for the call. To find it, go to My Assistants, click the three-dot menu on the assistant, and select Copy Assistant ID.

Example:
69de483c68b23495c853b43a
callee_phonestring
Required

The recipient's 10-digit phone number. Do not include the country code prefix (+91 or 91).

Example:
9999999999
caller_phonestring
Required

The phone number to call from. Must be an active number in your workspace under Manage Numbers.

Example:
9999999999
input_parametersobject

Key-value pairs passed into the assistant's script at runtime. Keys must match the Input Variables defined in the assistant's configuration. Required only if the assistant has mandatory input variables.

Example:
{"customerName":"Rohit"}

Responses