voice

Place a voice call

Places an outbound voice call to a single recipient. Accepts a single content source - either a pre-created voice template (template_key or template_alias), which may define a multi-step IVR flow with keypad input and call transfer, or an ad-hoc text-to-speech message (message_content with optional language and voice_gender). Exactly one content source is required.

from must be an approved voice number of the agent and to is the recipient; both must include the country code. If the template defines merge tags, all of them must be supplied in merge_info - a request with missing tags is rejected with the missing tag names listed. Phone numbers should be provided as merge values (for example the agent number of a call-transfer step) and also include country code.

post/voice

Request

  • Base URL
    https://cpaas.zoho.com/v1.1
  • Auth
    API key in header Authorization

Request body

voice_gender'male' | 'female'

Voice used for text-to-speech.

message_contentstring

Text-to-speech message spoken to the recipient. Letters, digits, spaces and common punctuation are allowed. Use instead of a template.

template_keystring uuid

Key of a pre-created voice template. Provide this or template_alias (or message_content instead).

client_referencestring

Client-supplied reference identifier, echoed in call logs.

agent_keystring

Key of the sending agent. Optional - defaults to the agent bound to the API token.

merge_infoobject

Key-value map that resolves the template's {{merge_tags}}. All tags defined by the template are mandatory; if any are missing, the request is rejected and the missing tag names are listed in the error. Phone numbers passed as merge values (for example the agent number of a call-transfer step) must include the country code.

fromstring required

Caller id - an approved voice number of the agent, including the country code.

languagestring

Language code used for text-to-speech (e.g. en, hi, fr).

tostring required

Recipient phone number, including the country code.

template_aliasstring

Alias of a pre-created voice template. Provide this or template_key (or message_content instead).

Example request

{
  "message_content": "Hello. Your appointment is confirmed for tomorrow at 10 A M. Goodbye.",
  "template_key": "794dc9c1-b268-11f1-bed6-b6d94062a427",
  "client_reference": "order-confirm-1001",
  "merge_info": {
    "customer_name": "Paula",
    "order_id": "ORD-1001"
  },
  "from": "+14155550142",
  "to": "+919876543210"
}

Response

Voice call accepted and initiated.

statusstring

Example response

{
  "data": {
    "code": "MSG_102",
    "message_id": "7ed0c6c0-b670-11f1-8810-3ed350183096",
    "message": "Message sent successfully",
    "request_id": "2d6f.14350939.v1.7ed0c6c0-b670-11f1-8810-3ed350183096.1a0c8a9dd2c"
  },
  "status": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.