Exotel

App · 17 actions

Connect calls and send SMS through Exotel, read call and SMS records and the account balance, look up Indian numbers, list ExoPhones, manage contact center users and pause or resume campaigns.

Actions

ActionWhat it does
Connect two numbersCall a number (such as an agent's) and, once they answer, connect them to a customer, showing your ExoPhone as the caller ID.
Create userAdd a user to the contact center, with the phone they take calls on.
Delete userRemove a user from the contact center.
Get balanceGet the account's wallet balance, currency and pricing plan.
Get callGet a call's status, numbers, times, duration, price and recording, with each leg's details.
Get campaignGet a campaign with its settings and current statistics.
Get ExoPhoneGet an ExoPhone's number, capabilities and the flow it runs.
Get SMSGet a text message's delivery status and price.
Get userGet a contact center user and their devices.
List callsList calls, newest first, filtered by date, status, direction or number.
List campaignsList outbound call campaigns, by name or status.
List ExoPhonesList the account's ExoPhones (virtual numbers) and what each can do.
List usersList the contact center's users and, if asked, their devices.
Look up Indian numberGet an Indian phone number's operator, telecom circle, type (mobile or landline) and Do Not Disturb status.
Pause, resume or end campaignPause or resume a campaign, complete a paused one, or archive a completed one.
Send SMSSend a text message from an ExoPhone or approved sender ID.
Update userChange a user's name, or add their email address if they have none.

Connect two numbers

Call a number (such as an agent's) and, once they answer, connect them to a customer, showing your ExoPhone as the caller ID.

Inputs

Call firstfrom_numbertextRequired
The number called first, such as your agent's, with the country code.
Then connect tototextRequired
The customer's number, with the country code.
Callercaller_idtextRequired
The ExoPhone to call from.
Recordrecordtrue/false
Record the conversation.
Time limittime_limitnumber
The longest the call may last, in seconds (up to 14400).From 1 to 14400.
Ring fortime_outnumber
How long each number may ring, in seconds.At least 1.
Referencecustom_fieldtext
Your own reference for the call (up to 128 characters).
Status callbackstatus_callbacktext
An address Exotel posts the call's outcome to.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "AccountSid": "example",
    "AnsweredBy": "example",
    "DateCreated": "example",
    "DateUpdated": "example",
    "Details": {
      "ConversationDuration": 1,
      "Leg1Status": "example",
      "Leg2Status": "example",
      "Legs": [
        {}
      ]
    },
    "Direction": "example",
    "Duration": "example",
    "EndTime": "example",
    "From": "example",
    "ParentCallSid": "example",
    "PhoneNumberSid": "example",
    "Price": "example",
    "RecordingUrl": "example",
    "Sid": "example",
    "StartTime": "example",
    "Status": "example",
    "To": "example"
  }
}

Create user

Add a user to the contact center, with the phone they take calls on.

Inputs

First namefirst_nametextRequired
Their first name, 3 to 20 characters.
Last namelast_nametextRequired
Their last name, 3 to 20 characters.
Emailemailtext
Their email address.
Phonedevice_contact_uritext
The phone number they take calls on, with the country code.
Phone namedevice_nametext
A name for that phone.
Roleroletext
What they can do. Defaults to user.One of: user, supervisor, admin.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "date_created": "example",
    "date_updated": "example",
    "devices": [
      {
        "available": true,
        "contact_uri": "example",
        "id": 1,
        "name": "example",
        "status": "example",
        "type": "example",
        "verified": true
      }
    ],
    "email": "example",
    "email_verified": true,
    "first_name": "example",
    "id": "example",
    "last_login": "example",
    "last_name": "example",
    "role": "example"
  }
}

Delete user

Remove a user from the contact center.

Inputs

Userexotel_user_idtextRequired
The user's ID, from List users.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "deleted": true,
    "user_id": "example"
  }
}

Get balance

Get the account's wallet balance, currency and pricing plan.

Inputs

None.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "AccountSid": "example",
    "BalanceData": {
      "Balance": "example",
      "Currency": "example",
      "DateUpdated": "example",
      "PricingPlan": "example"
    }
  }
}

Get call

Get a call's status, numbers, times, duration, price and recording, with each leg's details.

Inputs

Call SIDcall_sidtextRequired
The call's SID.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "AccountSid": "example",
    "AnsweredBy": "example",
    "DateCreated": "example",
    "DateUpdated": "example",
    "Details": {
      "ConversationDuration": 1,
      "Leg1Status": "example",
      "Leg2Status": "example",
      "Legs": [
        {}
      ]
    },
    "Direction": "example",
    "Duration": "example",
    "EndTime": "example",
    "From": "example",
    "ParentCallSid": "example",
    "PhoneNumberSid": "example",
    "Price": "example",
    "RecordingUrl": "example",
    "Sid": "example",
    "StartTime": "example",
    "Status": "example",
    "To": "example"
  }
}

Get campaign

Get a campaign with its settings and current statistics.

Inputs

Campaigncampaign_idtextRequired
The campaign's ID, from List campaigns.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "campaign": {}
  }
}

Get ExoPhone

Get an ExoPhone's number, capabilities and the flow it runs.

Inputs

ExoPhoneexophone_sidtextRequired
The ExoPhone.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "capabilities": {
      "sms": true,
      "voice": true
    },
    "country": "example",
    "friendly_name": "example",
    "phone_number": "example",
    "region": "example",
    "sid": "example",
    "sms_url": "example",
    "voice_url": "example"
  }
}

Get SMS

Get a text message's delivery status and price.

Inputs

SMS SIDsms_sidtextRequired
The message's SID.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "AccountSid": "example",
    "Body": "example",
    "DateCreated": "example",
    "DateSent": "example",
    "DateUpdated": "example",
    "DetailedStatus": "example",
    "DetailedStatusCode": "example",
    "Direction": "example",
    "From": "example",
    "Price": "example",
    "Sid": "example",
    "SmsUnits": 1,
    "Status": "example",
    "To": "example",
    "Uri": "example"
  }
}

Get user

Get a contact center user and their devices.

Inputs

Userexotel_user_idtextRequired
The user's ID, from List users.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "date_created": "example",
    "date_updated": "example",
    "devices": [
      {
        "available": true,
        "contact_uri": "example",
        "id": 1,
        "name": "example",
        "status": "example",
        "type": "example",
        "verified": true
      }
    ],
    "email": "example",
    "email_verified": true,
    "first_name": "example",
    "id": "example",
    "last_login": "example",
    "last_name": "example",
    "role": "example"
  }
}

List calls

List calls, newest first, filtered by date, status, direction or number. Exotel keeps six months, up to a month per request.

Inputs

Fromcreated_fromdate and time
Only calls made on or after this time.
Tocreated_todate and time
Only calls made on or before this time.
Statusstatustext
Only calls that ended this way.One of: completed, failed, busy, no-answer (Not answered).
Directiondirectiontext
Only incoming or outgoing calls.One of: inbound, outbound-dial (Outbound (dialled)), outbound-api (Outbound (API)).
To numbertotext
Only calls to these numbers (up to 5, separated by commas).
From numberfrom_numbertext
Only calls from these numbers (up to 5, separated by commas).
ExoPhoneexophonetext
Only calls on these ExoPhones (up to 5, separated by commas).
Page sizepage_sizenumber
How many per page, up to 100. Exotel's default is 50.From 1 to 100.
Ordersorttext
Newest or oldest first. Newest unless chosen.One of: DateCreated:desc (Newest first), DateCreated:asc (Oldest first).
Next pageaftertext
The next_page from an earlier page.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "Calls": [
      {
        "AccountSid": "example",
        "AnsweredBy": "example",
        "DateCreated": "example",
        "DateUpdated": "example",
        "Details": {
          "ConversationDuration": 1,
          "Leg1Status": "example",
          "Leg2Status": "example",
          "Legs": [
            {}
          ]
        },
        "Direction": "example",
        "Duration": "example",
        "EndTime": "example",
        "From": "example",
        "ParentCallSid": "example",
        "PhoneNumberSid": "example",
        "Price": "example",
        "RecordingUrl": "example",
        "Sid": "example",
        "StartTime": "example",
        "Status": "example",
        "To": "example"
      }
    ],
    "Metadata": {
      "FirstPageUri": "example",
      "NextPageUri": "example",
      "PageSize": 1,
      "PrevPageUri": "example",
      "Total": 1
    },
    "next_page": "example"
  }
}

List campaigns

List outbound call campaigns, by name or status.

Inputs

Namenametext
Only campaigns with this name.
Statusesstatustext
Only campaigns in these statuses, separated by commas, such as InProgress,Paused.
Skipoffsetnumber
How many to skip.At least 0.
How manylimitnumber
How many to return, up to 500. Exotel's default is 20.From 1 to 500.
Ordersort_bytext
How to sort, such as date_created:desc.One of: date_created:asc (Date created:asc), date_created:desc (Date created:desc), name:asc, name:desc.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "items": [
      {}
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}

List ExoPhones

List the account's ExoPhones (virtual numbers) and what each can do.

Inputs

None.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "incoming_phone_numbers": [
      {
        "capabilities": {
          "sms": true,
          "voice": true
        },
        "country": "example",
        "friendly_name": "example",
        "phone_number": "example",
        "region": "example",
        "sid": "example",
        "sms_url": "example",
        "voice_url": "example"
      }
    ],
    "page": 1,
    "page_size": 1
  }
}

List users

List the contact center's users and, if asked, their devices.

Inputs

Emailemailtext
Only the user with this email address.
Includefieldstext
Extra details to include, separated by commas: devices, active_call, last_login.
Skipoffsetnumber
How many to skip.At least 0.
How manylimitnumber
How many to return, up to 50. Exotel's default is 20.From 1 to 50.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "items": [
      {
        "date_created": "example",
        "date_updated": "example",
        "devices": [
          {
            "available": true,
            "contact_uri": "example",
            "id": 1,
            "name": "example",
            "status": "example",
            "type": "example",
            "verified": true
          }
        ],
        "email": "example",
        "email_verified": true,
        "first_name": "example",
        "id": "example",
        "last_login": "example",
        "last_name": "example",
        "role": "example"
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}

Look up Indian number

Get an Indian phone number's operator, telecom circle, type (mobile or landline) and Do Not Disturb status.

Inputs

Phone numberphone_numbertextRequired
The Indian phone number.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "Circle": "example",
    "CircleName": "example",
    "DND": "example",
    "Operator": "example",
    "OperatorName": "example",
    "PhoneNumber": "example",
    "Type": "example"
  }
}

Pause, resume or end campaign

Pause or resume a campaign, complete a paused one, or archive a completed one.

Inputs

Campaigncampaign_idtextRequired
The campaign's ID, from List campaigns.
Actioncampaign_actiontextRequired
What to do with it.One of: pause, resume, complete, archive.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "campaign": {}
  }
}

Send SMS

Send a text message from an ExoPhone or approved sender ID. In India, DLT registration is required.

Inputs

Fromfrom_numbertextRequired
The ExoPhone or approved sender ID to send from.
TototextRequired
The mobile number to send to, with the country code.
MessagebodytextRequired
The message, up to 2,000 characters.
DLT entity IDdlt_entity_idtext
Your DLT entity ID (required for numbers in India).
DLT template IDdlt_template_idtext
The DLT-approved template's ID.
Typesms_typetext
What kind of message it is.One of: transactional (Transactional (OTP, service)), transactional_opt_in (Transactional, opted in), promotional.
Encodingencodingtext
Plain or Unicode. Detected when left empty.One of: plain, unicode.
Referencecustom_fieldtext
Your own reference, such as an order ID.
Status callbackstatus_callbacktext
An address Exotel posts the delivery status to.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "AccountSid": "example",
    "Body": "example",
    "DateCreated": "example",
    "DateSent": "example",
    "DateUpdated": "example",
    "DetailedStatus": "example",
    "DetailedStatusCode": "example",
    "Direction": "example",
    "From": "example",
    "Price": "example",
    "Sid": "example",
    "SmsUnits": 1,
    "Status": "example",
    "To": "example",
    "Uri": "example"
  }
}

Update user

Change a user's name, or add their email address if they have none.

Inputs

Userexotel_user_idtextRequired
The user's ID, from List users.
First namefirst_nametext
Their first name, 3 to 20 characters.
Last namelast_nametext
Their last name, 3 to 20 characters.
Emailemailtext
Their email address, if they have none yet.

Outputs

dataobject
The response from Exotel.
Example output
{
  "data": {
    "date_created": "example",
    "date_updated": "example",
    "devices": [
      {
        "available": true,
        "contact_uri": "example",
        "id": 1,
        "name": "example",
        "status": "example",
        "type": "example",
        "verified": true
      }
    ],
    "email": "example",
    "email_verified": true,
    "first_name": "example",
    "id": "example",
    "last_login": "example",
    "last_name": "example",
    "role": "example"
  }
}

On this page