fbpx
Give us a call
Nexa API Documentation
Nexa API Documentation
Authorization
Type: string
Description: Your API key for authentication.
Request Body
phone_number (Required)
Type: string
Description: This is the phone number of the person or company you want to call.
  • International numbers: must include the country code and may not include additional formatting (like parentheses and dashes). E.g. ‘+447700900077’.
  • U.S. numbers: may include formatting, but we recommend stripping all additional characters.
task (Required)
Type: string
Description: Define how the AI should behave. Provide the AI context about the interaction, and give it instructions.
voice_id (Default: 0)
Type: number
Description:
  • When reduce latency is set to false, we offer the following voices:
    • 0: American female
    • 1: American male
    • 2: British female
    • 3: Indian male
  • When reduce latency is set to true, we offer only one default voice: 0: American female
*These will be updated in the future, and will come from Users Database*
request_data
Type: object
Description: A key value store that the AI can retrieve information from during the phone call. When you want your AI to “know” a specific fact – like the caller’s name, etc. add that information to the parameters field. *Not currently used, but may add in the future*
wait_for_greeting (Default: false)
Type: boolean
Description: Makes the AI wait for a verbal acknowledgement from the person being called before speaking.
  • When false: The AI starts speaking first almost immediately after the outbound call is answered.
  • When true: The AI will wait for the answerer to speak.
Demo API Call
# Headers headers = { ‘authorization’: ‘YOUR-API-KEY-HERE’ } # Data data = { ‘phone_number’: ‘7778889999’, ‘task’: “You are calling Fantastic Airlines on behalf of John Doe. Find the location of out where John’s Bags are located.”, ‘voice_id’: 0, ‘request_data’: { ‘calling’: ‘Fantastic Airlines’, ‘bag_claim’: ‘69683’, ‘airline_code’: ‘UA123’ }, ‘wait_for_greeting’: True } # API request response = requests.post(‘https://api.call-nexa.com/call’, json=data, headers=headers)