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.

Optionally, configure automatic retries with retry_count and retry_interval_minutes. If the call is not connected (for example, the recipient is busy or does not answer), Twenty2 will re-attempt the call up to retry_count times, waiting retry_interval_minutes between each attempt.

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. Retry attempts that fall outside the calling window are likewise deferred to the next 9:00 AM.

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"
  },
  "retry_count": 1,
  "retry_interval_minutes": 15
}'
{
  "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.

retry_countinteger

Number of times to retry the call if it is not connected (e.g. the recipient is busy or does not answer). Set to 0 or omit to disable retries.

retry_interval_minutesinteger

Time in minutes to wait between retry attempts. Only applies when retry_count is greater than 0.

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"}
retry_countinteger

Number of times to retry the call if it is not connected (e.g. the recipient is busy or does not answer). Set to 0 or omit to disable retries.

Example:
1
retry_interval_minutesinteger

Time in minutes to wait between retry attempts. Only applies when retry_count is greater than 0.

Example:
15

Responses