Overview

Interacting with Avaya Communications APIs to perform all of your telephony needs is as simple as visiting a website. Experience with REST is useful when developing with Avaya Communications APIs, but you do not need deep knowledge of APIs. We do our best to provide as much information as needed in our documentation to work with our REST API.

Avaya Communications APIs come in three available offers: Communication API, SIP Trunking, and Bring Your Own Carrier (BYOC). With Avaya Communications APIs - Communication API, enterprises get an easy-to-use platform with a comprehensive set of telecommunication functions that customers can incorporate into their applications.

The Communication API dashboard provides a control panel for an administrator to manage the Communication API system on the cloud. As the administrator, you can build and integrate an application with the required features. As Communication API is a postpaid account, you can use all services for a month and get a bill the following month.

The Communication API provides the following:

• A powerful REST API and InboundXML. You can use the REST API to buy and configure phone numbers, make conference calls, and send messages. InboundXML is a set of instructions that you can edit to customize a call and message handling scenarios.

• Local and toll-free phone numbers, short codes in different regions, and 10-Digit Long Code (10DLC) numbers in the US.

• Possibility to associate the purchased numbers that support SMS, MMS, and voice messaging with InboundXML and cloud applications such as Google Cloud Dialogflow.

• A SIP domain where you can configure SIP connectivity with your existing enterprise communication systems.

The references describe the Communication API endpoints.

Base URL

The following are the base URLs to interact with Avaya Communications APIs:

• US region:

https://api-us.cpaas.avayacloud.com/v2

• EU region:

https://api-eu.cpaas.avayacloud.com/v2

• SG region:

https://api-sg.cpaas.avayacloud.com/v2

• The default for Avaya Communications APIs integrations:

https://api.cpaas.avayacloud.com.io/v2

Note: If your account was created in our EU environment, use the base URL designated for the EU region.

You can create your API configuration with your AccountSid and AuthToken parameters. This is called basic configuration. You can also define a proxy server or change the base API URL.

Appending to the end of the base URL with different paths enables different types of interactions. To achieve the desired action or response from Avaya Communications APIs, the HTTP methods like GET, POST, or DELETE are used along with a few parameters.

PubSub URL

To access PubSub API documentation, use the following URL:

https://pubsub-us.cpaas.avayacloud.com/docs/

Authentication

All REST API requests are protected with HTTP Basic Authentication. Every account comes with an Account Sid and Auth Token. These tokens are unique to each account and are needed when making a request to the REST API. Your Account Sid and Auth Token can be found in the Dashboard of your account. Do not share these with anyone!

Request

Avaya Communications APIs only use the HTTPS (https://) protocol. Making requests to the API with the HTTP (http://) protocol is not supported.

Proper syntax should be observed when writing a request URL. If you are using multiple parameters or parameter values, you should use use the ampersand XML entity instead of & to observe the SIP URI format.

Response

When you make a request to Avaya Communications APIs, it will always return a response regarding the resources you have requested, created, or modified. These responses can be in one of these formats: XML, JSON, or CSV.

When something goes wrong during a request, Avaya Communications APIs respond with an HTTP status code, a message describing what went wrong, the error code, and a link to more information regarding the error. Below is an example of an exception response returned by Avaya Communications APIs when a request is made with invalid credentials.


          <Response>
          <RestException>
          <Status>403</Status>
          <Message>Invalid credentials</Message>
          <Code>10004</Code>
          <MoreInfo>http://www.zang.io/docs/api/rest/overview/errors/10004</MoreInfo>
          </RestException>
          </Response>
        

XML Response

XML is the default format when returning responses from Avaya Communications APIs. All responses are wrapped by the <Response> element. An example of a request to view a call resource with an XML response returned is below.

https://api.zang.io/v2/Accounts/{AccountSid}/Calls/{CallSid}

XML Response


          <Response>
          <Call>
          <DateUpdated>Sun, 15 May 2019 17:29:13 -0000</DateUpdated>
          <ParentCallSid>{CallSid}</ParentCallSid>
          <Duration>7</Duration>
          <From>+12223334444</From>
          <To>+15556667777</To>
          <CallerIdBlocked>false</CallerIdBlocked>
          <AnsweredBy>nobody</AnsweredBy>
          <Sid>{CallSid}</Sid>
          <RecordingsCount></RecordingsCount>
          <Price>0.00</Price>
          <ApiVersion>v2</ApiVersion>
          <Status>canceled</Status>
          <Direction>outbound-dial</Direction>
          <StartTime>Sun, 15 May 2019 17:29:06 -0000</StartTime>
          <DateCreated>Sun, 15 May 2019 17:29:06 -0000</DateCreated>
          <SubresourceUris>
          <Notifications>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications</Notifications>
          <Recordings>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings</Recordings>
          </SubresourceUris>
          <ForwardedFrom></ForwardedFrom>
          <Uri>/v2/Accounts/{AccountSid}/Calls/{CallSid}</Uri>
          <AccountSid>{AccountSid}</AccountSid>
          <DurationBilled>0</DurationBilled>
          <EndTime>Sun, 15 May 2019 17:29:13 -0000</EndTime>
          <PhoneNumberSid></PhoneNumberSid>
          </Call>
          </Response>
        

JSON Response

To enable a JSON response, simply add .json to the end of the request URL. Elements within a JSON response are lowercase and separated by an underscore. An example of a request to view a call resource with a JSON response returned is shown on the right.

https://api.zang.io/v2/Accounts/{AccountSid}/Calls/{CallSid}.json

JSON Response


          {
            "date_updated": "Sun, 15 May 2019 17:29:13 -0000",
            "parent_call_sid": "{CallSid}",
            "duration": 7,
            "from": "+12223334444",
            "to": "+15556667777",
            "caller_id_blocked": "false",
            "answered_by": "nobody",
            "sid": "{CallSid}",
            "recordings_count": "",
            "price": "0.00",
            "api_version": "v2",
            "status": "canceled",
            "direction": "outbound-dial",
            "start_time": "Sun, 15 May 2019 17:29:06 -0000",
            "date_created": "Sun, 15 May 2019 17:29:06 -0000",
            "subresource_uris": {
              "notifications": "/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications",
              "recordings": "/v2/Accounts/{AccountSid}/Calls/{Callsid}/Recordings"
            },
            "forwarded_from": "",
            "uri": "/v2/Accounts/{AccountSid}/Calls/{Callsid}",
            "account_sid": "{AccountSid}",
            "duration_billed": 0,
            "end_time": "Sun, 15 May 2019 17:29:13 -0000",
            "phone_number_sid": ""
          }
        

CSV Response

To receive a CSV (Comma Separated Value) response, append .csv to the end of your request URL. Data in CSV format can be useful for easily displaying that information in spreadsheets. An example of a request to view a call list resource with a CSV response returned is below.

https://api.zang.io/v2/Accounts/{AccountSid}/Calls.csv

CSV Response


          date_updated,parent_call_sid,duration,from,to,caller_id_blocked,answered_by,sid,recordings_count,price,api_version,status,direction,start_time,date_created,subresource_uris,forwarded_from,uri,account_sid,duration_billed,end_time,phone_number_sid
          Sun, 15 May 2019 17:29:13 -0000,{CallSid},7,Unavailable,+12223334444,+15556667777,false,nobody,{CallSid},,0.00,v2,canceled,outbound-dial,Sun, 15 May 2019 17:29:06 -0000,Sun, 15 May 2019 17:29:06 -0000,{'notifications': u'/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications', 'recordings': u'/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings'},,/v2/Accounts/{AccountSid}/Calls/{CallSid},{AccountSid},,Sun, 15 May 2019 17:29:13 -0000,
        

Response Paging

Requests to Avaya Communications APIs asking for lists will sometimes return very large responses. To help with navigating through this data, Avaya Communications APIs break larger responses into pages and provide paging information in each response.

Property
  • page

    Current page being viewed. Paging is zero indexed (the first page starts with 0 instead of 1).

  • pagesize

    The maximum number of items provided in a single response is 50. If no pagesize is given in the argument, the default will be 50.

  • num_pages

    The number of pages used to return all of the items. This will vary depending on the pagesize.

  • total

    The total number of items across all pages.

  • start

    The overall position count of the first item in a page. Position counting starts at 0.

  • end

    The overall position count of the last item in a page. For the first page, end would be 49 if the pagesize is 50.

  • uri

    The Uniform Resource Identifier for the current page.

  • firstpageuri

    The URI to the first page in the list.

  • previouspageuri

    The URI to the previous page in the list.

  • nextpageuri

    The URI to the next page in the list.

  • lastpageuri

    The URI to the last page in the list.

The properties Page and PageSize can be used as CamelCased parameters during requests to specify that a particular page or pagesize should be returned. An example of the response returned when using these optional parameters is shown.

https://api.zang.io/v2/Accounts/{AccountSid}/Calls.csv

Response


          <Response>
          <Calls end="11" firstpageuri="/v2/Accounts/{AccountSid}/Calls.xml?Page=0&amp;PageSize=2" lastpageuri="/v2/Accounts/{AccountSid}/Calls.xml?Page=189&PageSize=2" nextpageuri="/v2/Accounts/{AccountSid}/Calls.xml?Page=6&amp;PageSize=2" numpages="190" page="5" pagesize="2" previouspageuri="/v2/Accounts/{AccountSid}/Calls.xml?Page=4&amp;PageSize=2" start="10" total="379" uri="/v2/Accounts/{AccountSid}/Calls.xml">
          <Call>
          <DateUpdated>Wed, 11 May 2019 22:34:54 -0000</DateUpdated>
          <ParentCallSid>{CallSid}</ParentCallSid>
          <Duration>37</Duration>
          <From>+12223334444</From>
          <To>+15556667777</To>
          <CallerIdBlocked>false</CallerIdBlocked>
          <AnsweredBy>nobody</AnsweredBy>
          <Sid>{CallSid}</Sid>
          <RecordingsCount></RecordingsCount>
          <Price>0.0650</Price>
          <ApiVersion>v2</ApiVersion>
          <Status>completed</Status>
          <Direction>outbound-dial</Direction>
          <StartTime>Wed, 11 May 2019 22:34:17 -0000</StartTime>
          <DateCreated>Wed, 11 May 2019 22:33:38 -0000</DateCreated>
          <SubresourceUris>
          <Notifications>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications</Notifications>
          <Recordings>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings</Recordings>
          </SubresourceUris>
          <ForwardedFrom></ForwardedFrom>
          <Uri>/v2/Accounts/{AccountSid}/Calls/{CallSid}</Uri>
          <AccountSid>{AccountSid}</AccountSid>
          <DurationBilled>60</DurationBilled>
          <EndTime>Wed, 11 May 2019 22:34:54 -0000</EndTime>
          <PhoneNumberSid></PhoneNumberSid>
          </Call>
          <Call>
          <DateUpdated>Wed, 11 May 2019 22:34:54 -0000</DateUpdated>
          <ParentCallSid></ParentCallSid>
          <Duration>77</Duration>
          <From>+12223334444</From>
          <To>+15556667777</To>
          <CallerIdBlocked>false</CallerIdBlocked>
          <AnsweredBy>human</AnsweredBy>
          <Sid>{CallSid}</Sid>
          <RecordingsCount></RecordingsCount>
          <Price>0.08</Price>
          <ApiVersion>v2</ApiVersion>
          <Status>completed</Status>
          <Direction>outbound-api</Direction>
          <StartTime>Wed, 11 May 2019 22:33:37 -0000</StartTime>
          <DateCreated>Wed, 11 May 2019 22:33:26 -0000</DateCreated>
          <SubresourceUris>
          <Notifications>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications</Notifications>
          <Recordings>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings</Recordings>
          </SubresourceUris>
          <ForwardedFrom></ForwardedFrom>
          <Uri>/v2/Accounts/{AccountSid}/Calls/{CallSid}</Uri>
          <AccountSid>{AccountSid}</AccountSid>
          <DurationBilled>120</DurationBilled>
          <EndTime>Wed, 11 May 2019 22:34:54 -0000</EndTime>
          <PhoneNumberSid></PhoneNumberSid>
          </Call>
          </Calls>
          </Response>
        

Errors

Error Codes
  • 10000:

    Inbound call received

  • 10001:

    Account is not active

  • 10002:

    Trial account does not support this feature

  • 10003:

    Incoming call rejected due to inactive account

  • 10004:

    Invalid credentials supplied

  • 10005:

    You've been suspended due to a negative account balance prolonging more than 30 days

  • 10006:

    Inbound fax received

  • 10007:

    Welcome message sent

  • 10010:

    Password reset requested

  • 10011:

    Password was reset

  • 10012:

    Account exists for username

  • 10020:

    Incoming call rejected due to low balance

  • 10021:

    REST API call rejected due to low balance

  • 10022:

    REST API call rejected with incorrect parameters

  • 10023:

    Incoming call rejected due to no trunk ports available and bursting disabled

  • 10031:

    Rate could not be found for outbound dial. Contact support

  • 10032:

    Rate could not be found for renewal did profile

  • 11100:

    Invalid URL format

  • 11101:

    Invalid URL! Not valid InboundXML document

  • 11102:

    Invalid URL! Please make sure that InboundXML document is properly encoded against XML standards!

  • 11200:

    HTTP retrieval failure

  • 11205:

    HTTP connection failure

  • 11206:

    HTTP protocol violation

  • 11210:

    HTTP bad host name

  • 11215:

    HTTP too many redirects

  • 11216:

    HTTP unsupported method

  • 11217:

    HTTP callback fetched

  • 12100:

    Document parse failure

  • 12101:

    Invalid TelAPI Markup XML version

  • 12102:

    The root element must be Response

  • 12105:

    Used Fallback URL due to error with primary URL

  • 12200:

    Schema validation warning

  • 12300:

    Invalid Content-Type

  • 12301:

    Length of the URL is bigger than allowed

  • 12400:

    Internal Failure

  • 13201:

    Dial: Cannot Dial out from a Dial Call Segment

  • 13210:

    Dial: Invalid method value

  • 13212:

    Dial: Invalid timeout value

  • 13213:

    Dial: Invalid hangupOnStar value

  • 13214:

    Dial: Invalid callerId value

  • 13215:

    Dial: Invalid nested element

  • 13216:

    Dial: Invalid timeLimit value

  • 13221:

    Dial->Number: Invalid method value

  • 13222:

    Dial->Number: Invalid sendDigits value

  • 13223:

    Dial: Invalid phone number format

  • 13224:

    Dial: Invalid phone number

  • 13225:

    Dial: Forbidden phone number

  • 13226:

    Dial: Destination address is missing

  • 13227:

    Dial: Invalid user specified

  • 13230:

    Dial->Conference: Invalid muted value

  • 13231:

    Dial->Conference: Invalid endConferenceOnExit value

  • 13232:

    Dial->Conference: Invalid startConferenceOnEnter value

  • 13233:

    Dial->Conference: Invalid waitUrl

  • 13234:

    Dial->Conference: Invalid waitMethod

  • 13235:

    Dial->Conference: Invalid beep value

  • 13236:

    Dial->Conference: Invalid Conference Sid

  • 13237:

    Dial->Conference: Invalid Conference Name

  • 13238:

    Dial->Conference: Invalid Verb used in waitUrl TelML

  • 13239:

    Dial->User Sorry, this user is not currently reachable in this Application

  • 13310:

    Gather: Invalid finishOnKey value

  • 13312:

    Gather: Invalid method value

  • 13313:

    Gather: Invalid timeout value

  • 13314:

    Gather: Invalid numDigits value

  • 13320:

    Gather: Invalid nested verb

  • 13321:

    Gather->Say: Invalid voice value

  • 13322:

    Gather->Say: Invalid loop value

  • 13325:

    Gather->Play: Invalid Content-Type

  • 13335:

    GetSpeech: Invalid SRGS grammar file

  • 13410:

    Play: Invalid loop value

  • 13420:

    Play: Invalid Content-Type

  • 13421:

    Play: No file URL provided

  • 13425:

    Play: Only MP3 is currently supported

  • 13427:

    Only POST is supported

  • 13510:

    Say: Invalid loop value

  • 13511:

    Say: Invalid voice value

  • 13520:

    Say: Invalid text

  • 13527:

    Eavesdrop: Invalid call sid value provided

  • 13528:

    Eavesdrop: Provided call sid could not be found

  • 13529:

    Eavesdrop: Call must be in active state in order to apply eavesdrop action

  • 13530:

    SendFax: Could not fetch fax image

  • 13531:

    SendFax: Invalid file format

  • 13535:

    ReceiveFax: Invalid file URL

  • 13610:

    Record: Invalid method value

  • 13611:

    Record: Invalid timeout value

  • 13612:

    Record: Invalid maxLength value

  • 13613:

    Record: Invalid finishOnKey value

  • 13614:

    There is no recording URL available. Recording cannot be transcribed

  • 13710:

    Redirect: Invalid method value

  • 13910:

    Pause: Invalid length value

  • 14101:

    Invalid \"To\" attribute

  • 14102:

    Invalid \"From\" attribute

  • 14103:

    Invalid Body

  • 14104:

    Invalid Method attribute

  • 14105:

    Invalid statusCallback attribute

  • 14106:

    Document retrieval limit reached

  • 14107:

    SMS send rate limit exceeded

  • 14108:

    From phone number not SMS capable

  • 14109:

    SMS Reply message limit exceeded

  • 14110:

    Invalid Verb for SMS Reply

  • 14111:

    Invalid To phone number for Trial mode

  • 14115:

    MMS: Could not fetch file

  • 14116:

    MMS: File size was bigger than maximum allowed (25M)

  • 14117:

    MMS: File type could not be determined or is unsupported

  • 14160:

    Unable to send SMS. Contact support

  • 14200:

    Only one phone number allowed for trial accounts

  • 14201:

    Daily spending limit exceeded

  • 20001:

    Unknown parameters

  • 20002:

    Invalid FriendlyName

  • 20003:

    Permission Denied

  • 20004:

    Method not allowed

  • 20005:

    Account not active

  • 20006:

    Access Denied

  • 20007:

    Username cannot be found

  • 20008:

    Password is not specified

  • 20009:

    SSO Account could not be found

  • 20010:

    SSO Account not available

  • 21201:

    No 'To' number specified

  • 21202:

    'To' number is a premium number

  • 21203:

    International calling not enabled

  • 21204:

    Call could not be found

  • 21205:

    Invalid URL

  • 21206:

    Invalid SendDigits

  • 21207:

    Invalid IfMachine

  • 21208:

    Invalid Timeout

  • 21209:

    Invalid Method

  • 21210:

    'From' phone number not verified

  • 21211:

    Invalid 'To' Phone Number

  • 21212:

    Invalid 'From' Phone Number

  • 21213:

    'From' phone number is required

  • 21214:

    'To' Phone Number cannot be reached

  • 21215:

    Account not authorized to call phone number

  • 21216:

    Account not allowed to call phone number

  • 21217:

    Phone number does not appear to be valid

  • 21218:

    Invalid ApplicationSid

  • 21219:

    'From' phone number not verified

  • 21220:

    Invalid call state

  • 21221:

    Call is not active. Resource access is allowed only for active (live) calls

  • 21222:

    Sound effect parameter is out of bounds. Please consult documentation for more details

  • 21227:

    SID Could not be found

  • 21228:

    SID Could not be found in a timely fashion

  • 21229:

    Invalid StatusCallback provided. If set, it must be a valid URL

  • 21230:

    Invalid StatusUrl provided. If set, it must be a valid URL

  • 21231:

    Invalid FallbackUrl provided. If set, it must be a valid URL

  • 21232:

    Invalid HeartbeatUrl provided. If set, it must be a valid URL

  • 21233:

    Invalid HeartbeatCallback provided. If set, it must be a valid URL

  • 21234:

    Invalid IfMachineUrl provided. If set, it must be a valid URL

  • 21235:

    We could not find requested application client. Please make sure client is online first

  • 21236:

    Please make sure to pass Application where client belongs to in order to be able dial client

  • 21401:

    Invalid Phone Number

  • 21402:

    Invalid Url

  • 21403:

    Invalid Method

  • 21404:

    Inbound phone numbers not available to trial accounts

  • 21405:

    Cannot set VoiceFallbackUrl without setting Url

  • 21406:

    Cannot set SmsFallbackUrl without setting SmsUrl

  • 21407:

    This Phone Number type does not support SMS

  • 21408:

    No PhoneNumber or AreaCode POSTed

  • 21450:

    Phone number already verified for your account

  • 21451:

    Invalid area code

  • 21452:

    No phone numbers found in area code

  • 21453:

    Phone number already verified for another account

  • 21454:

    Invalid CallDelay

  • 21455:

    Phone number already purchased for another account

  • 21457:

    AreaCode not supported

  • 21458:

    PhoneNumber provisioning type mismatch

  • 21501:

    Resource not available

  • 21502:

    Invalid callback url

  • 21503:

    Invalid transcription type

  • 21504:

    RecordingSid is required.

  • 21507:

    Recording parameter 'direction' must be one of 'in', 'out' or 'both'

  • 21508:

    Recording could not be started

  • 21509:

    Recording could not be stopped

  • 21510:

    Call has too many recordings

  • 21601:

    Phone number is not a valid SMS-capable inbound phone number

  • 21602:

    Message body is required

  • 21603:

    'From' phone number is required to send an SMS

  • 21604:

    'To' phone number is required to send an SMS

  • 21605:

    Maximum SMS body length is 160 characters

  • 21606:

    The 'From' phone number provided is not a valid, SMS-capable inbound phone number for your account

  • 21608:

    The Sandbox number can send messages only to verified numbers

  • 21609:

    Unable to route SMS

  • 21610:

    Maximum Unicode SMS body length is 70 characters

  • 21611:

    SMS To address cannot be the same as the From address

  • 21650:

    In order to lookup rate center you need to pass region

  • 30000:

    Low account balance warning

  • 30002:

    Payment applied

  • 30003:

    Phone number purchased

  • 30004:

    Could not apply payment for autoreplenish

  • 30005:

    Phone number renewed

  • 30006:

    Channel renewed

  • 31003:

    Channel purchased

  • 31004:

    The account does not have sufficient funds to allocate this port

  • 31005:

    The account does not have sufficient funds to allocate this port. In order to use auto replenisher you will need to increase replenish amount!

  • 31006:

    Your request for lookup has been rejected. Given phone number country code is not supported

  • 31007:

    Lookup for specified phone number is not supported

  • 31008:

    Rate could not be found for requested destination number

  • 31009:

    Rate group you have requested to lookup does not exist

  • 31010:

    Sorry, we currently do not support that destination for SMS. Please contact support if you need more information

  • 31011:

    Payment refused! Your billing location does not match credit card location!

  • 31012:

    Invalid Credit Card provided. Please enter credit card in order to continue!

  • 31013:

    Invalid amount specified

  • 31014:

    Invalid balance threshold specified

  • 31015:

    There is no replenish setup to deactivate

  • 31016:

    Requested phone number CNAM details could not be discovered

  • 31017:

    Requested phone number Carrier details could not be discovered

  • 31026:

    Requested phone number details could not be discovered

  • 31018:

    Specified timezone is not supported!

  • 31019:

    Credit card has been declined!

  • 31020:

    BNA details could not be discovered for requested phone number

  • 31021:

    CNAM details could not be discovered for requested phone number

  • 31022:

    Phone number purchase rejected due to low account balance

  • 31023:

    Invalid Nickname provided. You need to provide nickname in order to generate application client token

  • 31024:

    Call loop detected

  • 31025:

    Payment declined

  • 31026:

    Rate could not be found

  • 31027:

    SMS loop detected

  • 32000:

    Invalid source number provided

  • 32001:

    Invalid destination number provided

  • 32002:

    Sending SMS rejected due to low account balance

  • 32003:

    The From phone number provided is not a valid, SMS-capable inbound phone number or short code for your account

  • 32004:

    SIP user is not available.

  • 32005:

    Invalid Date filter provided

  • 40000:

    Inbound SMS Received

  • 40001:

    Outbound SMS Sent

  • 40005:

    Bad XML at SMS Request URL

  • 40003:

    Source number (From) cannot be the same as destination number (To)

  • 45000:

    Invalid usage trigger category provided

  • 45001:

    Invalid usage trigger by provided

  • 45002:

    Invalid usage recurring type provided

  • 45003:

    Invalid usage callback url provided

  • 45004:

    Invalid usage callback method provided

  • 45005:

    Invalid usage trigger value provided

  • 45006:

    Failed to send usage trigger callback

  • 45007:

    Usage trigger callback successfully sent

  • 50001:

    Trunk does not allow IncomingNumber to be assigned to it. Prefix not allowed

  • 50005:

    Fatal error transcribing audio

  • 50006:

    Fatal error transcribing audio due to missing or invalid media url

  • 50007:

    Internal error playing sound

  • 50008:

    Cannot play sound to inactive call

  • 50009:

    Internal error stopping sounds

Error Codes (Core Validation)
  • 60000:

    POST, PUT, DELETE methods are not allowed

  • 60001:

    Only POST method is allowed

  • 60002:

    Only POST and DELETE methods are allowed

Conference Error Codes
  • 61000:

    Invalid Member ID

  • 61001:

    Invalid Conference (Say) text

  • 61002:

    Conference with specified name cannot be found

  • 61003:

    Invalid or missing Play URL

  • 61004:

    Invalid Conference call provided

SIP Error Codes (BYOC)
  • 62000:

    Invalid username provided. Please make sure to pass valid username in order to create SIP credential

  • 62001:

    Invalid password provided. Please make sure to pass valid password in order to create SIP credential

  • 62002:

    SIP credential for specified username already exist. Please pick different username

  • 62003:

    Invalid password provided. Please make sure to pass valid password in order to updated SIP credential

  • 62004:

    Invalid ip address provided. Please make sure to pass valid ip address in order to update record

  • 62005:

    Invalid ip address provided. Please make sure to pass valid ip address in order to create record

  • 62006:

    Ip Address for specified addresses already exist. Please pick different ip address

  • 62006:

    Domain name is not valid. Please make sure domain name is set and contains only letters, digits and/or dash

  • 62007:

    Domain name is not available. Please pick another name

  • 62008:

    Invalid ip access control list sid provided. Please sure one exist first

  • 62009:

    IP access control list is already assigned to domain

  • 62010:

    Invalid ip access control list sid provided. Please sure one exist first

  • 62011:

    IP access control list is not assigned to domain. Removal rejected

  • 62012:

    Invalid credential list sid provided. Please sure one exist first

  • 62013:

    Credential list is already assigned to domain

  • 62014:

    Invalid credential list sid provided. Please sure one exist first

  • 62015:

    Credential list is not assigned to domain. Removal rejected

  • 62016:

    Ip address already exist for specified ip access control list

Fraud Error Codes
  • 70001:

    Country could not be authorized

  • 70002:

    Requested country is not supported

  • 70003:

    Requested country is already blocked

  • 70004:

    Country could not be removed from whitelisted destinations

  • 70005:

    Outbound call you are trying to make costs more than allowed

  • 70006:

    You do not have permission to place this call

  • 70007:

    Country added to blacklisted destinations

  • 70008:

    You do not have permission to send this SMS

  • 70009:

    The account does not have sufficient privileges to send this SMS. Fraud detected

  • 70010:

    Calls to mobile numbers are disabled by fraud system

  • 70011:

    Calls to landline numbers are disabled by fraud system

  • 70012:

    Authorization has expired and destination has returned to fully blocked status. Call rejected

  • 70013:

    The destination you are trying to call is blocked by fraud system

  • 70014:

    You do not have privileges to alter selected destination. Please contact support

  • 70015:

    This account can not send this SMS. TelAPI has detected a large number of messages with the same body sent in a short period of time

  • 70016:

    This account can not send this MMS. TelAPI has detected a large number of messages with the same body sent in a short period of time

Security Error Codes
  • 80000:

    You don't have permission to send SMS to requested destination ( 'TO' ) number. The recipient has requested not to receive messages from your account

  • 80001:

    You don't have permission to send SMS to requested destination ( 'TO' ) number. During trial only destinations to US are allowed

  • 80002:

    You don't have permission to send MMS to requested destination ( 'TO' ) number. During trial only destinations to US are allowed

  • 88000:

    Please make sure to write full and unique name in order to create new form id

SMS/MMS Error Codes
  • 0:

    Status OK

  • 8:

    Request validation failed

  • 9:

    Error writing to DB

  • 11:

    Error updating to DB

  • 12:

    Error deleting record, sid may not exist

  • 13:

    Invalid (From) address

  • 14:

    Invalid (To) address

  • 15:

    Error while trying to parse media information

  • 16:

    Provider Error

  • 19:

    Error sending data to callback

  • 21:

    (From) and (To) address are the same

  • 22:

    Failure threshold reached, server circuit breaker tripped

  • 24:

    Error getting info from rating

  • 25:

    (To) number is 911, denied request

  • 26:

    Sending more messages per second than allowed

  • 31:

    Message body size exceeded

  • 32:

    Invalid Account

  • 33:

    Empty message

  • 36:

    Account is blocked by destination address

  • 38:

    Could not fetch (To) address from DB

  • 39:

    Could not fetch (From) address from DB

  • 40:

    (From) address is not active

  • 41:

    SMS not enabled on (From) address

  • 42:

    MMS not enabled on (From) address

  • 43:

    (From) address is not 10DLC enabled

  • 44:

    Account Sid mismatch

  • 45:

    Blank (From) or (To) address

  • 46:

    Sending more SMS messages per second than allowed

  • 47:

    Sending more MMS messages per second than allowed

  • 48:

    Blank message body for SMS

  • 49:

    Blank message and media URL for MMS

  • 50:

    Error sending on outbound queue

  • 51:

    Unknown message type

  • 52:

    Failed to fetch MMS message sid

  • 53:

    Error fetching SMS records

  • 54:

    Error fetching MMS records

  • 55:

    Error deleting SMS record

  • 56:

    Error deleting MMS record

Workflow

Avaya Communications APIs Workflow gives business analysts, nontechnical resources, and developers the tools to write logical business process flows without advanced programming knowledge. It gives them the ability to orchestrate end-user customer journeys across multiple application functions and features. Hosted and accessible from the Avaya Communications APIs portal, Avaya Communications APIs Workflow does not require installation or configuration by its users.







Make Call

https://api.zang.io/v2/Accounts/{AccountSID}/Calls.json
Parameter
  • From: required

    The number to display as calling (i.e. Caller ID). The value does not have to be a real phone number or even in a valid format. For example, 8143 could be passed to the From parameter and would be displayed as the caller ID. Spoofed calls carry an additional charge.

  • To: required

    The number to be called. This number should be the intended destination. The value must be a real phone number and must be in a valid format.

  • Url: required

    The URL requested once the call connects. This URL must be valid and should return InboundXML containing instructions on how to process your call. A badly formatted URL will NOT fallback to the FallbackUrl but return an error without placing the call. URL length is limited to 200 characters.

  • Method:

    The HTTP method used to request the URL once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • FallbackUrl:

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.

  • FallbackMethod:

    The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • StatusCallback:

    A URL that will be requested when the call connects and ends, sending information about the call. URL length is limited to 200 characters.

  • StatusCallbackMethod:

    The HTTP method used to request the StatusCallback URL. Valid parameters are GET and POST - any other value will default to POST.

  • HeartbeatUrl:

    A URL that will be requested every 60 seconds during the call, sending information about the call. The HeartbeatUrl will NOT be requested unless at least 60 seconds of call time have elapsed. URL length is limited to 200 characters.

  • HearbeatMethod:

    The HTTP method used to request the HeartbeatUrl. Valid parameters are GET and POST - any other value will default to POST.

  • ForwardedFrom:

    Specifies the Forwarding From number to pass to the carrier.

  • PlayDtmf:

    Dial digits or play tones using DTMF as soon as the call connects. Useful for navigating IVRs. Allowed values for digits are 0-9, #, *, W, or w (W and w are for .5 second pauses), for example 142##* (spaces are valid). Tones follow the @1000 syntax, for example to play the tone 4 for two seconds, 4@2000 (milliseconds) would be used.

  • Timeout:

    Number of seconds call stays on line while waiting for an answer. The max time limit is 999.

  • HideCallerId:

    Specifies if the Caller ID will be blocked. Allowed positive values are "true" and "True" - any other value will default to "false".

  • Record:

    Specifies if this call should be recorded. Allowed positive values are "true", "True" and "1" - any other value will default to "false". Please note that no more than 5 recordings may be associated with a single call.

  • RecordCallback:

    The URL some parameters regarding the recording will be passed to once it is completed. The longer the recording time, the longer the process delay in returning the recording information. If no RecordCallback is given, the recording will still be saved to the system and available either in your Recording Logs or via a REST List Recordings request. Url length is limited to 200 characters.

  • RecordCallbackMethod:

    The HTTP method used to request the RecordCallback. Valid parameters are GET and POST - any other value will default to POST.

  • Transcribe:

    Specifies whether this call should be transcribed. Allowed positive values are "true", "True", and "1".

  • Transcribe:

    Specifies whether this call should be transcribed. Allowed positive values are "true", "True", and "1".

  • TranscribeQuality:

    Specifies the quality used to process the transcription. Allowed positive values are "auto" and "keywords".

  • StraightToVoicemail:

    Specifies whether this call should be sent straight to the user's voicemail. Allowed positive values are "true" and "True" - any other value will default to "false".

  • IfMachine:

    Specifies how Avaya Communications APIs should handle this call if it goes to voicemail. Allowed values are "continue" to proceed as normal, "redirect" to redirect the call to the ifMachineUrl, or "hangup" to hang up the call. Hangup occurs when the tone is played. IfMachine accuracy is around 90% and may not work in all countries.

  • IfMachineUrl:

    The URL Avaya Communications APIs will redirect to for instructions if a voicemail machine is detected while the IfMachine parameter is set to "redirect". Url length is limited to 200 characters.

  • IfMachineMethod:

    The HTTP method used to request the IfMachineUrl. Valid parameters are GET and POST - any other value will default to POST.

  • SipAuthUsername:

    Your authenticated SIP username, used only for SIP calls.

  • SipAuthPassword:

    Your authenticated SIP password, used only for SIP calls.

The ability to send and receive calls is a core Avaya Communications APIs feature. There are a few different parameters that can be used to modify calls initiated through the REST API. The call start is defined by the connection and not by the dial. If the call does not connect, no charge is incurred.

UTC

All time values returned by Avaya Communications APIs are UTC (Universal Time Coordinated).

Format

The To, From, and ForwardedFrom parameters are automatically formatted on our end. White space will be trimmed and invalid values like letters or symbols will be parsed out. This allows you to use any formatting you wish. For example:

  • XXX-XXX-XXXX
  • X (XXX) XXX-XXXX
  • XX X X XXXX X XX

Be careful not to set Timeout too low since there is delay between the dial and the recipient's ringing. For example, a 5 second Timeout will likely end the call before the recipient's phone has rung at all.

Response Parameters

Response parameters are equal to those on "View Call" API call.

An Error Has Occured

If for any reason you hear "An Error Has Occurred" message playing to you while you are on the call that means that your InboundXML document contains issues. To resolve issues, please visit "Notifications" located at the Avaya Communications APIs dashboard.

Making a SIP Call

Avaya Communications APIs offer full VoIP support, allowing you to make calls using SIP. The only difference between a SIP call and a regular one are the To, From, SipAuthUsername and SipAuthPassword parameters.

To

Avaya Communications APIs offer full VoIP support, allowing you to make calls using SIP. The only difference between a SIP call and a regular one are the To, From, SipAuthUsername and SipAuthPassword parameters.

Text

sip:myusername@myexample.com

From

The From parameter can be set to the SIP URI you wish to show up in the From header of the SIP request.

Headers

You can add headers to the To parameter by appending them to the SIP URI. Character length in the header must not exceed 1024 characters, including header parameters. You must observe the SIP URI schema syntax when including a custom SIP header. The following SIP headers are supported:

• User-to-user

• P-intrinsics

• Custom SIP headers prefixed with an “X-“

Text

sip:myusername@myexample.com?headerone=ya&headertwo=hoo

Transport

You can specify a transport protocol (only TCP or UDP). The default is UDP.

Text

sip:myusername@myexample.com?;transport=tcp

SipAuthUsername

Your authenticated username.

SipAuthPassword

Your authenticated password.







View Call

view all information about a call

https://api.zang.io/v2/Accounts/:AccountSid/Calls/:CallSid.json
Parameter
  • sid required

    An alphanumeric string identifying this resource.

  • date_created required

    The date the call resource was created.

  • date_updated

    The date the call resource was last updated.

  • parent_call_sid

    If the call was created during a different call using InboundXML, this is the sid of that initiating call.

  • account_sid

    An alphanumeric string identifying the account this call occurred through.

  • to

    The number that was called.

  • from

    The number that initiated the call.

  • phone_number_sid

    The sid of the Avaya Communications APIs number calling, or being called. If no Avaya Communications APIs phone number is involved in the call, this property is empty.

  • status

    The status of the call: queued, ringing, in-progress, completed, failed, busy, no-answer.

  • start_time:

    The date and time the call started.

  • end_time

    The date and time the call ended.

  • duration

    The length of the call in seconds.

  • price

    The cost of the call, if available.

  • direction

    The direction of the call from the perspective of Avaya Communications APIs. "inbound" for calls to Avaya Communications APIs, "outbound-api" for calls from the Avaya Communications APIs via REST request, or "outbound-dial" for calls from Avaya Communications APIs via InboundXML.

  • answered_by:

    If the initiated call has answering machine detection, this specifies whether the machine answered. Can be "human", "machine" or "tbd" (to be determined).

  • api_version

    The Api Version being used.

  • forwarded_from

    The number that forwarded the call, if any.

  • recordings_count

    The number of recordings made during this call.

  • caller_id_blocked:

    Specifies whether the caller ID of the inbound phone number was blocked.

  • uri

    The URL pointing to this resource.

  • subresource_uris

    List of a call's various subresources and their URL paths. Examples of call subresources are notifications, recordings, etc.







List Calls

list all calls associated with your account or filter results

https://api.zang.io/v2/Accounts/{AccountSID}/Calls.json
Parameters
  • To:

    Filter by a specific number calls were made to.

  • From:

    Filter by a specific number calls were made from.

  • Status:

    Filter by calls with the specified status. Allowed values are "ringing", "in-progress", "queued", "busy", "completed", "no-answer", and "failed".

  • StartTime

    Filter by all calls beginning on or from a certain date. Date range can be specified using inequalities like so: "StartTime>=YYYY-MM-DD".

  • SipDomain

    Filter all calls that contain SipDomain in the source and destination address.

  • Page

    Used to return a particular page within the list.

  • PageSize

    Used to specify the amount of list items to return per page.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the next page of the results.

  • page

    Current page number.

  • calls

    Array containing calls.

Return parameters for calls are equal to those on "View Call" API call.







Interrupt Live Call

send new instructions to the call

https://api.zang.io/v2/Accounts/{AccountSID}/Calls.json
Path Params
  • CallSid: required

    Call SID.

Body Params
  • Url:

    The URL that in-progress calls will request for new instructions.

  • Method:

    The HTTP method used to request the redirect URL. Valid parameters are GET and POST.

  • Status:

    The status used to end the call. Allowed values are "canceled" for ending queued or ringing calls, and "completed" to end in-progress calls in addition to queued and ringing calls.

Avaya Communications APIs provide granular, real-time control over live calls. Just POST to the Call Sid with a Url pointing to new instructions or end the call with a Status.

Interrupt Live Call API intervenes with the InboundXML on completing the current running element. Later, Interrupt Live Call API switches control to a new flow before running the next element, as it cannot intervene the running XML element.

Response Parameters

Response parameters are equal to those on "View Call" API call.







Send Digits to Live Call

use DTMF tones to mimic button presses

https://api.zang.io/v2/Accounts/{AccountSID}/Calls.json
Path Params
  • CallSid: required

    Call SID.

Body Params
  • PlayDtmf:

    Allowed values are the digits 0-9, #, *, W, or w. "w" and "W"stand for 1/2 second pauses. You can combine these values together, for example, "12ww34". Tones are also supported and follow the @1000 syntax, for example to play the tone 4 for two seconds, 4@2000 (milliseconds) would be used.

  • PlayDtmfDirection:

    Specifies which leg of the call DTMF tones will be played on. Allowed values are “in” to send tones to the incoming caller or “out” to send tones to the out going caller.


Response Parameters

Response parameters are equal to those on "View Call" API call.







Record Live Call

options include time limit, file format, trimming silence and transcribing

https://api.zang.io/v2/Accounts/:AccountSid/Calls/:CallSid/Recordings.json
Path Params
  • CallSid: required

    Call SID.

Body Params
  • Record: required

    Specifies if a call recording should start or end. Allowed values are "true" to start recording and "false" to end recording. Any number of simultaneous, separate recordings can be initiated.

  • Direction:

    Specifies which stream of call audio to record. “in” to record the incoming caller audio, “out” to record the out going caller audio, or “both” to record all audio on the call.

  • TimeLimit:

    The maximum duration of the recording. Allowed value is an integer greater than 0.

  • CallbackUrl:

    A URL that will be requested when the recording ends, sending information about the recording. The longer the recording, the longer the delay in processing the recording and requesting the CallbackUrl. Url length is limited to 200 characters.

  • FileFormat:

    Specifies the file format of the recording. Allowed values are "mp3" or "wav" - any other value will default to "mp3".

  • TrimSilence:

    Trims all silence from the beginning of the recording. Allowed values are "true" or "false" - any other value will default to "false".

  • Transcribe:

    Specifies if this recording should be transcribed. Allowed values are "true" and "false" - all other values will default to "false".

  • TranscribeQuality:

    Specifies the quality of the transcription. Allowed values are "auto" for automated transcriptions and "keywords" returns topics and keywords for a given audio file - all other values will default to "auto".

  • TranscribeCallback:

    A URL that will be requested when the call ends, sending information about the transcription. The longer the recording, the longer the delay in processing the transcription and requesting the TranscribeCallback. Url length is limited to 200 characters.

Please note that no more than 5 recordings may be associated with a call.

Response Parameters

Response parameters are equal to those on "View Call" API call.







Play Audio to Live Call

options include restricting to one caller and looping

https://api.zang.io/v2/Accounts/:AccountSid/Calls/:CallSid/Play.json
Path Params
  • CallSid: required

    Call SID.

Body Params
  • AudioUrl: required

    A URL returning the sound file to play. Progressive downloads and SHOUTCAST streaming are also supported.

  • Direction:

    Specifies which caller will hear the played audio. Allowed values are "in" to play audio to the incoming caller, "out" to play to the outgoing caller, and "both" to play the audio to both callers.

  • Loop:

    Specifies whether the audio will loop. Allowed values are "true" and "false".


Response Parameters

Response parameters are equal to those on "View Call" API call.







Apply Voice Effect

applies voice effect on the call

https://api.zang.io/v2/Accounts/:AccountSid/Calls/:CallSid/Effect.json
Path Params
  • CallSid: required

    Call SID.

Body Params
  • AudioDirections:

    Specifies which caller should have their voice modified. Allowed values are "in" for the incoming caller and "out" for the outgoing caller. This value can be changed as often as you like to control live call flow. The default value is 'out'.

  • Pitch:

    Sets the pitch. The lower the value, the lower the tone. Allowed values are floats greater than 0. The default value is 1.

  • PitchSemiTones:

    Changes the pitch of audio in semitone intervals. Allowed values are floats between -14 and 14. The default value is 0.

  • PitchOctaves:

    Changes the pitch of the audio in octave intervals. Allowed values are floats between -1 and 1. The default value is 0.

  • Rate:

    Sets the rate. The lower the value, the lower the rate. Allowed values are floats greater than 0. The default value is 1.

  • Tempo:

    Sets the tempo. The lower the value, the slower the tempo. Allowed values are floats greater than 0. The default value is 1.

The Pitch value will override the PitchSemiTones value.

Response Parameters

Response parameters are equal to those on "View Call" API call.







View SMS

View SMS allows you to retrieve information about a message using the message SID.

Path Parameters
  • SMSMessageSid: required

    The unique alphanumeric string identifying the message.

Response Parameters
  • body

    The text of the message that was sent or received.

  • status

    The status of the message that was sent or received. Values: sent, received, sending, queued, or failed.

  • direction:

    Specifies the direction of the message. “outbound-api” indicates a message sent using the REST API. "incoming" indicates an incoming message to your Avaya Communications APIs number. “outbound-call” indicates a message sent using InboundXML that was initiated by an outbound call. "outbound-reply" indicates a message sent using InboundXML assigned to your Avaya Communications APIs number.

  • date_updated

    The date and time the message was last updated. Format: "Thu, 14 May 2020 19:39:22 +0000".

  • price

    The cost of the message.

  • from

    The number the message was sent from.

  • uri

    The URL pointing to this resource.

  • account_sid

    The unique alphanumeric string identifying the account the message was sent from.

  • to

    The number the message was sent to.

  • sid

    The unique alphanumeric string identifying this message.

  • date_sent

    The date and time the message was sent. Format: "Thu, 14 May 2020 19:39:22 +0000".

  • date_created

    The date and time the message was created. Format: "Thu, 14 May 2020 19:39:22 +0000.

  • api_version

    The API version being used.







List SMS

List SMS allows you to retrieve all of the SMS on your account in a paged list. If no query parameters are set, the endpoint will return all messages associated with your account in descending order.

Query Params
  • To:

    Lists all messages sent to this number. The number does not have to be in E.164 format but it must include the country code.

  • From:

    Lists all messages sent from this number. The number does not have to be in E.164 format but it must include the country code.

  • DateSent:

    Lists all messages sent and received on the specified date in descending order. Specify a date as YYYY-MM-DD. You can retrieve messages on or before a specified date using "DateSent<=YYYY-MM-DD". You can retrieve messages on or after a specified date using "DateSent>=YYYY-MM-DD"

  • Page:

    The current page number. The first page number is 0.

  • PageSize:

    The number of results per page. You can specify the amount of messages you want returned per page.

  • Status:

    The status of the message. Value operation: sent, received, sending, queued, failed.

  • Direction:

    The direction of the message from the Avaya Communications APIs perspective. Value operation: outbound-api indicates a message sent using the REST API. Incoming" indicates an incoming message to the associated Avaya Communications APIs number. Outbound-call indicates a message sent using InboundXML that was initiated by an outbound call. Outbound-reply indicates a message sent using InboundXML assigned to the associated Avaya Communications APIs number.

Response Parameter
  • body

    The text of the message that was sent or received.

  • status

    The status of the message that was sent or received. Values: sent, received, sending, queued, or failed.

  • direction

    The direction of the message that was sent or recevied. Values: inbound, outbound-reply, outbound-api.

  • date_updated

    The date and time the message was last updated. Format: "Thu, 14 May 2020 19:39:22 +0000".

  • price

    The cost of the message.

  • from

    The number the message was sent from.

  • uri

    The URL pointing to this resource.

  • account_sid

    The unique alphanumeric string identifying the account the message was sent from.

  • to

    The number the message was sent to.

  • sid

    The unique alphanumeric string identifying this message.

  • date_sent

    The date and time the message was sent. Format: "Thu, 14 May 2020 19:39:22 +0000".

  • date_created

    The date and time the message was created.

  • api_version

    The API version being used.







Send SMS

Send SMS allows you to send an SMS from your application. We recommend using one Avaya Communications APIs number per use case. Using the same number for multiple use cases could result in delivery issues at the carrier level. Existing toll-free or long code phone numbers can be enabled for messaging upon request by submitting a letter of authorization for SMS only. The form can be found in the "Number Porting" section of our resources page.

Avaya Communications APIs currently offer short codes in the US and Canada upon request. Short codes are a great alternative to long code and toll-free numbers if you are sending a large number of messages per day. For options and pricing, please contact our sales team.

Our network is designed to facilitate high-quality, high-integrity A2P business communications, not spam or unconsented messaging. To protect both networks and consumers from abuse, Avaya Communications APIs enforce a Code of Conduct, which provides best practices for sending messages and content generation. All users of our network, including users of software, API, or gateway services, are held to the same standards and expectations.

Messages can also be also be sent and received via SMPP. For information regarding SMPP Setup, please visit the "How To" section of our resources page.

Body Parameters
  • To: required

    Must be an SMS capable number. The number needs to be E.164 format. We do not recommend that you send an SMS to another number provisioned to your account. Doing so could create a message loop which could result in unwanted charges.

  • Body: required

    The size of a single plain text SMS is 160 characters. If unicode characters are used, the size of a single SMS is 70 characters. Users can send SMS messages that exceed 160/70 characters. For larger SMS messages, the maximum number of allowed characters is 765 for a plain text SMS. For a unicode SMS it is 335 characters. For large SMS, 1 SMS unit is of 153 (67 for unicode) characters.

    If a user tries to send an SMS that exceeds 765(335) characters, the request fails, with "Message size is exceeded" error.

    When sending to international destinations, the number of SMS is limited to 1 unit.

  • From: required

    This number must be an Avaya Communications APIs number associated with your account. International numbers are not SMS enabled by default. A support request needs to be submited to enable it.

  • StatusCallback:

    The URL we will use to send information to regarding this SMS. URL length is limited to 200 characters.

  • StatusCallbackMethod:

    The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.

Response Parameters
  • account_sid:

    An alphanumeric string identifying the account this SMS was sent from.

  • apiVersion:

    The API version being used.

  • body:

    The text of the SMS message sent.

  • date_created:

    The date and time the SMS was created.

  • date_sent:

    The date and time the SMS was sent.

  • date_updated:

    The date and time the SMS was last updated.

  • direction:

    This specifies the direction of the SMS.

  • from:

    The number the message was sent from.

  • price:

    The cost of the SMS.

  • sid:

    The unique alphanumeric string identifying this SMS.

  • status:

    The status of the SMS: sent, sending, queued, or failed.

  • to:

    The number the SMS was sent to.

  • uri:

    The URL pointing to this resource.


Supported opt-in and opt-out keywords

Avaya Communications APIs support opt-in and opt-out keywords in accordance with industry standards. If a mobile user sends one of these keywords in an SMS, Avaya Communications APIs process them automatically with a standard response, updating a subscription status for the user. Each keyword is a single word and case-insensitive. If a keyword is used in a sentence, it does not trigger an automatic response and status update from Avaya Communications APIs.

Avaya Communications APIs support the following keywords:

Opt-in kewords
  • SUBSCRIBE, RESUME, UNSTOP, START, YES

    An inbound request with one of these keywords allows the account number which receives it to send SMS messages to the customer or removes the customer phone number from the black list.

Opt-out kewords
  • UNSUBSCRIBE, CANCEL, STOP, QUIT

    An inbound request with one of these keywords makes the account number which receives it blacklist the number of the mobile customer for all outbound traffic.




View MMS

View MMS allows you to retrieve information about a message using the message SID.

https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages/{MMSSid}.json
Path Parameters
  • MMSSid: required

    MMS Message Sid.

Response Parameters
  • account_sid:

    An alphanumeric string identifying the account this MMS was sent from.

  • apiVersion:

    The API version being used.

  • body:

    Text of the MMS message sent or received.

  • date_created:

    The date and time the MMS was created.

  • date_sent:

    The date and time the MMS was sent.

  • date_updated:

    The date and time the MMS was last updated.

  • direction:

    Specifies the direction of the MMS.

  • from:

    The number the MMS was sent or recevied from.

  • media_url:

    The URL of the media in the MMS.

  • mms_sid:

    The unique alphanumeric string identifying this MMS.

  • price:

    The cost of the MMS.

  • status:

    The status of the MMS: sent, sending, queued, or failed.

  • to:

    The number the MMS was sent to.







List MMS

List MMS allows you list the specified MMS from the specified account.

Optional Parameters
  • To:

    The number the MMS was sent to.

  • From:

    The number the MMS being queried was sent from.

  • DateSent:

    The date and time the MMS was sent.

  • Page:

    The page number.

  • PageSize:

    The page size.

Response Parameters
  • account_sid:

    An alphanumeric string identifying the account this MMS was sent from.

  • apiVersion:

    The API version being used.

  • body:

    Text of the MMS message sent or received.

  • date_created:

    The date and time the MMS was created.

  • date_sent:

    The date and time the MMS was sent.

  • date_updated:

    The date and time the MMS was last updated.

  • direction:

    Specifies the direction of the MMS.

  • from:

    The number the MMS was sent or recevied from.

  • media_url:

    The URL of the media in the MMS.

  • mms_sid:

    The unique alphanumeric string identifying this MMS.

  • price:

    The cost of the MMS.

  • status:

    The status of the MMS: sent, sending, queued, or failed.

  • to:

    The number the MMS was sent to.







Send MMS

With MMS, you will have the ability to share audio, images, and video with MMS-capable numbers in the US & Canada. The API setup is very similar to SMS. MMS will come automatically enabled when a phone number is purchased.

Required Parameters
  • From

    Must be an Avaya Communications APIs number associated with your account. The value does not have to be in any specific format.

  • To

    Must be an MMS capable number. The value does not have to be in any specific format.

  • MediaUrl

    The URL of the media you wish to send out with the message. Please see below for supported content.

Optional Parameters
  • Body

    Text of the MMS to be sent.

  • StatusCallback

    The URL that will be sent information about the MMS. URL length is limited to 200 characters.

  • StatusCallbackMethod

    The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.


Supported Content Media Types

Audio: amr, mp3, wav
Images: jpg, gif, png
Video: mp4

The media size limit is 750 KB. You may have more than one media file attachment so long as they meet the total size limitation of 750kB. We do not support sending more than one media file in the message body at this time. MMS is currently only supported in the US and Canada.

Need Help?

If you run into any issues, contact our support team at https://onecare.avaya.com/customercare/en/public?view=AvayaOneCloud







View Usage

view the usage of an item returned by List Usages

https://api.zang.io/v2/Accounts/:AccountSid/Usages/:UsageSid.json
Path Params
  • UsageSid: required

    Usage SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • product

    The product or feature used.

  • product_id

    An integer identifying this product. You can see the full list under List Usage.

  • day

    The day of the usage.

  • month

    The month of the usage.

  • year

    The year of the usage.

  • quantity

    The quantity of the usage.

  • average_cost

    The average cost of the usage.

  • total_cost

    The total cost of the usage.

  • uri

    The URL to this resource.







List Usages

complete list of all usages of your account

https://api.zang.io/v2/Accounts/:AccountSid/Usages.json
Query Params
  • Day:

    Filters usage by day of month. If no month is specified then defaults to current month. Allowed values are integers between 1 and 31 depending on the month. Leading 0s will be ignored.

  • Month:

    Filters usage by month. Allowed values are integers between 1 and 12. Leading 0s will be ignored.

  • Year:

    Filters usage by year. Allowed values are valid years in integer form such as "2014".

  • Product:

    Filters usage by a specific “product” of Avaya Communications APIs. Each product is uniquely identified by an integer. For example: Product=1, would return all outbound call usage. The integer assigned to each product is listed below.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Product Codes

Products
  • Outbound Call

    1

  • Inbound Call

    2

  • Outbound SMS

    3

  • Inbound SMS

    4

  • Outbound SIP

    5

  • Inbound SIP

    6

  • Recording

    7

  • Recurring DID

    8

  • Recurring DID (Premium)

    9

  • Transcription (Auto)

    12

  • Transcription (Keywords)

    14

  • Recurring Inbound Channel

    17

  • Inbound Call (Channel)

    18

  • CNAM Dip

    19

  • Carrier Lookup

    20

  • Outbound Call (Spoofed)

    21

  • Inbound Call (Channel Overage)

    22

  • Recurring DID Unblock

    23

  • Inbound Call Unblocked

    24

  • Inbound Call Forwarded From

    25

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • usages

    Array containing usages.

Response parameters for Usages are equal to those on "View Usage" API call.


Response Params

"quantity" and "total" are two separate measurements: "quantity" is the total number of individual units, such as minutes, whereas "total" is the total number of usages, such as calls.







View Account

see all the information associated with your account

https://api.zang.io/v2/Accounts/:AccountSid.json

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying the account.

  • friendly_name

    By default, the email used to create the account but a custom alias can be set by POSTing a FriendlyName parameter to the /Account/{AccountSID} endpoint.

  • status

    This is the status of the Avaya Communications APIs account being requested. The state of the status can be either active, suspended, or closed.

  • account_balance

    The current balance of an account.

  • date_created

    Date of account creation. Dates are returned in UTC format.

  • date_updated

    Date of most recent account update. Dates are returned in UTC format.

  • uri

    The path appended to the base Avaya Communications APIs URL, https://api.zang.io, where the resource is located.

  • max_outbound_limit

    The maximum allowed rate per segment. For example, if the max_outbound_limit was $1.00 then any calls costing more than $1.00 per minute would be restricted.

  • type

    The type of account being requested. If the account is not yet funded Type is "trial". Otherwise, Type for upgraded accounts is "full".

  • time_zone

    The name of an accounts timezone.

  • subresource_uris

    List of an account’s various subresources and their URI path. Examples of subresources are things like calls that occurred through the account, sms messages, purchased phone numbers, etc.







Update Account

updates account information

https://api.zang.io/v2/Accounts/:AccountSid.json
Body Params
  • FriendlyName:

    The custom alias for your account.

Response Parameters

Response parameters for Account are equal to those on "View Account" API call.







List Agents

Lists all Google Dialogflow Agent ingefrations for your account.

 http://api.zang.io/v2/Accounts/{AccountSID}/Agents.json 

Query parameters

Parameter
  • Page

    Use the page number to return a particular page within the list.

  • Page size

    Use to specify the amount of list items to return per page.







View Agent Profile

Returns Agent Profile properties for a particular Agent SID.

 http://api.zang.io/v2/Accounts/{AccountSID}/Agents/{AgentSID}.json 

Response parameters

Parameter
  • Friendly_name

    A human-readable name to identify the agent.

  • Timeout

    The number of seconds the agent waits before taking further actions if a user does not respond.

  • Callback_url

    A URL where the API forwards the conversation with the Agent and contextual information about ir. Example: https://www.example.com/dialogflow. This corresponds to the Action attribute of the verb in the InboundXML.

  • Language

    The language for your phone number communication. You can select a language by type and gender. The correct syntax for this parameter is this: "LanguageCode:VoiceType:Gender". For example, "en-US:en-US-Standard-B:Male".

  • Event_callback_url

    The URL for sending statuses of the conversation events. For example, "http://eventwebhook.com".

  • Events

    Events for which customers can receive notifications. The selected events arise 18 when the communication between a caller and an agent takes place. Valid values are: "onConversationStarted; onAgentRespond; onConversationEnded"







Update Agent Profile

Updates Agent Profile properties for a particular Agent SID.

http://api.zang.io/v2/Accounts/{AccountSID}/Agents/{AgentSID}/ConfigProfile.json   

Query parameters

Parameter
  • Friendly_name

    A human-readable name to identify the agent.

  • Timeout

    The number of seconds the agent waits before taking further actions if a user does not respond.

  • Callback_url

    A URL where the API forwards the conversation with the Agent and contextual information about ir. Example: https://www.example.com/dialogflow. This corresponds to the Action attribute of the verb in the InboundXML.

  • Language

    The language for your phone number communication. You can select a language by type and gender. The correct syntax for this parameter is this: "LanguageCode:VoiceType:Gender". For example, "en-US:en-US-Standard-B:Male".

  • Event_callback_url

    The URL for sending statuses of the conversation events. For example, "http://eventwebhook.com".

  • Events

    Events for which customers can receive notifications. The selected events arise 18 when the communication between a caller and an agent takes place. Valid values are: "onConversationStarted; onAgentRespond; onConversationEnded"

  • Callback_method

    Method used to request the Callback URL. Available and default method is POST.

  • Event_ Callback_method

    Method used to request the Event Callback URL. Available and default method is POST.







View Conference

shows information on some conference

https://api.zang.io/v2/Accounts/:AccountSid/Conferences/:ConferenceSid.json
Path Params
  • ConferenceSid: required

    Conference SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    User generated name of the conference.

  • account_sid

    An alphanumeric string identifying the account the conference occurred through.

  • active_participants_count

    The number of participants currently connected to conference.

  • run_time

    Current conference duration in seconds.

  • status

    Conference status. Possible values are “init”, “in-progress” or “completed”. “init” means the conference has been initialize, but no one has yet entered.

  • uri

    The URL for this resource.







List Conferences

shows information on all conferences associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/Conferences.json
Query Params
  • FriendlyName:

    Filters conferences by the given FriendlyName.

  • Status:

    Filters conferences by the given status. Allowed values are "init", "in-progress", or "completed".

  • DateCreated:

    Filter by conferences created on, after, or before a given date. Date range can be specified using inequalities like "DateCreated>=YYYY-MM-DD". Allowed values are dates in the YYYY-MM-DD format.

  • DateUpdated:

    Filter by conferences updated on or after a given date. Date range can be specified using inequalities like "DateCreated>=YYYY-MM-DD". Allowed values are dates in the YYYY-MM-DD format.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this participant.

  • caller_name

    The name displayed by the participant's caller ID.

  • caller_number

    The number this participant used to call into the conference.

  • duration

    The duration in seconds that a participant has been in the conference.

  • conference_sid

    The Sid identifying the conference this participant took part in.

  • date_created required

    The date the call resource was created.

  • date_updated

    The date the call resource was last updated.

  • account_sid

    An alphanumeric string identifying the account the conference participant is associated with.

  • muted

    Boolean value indicating if this conference participant is currently muted.

  • deaf

    Boolean value indicating if this conference participant is currently deaf.

  • uri

    The URL pointing to this resource.







View Participant

shows info on some conference participant

https://api.zang.io/v2/Accounts/:AccountSid/Conferences/:ConferenceSid/Participants/:ParticipantSid.json
Path Params
  • ConferenceSid: required

    Conference SID.

  • ParticipantSid: required

    Participant Sid.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • sms_messages

    Array containing SMS messages.







List Participants

options include filtering by muted or deaf

https://api.zang.io/v2/Accounts/:AccountSid/Conferences/:ConferenceSid/Participants.json
Path Params
  • ConferenceSid: required

    Conference SID.

Query Params
  • Muted:

    Filter by participants that are muted. Allowed values are "true" or "false".

  • Deaf:

    Filter by participants that are deaf. Allowed values are "true" or "false".

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.


Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • participants

    Array containing participants.

Return parameters for participants are equal to those on "View Participant" API call.







Mute / Deaf Participant

sets participant in conference to mute or deaf

https://api.zang.io/v2/Accounts/:AccountSid/Conferences/:ConferenceSid/Participants/:ParticipantSid.json
Path Params
  • ConferenceSid: required

    Conference SID.

  • ParticipantSid: required

    Participant Sid.

Body Params
  • Muted:

    Specifies whether the participant should be muted. Allowed values are "true" and "false".

  • Deaf:

    Specifies whether the participant can hear the conference. Allowed values are "true" and "false"


Response Parameters

Response parameters are equal to those on "View Participant" API call.







Play Audio to Participant

plays an audio file to a conference participant

https://api.zang.io/v2/Accounts/:AccountSid/Conferences/:ConferenceSid/Participants/:ParticipantSid/Play.json
Path Params
  • ConferenceSid: required

    Conference SID.

  • ParticipantSid: required

    Participant Sid.

Body Params
  • AudioUrl:

    A URL to the audio file that will be played. Mutliple AudioUrl parameters may be passed to play more than one file.


Response Parameters

Response parameters are equal to those on "View Participant" API call.







Hangup Participant

hangs up a conference participant

https://api.zang.io/v2/Accounts/:AccountSid/Conferences/:ConferenceSid/Participants/:ParticipantSid.json
Path Params
  • ConferenceSid: required

    Conference SID.

  • ParticipantSid:

    Participant Sid.

Response Parameters

Response parameters are equal to those on "View Participant" API call.







View Application

shows the information on the Avaya Communications APIs application

https://api.zang.io/v2/Accounts/:AccountSid/Applications/:ApplicationSid.json
Path Params
  • ApplicationSid: required

    Application SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    User generated name of the application.

  • account_sid

    An alphanumeric string identifying the account the application is registered with.

  • voice_url

    The URL requested once the call connects, returning InboundXML with instructions on how to process your call.

  • voice_method

    The HTTP method used to request the URL once the call connects.

  • voice_fallback_url

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL.

  • voice_fallback_method

    The HTTP method used to request the FallbackUrl once the call connects.

  • voice_caller_id_lookup

    Specifies if the application has voice caller ID lookup enabled.

  • date_created

    The date the application resource was created.

  • date_updated

    The date the application resource was last updated.

  • sms_url

    The URL requested when an SMS is received, returning InboundXML with instructions on how to process your SMS.

  • sms_method

    The HTTP method used to request the URL when an SMS is received.

  • sms_fallback_url

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL.

  • sms_fallback_method

    The HTTP method used to request the FallbackUrl once the call connects.

  • hearbeat_url

    A URL that will be requested every 60 seconds during the call, sending information about the call.

  • hearbeat_method

    The HTTP method used to request the HeartbeatUrl.

  • status_callback

    A URL that will be requested when the call connects and ends, sending information about the call.

  • status_callback_method

    The HTTP method used to request the StatusCallback URL.

  • hangup_callback

    This is a StatusCallback clone that will be phased out in future versions.

  • hangup_callback_method

    This is a StatusCallbackMethod clone that will be phased out in future versions.

  • api_version

    The API version used with this application.

  • uri

    The API version used with this application.







Create Application

Creates a new application

https://api.zang.io/v2/Accounts/:AccountSid/Applications.json
Body Params
  • FriendlyName:

    The name used to identify this application. If this is not included at the initial POST, it is given the value of the application sid.

  • VoiceUrl:

    The URL requested once the call connects. This URL must be valid and should return InboundXML containing instructions on how to process your call. A badly formatted Url will NOT fallback to the FallbackUrl but return an error without placing the call. Url length is limited to 200 characters.

  • VoiceMethod:

    The HTTP method used to request the URL once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • VoiceFallbackUrl:

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.

  • VoiceFallbackMethod:

    The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • VoiceCallerIdLookup:

    Look up the caller’s caller-ID name from the CNAM database (additional charges apply). Allowed values are "true" and "false".

  • SmsUrl:

    The URL requested when an SMS is received. This URL must be valid and should return InboundXML containing instructions on how to process the SMS. A badly formatted URL will NOT fallback to the FallbackUrl but return an error without placing the call. URL length is limited to 200 characters.

  • SmsMethod:

    The HTTP method used to request the URL when an SMS is received. Valid parameters are GET and POST - any other value will default to POST.

  • SmsFallbackUrl:

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.

  • SmsFallbackMethod:

    The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • HeartbeatUrl:

    A URL that will be requested every 60 seconds during the call, sending information about the call. The HeartbeatUrl will NOT be requested unless at least 60 seconds of call time have elapsed. URL length is limited to 200 characters.

  • HeartbeatMethod:

    The HTTP method used to request the HeartbeatUrl. Valid parameters are GET and POST - any other value will default to POST.

  • StatusCallback:

    A URL that will be requested when the call connects and ends, sending information about the call. URL length is limited to 200 characters.

  • StatusCallbackMethod:

    The HTTP method used to request the StatusCallback URL. Valid parameters are GET and POST - any other value will default to POST.

  • HangupCallback:

    This is a StatusCallback clone that will be phased out in future versions.

  • HangupCallbackMethod:

    This is a StatusCallbackMethod clone that will be phased out in future versions.

Response Parameters

Response parameters are equal to those on "View Application" API call.







Update Application

updates Avaya Communications APIs application data

https://api.zang.io/v2/Accounts/:AccountSid/Applications/:ApplicationSid.json
Path Params
  • ApplicationSid: required

    Application SID.

Body Params
  • FriendlyName:

    The name used to identify this application. If this is not included at the initial POST, it is given the value of the application sid.

  • VoiceUrl:

    The URL requested once the call connects. This URL must be valid and should return InboundXML containing instructions on how to process your call. A badly formatted Url will NOT fallback to the FallbackUrl but return an error without placing the call. Url length is limited to 200 characters.

  • VoiceMethod:

    The HTTP method used to request the URL once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • VoiceFallbackUrl:

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.

  • VoiceFallbackMethod:

    The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • VoiceCallerIdLookup:

    Look up the caller’s caller-ID name from the CNAM database (additional charges apply). Allowed values are "true" and "false".

  • SmsUrl:

    The URL requested when an SMS is received. This URL must be valid and should return InboundXML containing instructions on how to process the SMS. A badly formatted URL will NOT fallback to the FallbackUrl but return an error without placing the call. URL length is limited to 200 characters.

  • SmsMethod:

    The HTTP method used to request the URL when an SMS is received. Valid parameters are GET and POST - any other value will default to POST.

  • SmsFallbackUrl:

    URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.

  • SmsFallbackMethod:

    The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.

  • HeartbeatUrl:

    A URL that will be requested every 60 seconds during the call, sending information about the call. The HeartbeatUrl will NOT be requested unless at least 60 seconds of call time have elapsed. URL length is limited to 200 characters.

  • HeartbeatMethod:

    The HTTP method used to request the HeartbeatUrl. Valid parameters are GET and POST - any other value will default to POST.

  • StatusCallback:

    A URL that will be requested when the call connects and ends, sending information about the call. URL length is limited to 200 characters.

  • StatusCallbackMethod:

    The HTTP method used to request the StatusCallback URL. Valid parameters are GET and POST - any other value will default to POST.

  • HangupCallback:

    This is a StatusCallback clone that will be phased out in future versions.

  • HangupCallbackMethod:

    This is a StatusCallbackMethod clone that will be phased out in future versions.


Response Parameters

Response parameters are equal to those on "View Application" API call.







Delete Application

deletes Avaya Communications APIs application

https://api.zang.io/v2/Accounts/:AccountSid/Applications/:ApplicationSid.json
Path Params
  • ApplicationSid: required

    Application SID.

Response Parameters

Response parameters are equal to those on "View Application" API call.







List Applications

shows info on all Avaya Communications APIs applications associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/Applications.json
Query Params
  • FriendlyName:

    Filters by the application's FriendlyName.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • applications

    Array containing applications.

Response parameters for applications are equal to those on "View Application" API call.

























Getting Started

With SIP Registration, you can connect your SIP-enabled devices or softphones directly to Avaya Communications APIs and use our API to build call-handling logic. To send and receive calls using SIP Registration, the following setup steps will be required:

Create SIP Domain

Creating a SIP Domain specifies the domain that you want to register with:

{domain}.sip.zang.io

Create Credential List

Credential Lists are sets of credentials used as authentication when attempting to reach your SIP Domain. Avaya Communications APIs will send REGISTER requests which will need to be authenticated with a credential from your Credential Lists. You can give each credential any name you want. The password must be at least 8 characters long.

After a Credential List, you then need to grant your SIP access to your credential. You can grant one or more SIP Domains access to the same credential.

Making calls with your SIP Domain

To make outgoing SIP calls from your registered SIP Domain, you must send the INVITE to your SIP domain:

{domain}.sip.zang.io

Outgoing calls by your SIP Domain will be treated like any incoming SIP call received on the Avaya Communications APIs domain. After being authenticated, it will execute the Voice URL configured in your SIP domain. For convenience, we have auto-populated the Voice URL with our default voice InboundXML.

Receiving calls on you SIP Domain

In order for your SIP Domain to receive calls from Avaya Communications APIs, you will use the same InboundXML or REST API calls you use today. Here’s a simple example of how to receive a call to your Avaya Communications APIs enabled SIP device. Simply buy the Avaya Communications APIs phone number, create an InboundXML script that will ring your SIP Domain, and point the InboundXML script to your newly purchased phone number. Note: yourusername MUST match one of the usernames specified in your Credential Lists.

Need Help?

If you run into any issues, contact our support team at https://onecare.avaya.com/customercare/en/public?view=AvayaOneCloud







View Domain

get info on your SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid.json
Path Params
  • DomainSid: required

    Domain SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    User generated name of the conference.

  • account_sid

    An alphanumeric string identifying the account the conference occurred through.

  • domain_name

    A unique address through which you route your SIP traffic to Avaya Communications APIs.

  • auth_type

    The types of authentication associated with your domain. You must have at least one or all requests will be blocked. Allowed Values: IP_ACL and/or CREDENTIAL_LIST

  • voice_url

    The URL requested when a call is received by your domain.

  • voice_method

    The HTTP method used when requesting the VoiceUrl.

  • voice_fallback_url

    The URL requested if the VoiceUrl fails.

  • voice_fallback_method

    The HTTP method used when requesting the VoiceFallbackUrl.

  • voice_heartbeat_callback

    URL that can be requested every 60 seconds during the call to notify of elapsed time and pass other general information.

  • voice_heartbeat_callback_method

    Specifies the HTTP method used to request HeartbeatUrl. Default Value: POST Allowed Value: POST or GET

  • voice_status_callback_url

    The URL that Avaya Communications APIs will use to send you status notifications regarding your SIP call.

  • voice_status_callback_method

    The HTTP method used when requesting the VoiceStatusCallback.

  • date_created

    The date this credential was created.

  • date_updated

    The date the application resource was last updated.

  • uri

    The Uniform Resource Identifier to this resource.

  • domain-sip_url

    Complete URL for this SIP domain.

  • subresource_uris

    URIs for managing this resource (IP access control and credentials).

  • ip_access_control_list_mappings

    URI for IP access controll management.

  • credential_list_mappings

    URI for credentials management.







List Domains

list all your SIP domains

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains.json

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • domains

    Array containing the domains information.

Return parameters for domains are equal to those on "View Domain" API call.







Create Domain

create new SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains.json
Body Params
  • DomainName: required

    An address on Avaya Communications APIs uniquely associated with your account and through which all your SIP traffic is routed.

  • FriendlyName:

    A human-readable name associated with this domain.

  • VoiceUrl:

    The URL requested when a call is received by your domain.

  • VoiceMethod:

    The HTTP method used when requesting the VoiceUrl.

  • VoiceFallbackUrl:

    The URL requested if the VoiceUrl fails.

  • VoiceFallbackMethod:

    The HTTP method used when requesting the VoiceFallbackUrl.

  • HeartbeatUrl:

    URL that can be requested every 60 seconds during the call to notify of elapsed time and pass other general information.

  • HeartbeatMethod:

    Specifies the HTTP method used to request HeartbeatUrl.

  • VoiceStatusCallback:

    The URL that Avaya Communications APIs will use to send you status notifications regarding your SIP call.

  • VoiceStatusCallbackMethod:

    The URL that Avaya Communications APIs will use to send you status notifications regarding your SIP call.

Before the domain can accept traffic, you must associate it with an authentication method.

Response Parameters

Response parameters are equal to those on "View Domain" API call.







Update Domain

updates SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid.json
Path Params
  • DomainSid: required

    Domain SID.

Body Params
  • FriendlyName:

    A human-readable name associated with this domain.

  • VoiceUrl:

    The URL requested when a call is received by your domain.

  • VoiceMethod:

    The HTTP method used when requesting the VoiceUrl.

  • VoiceFallbackUrl:

    The URL requested if the VoiceUrl fails.

  • VoiceFallbackMethod:

    The HTTP method used when requesting the VoiceFallbackUrl.

  • HeartbeatUrl:

    URL that can be requested every 60 seconds during the call to notify of elapsed time and pass other general information.

  • HeartbeatMethod:

    Specifies the HTTP method used to request HeartbeatUrl.

  • VoiceStatusCallback:

    The URL that Avaya Communications APIs will use to send you status notifications regarding your SIP call.

  • VoiceStatusCallbackMethod:

    The URL that Avaya Communications APIs will use to send you status notifications regarding your SIP call.


Response Parameters

Response parameters are equal to those on "View Domain" API call.







Delete Domain

deletes SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid.json
Path Params
  • DomainSid: required

    Domain SID.

Response Parameters

Response parameters are equal to those on "View Domain" API call.







List Mapped Credentials Lists

shows info on credential lists attached to a SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid/CredentialListMappings.json
Path Params
  • DomainSid: required

    Domain SID.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • credential_lists

    Array containing SIP domain credentials lists.

Response parameters for credential lists are equal to those on "View Credentials List" API call.







Map Credentials List

maps credentials list to a SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid/CredentialListMappings.json
Path Params
  • DomainSid: required

    Domain SID.

Body Params
  • CredentialListSid: required

    The SID of the credential list that you wish to associate with this domain.


Response Parameters

Response parameters are equal to those on "View Credentials List" API call.







Delete Mapped Credentials List

deletes a credential list mapped to some SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid/CredentialListMappings/:CLSid.json
Path Params
  • DomainSid: required

    Domain SID.

  • CLSid: required

    Credentials list SID.

Response Parameters

Response parameters are equal to those on "View Credentials List" API call.







List Mapped IP ACLs

shows info on IP access control lists attached to a SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid/IpAccessControlListMappings.json
Path Params
  • DomainSid: required

    Domain SID.

Request this endpoint with no parameters to see all SMS associated with your account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • ip_access_control

    Array containing IP access control lists information.

Response parameters for access control lists are equal to those on "View IP ACL" API call.







Map IP ACL

maps IP access control list to a SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid/IpAccessControlListMappings.json
Path Params
  • DomainSid: required

    Domain SID.

Body Params
  • IpAccessControlListSid: required

    The Sid of the IP ACL that you wish to associate with this domain.


Response Parameters

Response parameters are equal to those on "View IP ACL" API call.







Delete Mapped IP ACL

detaches an IP access control list from a SIP domain

https://api.zang.io/v2/Accounts/:AccountSid/SIP/Domains/:DomainSid/IpAccessControlListMappings/:ALSid.json
Path Params
  • DomainSid: required

    Domain SID.

  • ALSid: required

    IP access control list SID.

Response Parameters

Response parameters are equal to those on "View IP ACL" API call.







View Credentials List

view info on SIP domain credentials list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid.json
Path Params
  • CLSid: required

    Credentials list SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • accound_sid

    An alphanumeric string identifying the account associated with this resource.

  • friendly_name

    A human-readable name associated with this domain.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • credentials_count

    Number of attached credentials.

  • uri

    The Uniform Resource Identifier to this resource.

  • subresource_uris

    URIs for managing this resource.

  • credentials

    URI for managing credentials on this resource.







List Credentials Lists

show info on SIP domain credentials lists

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists.json

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • credentials_lists

    Array containing SIP domain credentials.

Response parameters for credential lists are equal to those on "View Credentials List" API call.







Create Credentials List

creates SIP domain credentials list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists.json
Body Params
  • FriendlyName: required

    A human readable name for this credential list.


Response Parameters

Response parameters are equal to those on "View Credentials List" API call.







Update Credentials List

updates info for credentials list

https://api.zang.io/v2/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}.json
Path Parameters
  • CLSid: required

    Credentials list SID.

Body Params
  • FriendlyName: required

    A readable name associated with this credentials lists.


Response Parameters

Response parameters are equal to those on "View Credentials List" API call.







View Credential

view SIP domain credentials information

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid/Credentials/:CredentialSid.json
Path Params
  • CLSid: required

    Credentials list SID.

  • CredentialSid: required

    Credential SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • friendly_name

    A human-readable name associated with this domain.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • credential_list

    Parent credentials list SID.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • uri

    The Uniform Resource Identifier to this resource.

  • subresource_uris

    URIs for managing this resource.







Delete Credentials List

deletes SIP domain credentials list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid.json
Path Params
  • CLSid: required

    Credentials list SID.

Response Parameters

Response parameters are equal to those on "View Credentials List" API call.







List Credentials

show info on all credentials attached to a particular credentials list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid/Credentials.json
Path Params
  • CLSid: required

    Credentials list SID.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • credentials

    Array containing SIP domain credentials.

Response parameters for credentials are equal to those on "View Credential" API call.







Create Credential

create SIP domain credentials

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid/Credentials.json
Path Params
  • CLSid: required

    Credentials list SID.

Body Params
  • Username: required

    The username used to identify this credential.

  • Password: required

    The password used to authenticate this credential.

Response Parameters

Response parameters are equal to those on "View Credential" API call.







Update Credential

updates SIP domain credentials

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid/Credentials/:CredentialSid.json
Path Params
  • CLSid: required

    Credentials list SID.

  • CredentialSid: required

    Credential SID.

Body Params
  • Password: required

    The password used to authenticate this credential.

Response Parameters

Response parameters are equal to those on "View Credential" API call.







Delete Credential

deletes SIP domain credentials

https://api.zang.io/v2/Accounts/:AccountSid/SIP/CredentialLists/:CLSid/Credentials/:CredentialSid.json
Path Params
  • CLSid: required

    Credentials list SID.

  • CredentialSid: required

    Credential SID.

Response Parameters

Response parameters are equal to those on "View Credential" API call.







View IP ACL

view information for IP access control list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists/:IpAccessControlListSid.json
Path Params
  • IpAccessControlListSid: required

    IP access control list SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    A human-readable name associated with this domain.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • uri

    The Uniform Resource Identifier to this resource.

  • ip_addresses_count

    Number of the assigned IP addresses on this IP access control list.

  • subresource_uris

    URIs for managing this resource.

  • credentials

    URI for managing credentials on this IP access control list.







List IP ACLs

list all IP access control lists associated with a particular account

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists.json
Query Params
  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Request this endpoint with no parameters to see all SMS associated with your account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • ip_access_control

    Array containing IP access control lists information.

Response parameters for access control lists are equal to those on "View IP ACL" API call.







Create IP ACL

create IP access control list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists.json
Body Params
  • FriendlyName: required

    A human-readable name associated with this IP ACL.

Response Parameters

Response parameters are equal to those on "View IP ACL" API call.







Update IP ACL

updates information for IP access control list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists/:IpAccessControlListSid.json
Path Params
  • IpAccessControlListSid: required

    IP access control list SID.

Body Params
  • FriendlyName: required

    A human-readable name associated with this IP ACL.


Response Parameters

Response parameters are equal to those on "View IP ACL" API call.







Delete IP ACL

deletes IP access control list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists/:IpAccessControlListSid.json
Path Params
  • IpAccessControlListSid: required

    IP access control list SID.

Response Parameters

Response parameters are equal to those on "View IP ACL" API call.







View ACL IP

view information on IP access control list IP address

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists/:AclSid/IpAddresses/:IpSid.json
Path Params
  • AclSid: required

    IP access control list SID.

  • IpSid: required

    Access control list IP address SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    A human-readable name associated with this domain.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • uri

    The Uniform Resource Identifier to this resource.

  • subresource_uris

    URIs for managing this resource.







List ACL IPs

lists IP addresses attached to some IP access control list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists/:AclSid/IpAddresses.json
Path Params
  • AclSid: required

    IP access control list SID.

Request this endpoint with no parameters to see all SMS associated with your account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • ip_addresses

    Array containing IP addresses information.

Response parameters for IP addresses are equal to those on "View ACL IP" API call.







Add ACL IP

add new IP for access control list

https://api.zang.io/v2/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses.json
Path Parameters
  • AclSid: required

    IP access control list SID.

Body Parameters
  • FriendlyName: required

    A readable name associated with this domain.

  • IpAddress: required

    An IP address from which you wish to accept traffic. At this time, only IPv4 is supported.

Response Parameters
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    A human-readable name associated with this domain.

  • ip_address

    An IP address from which you wish to accept traffic. At this time, only IPv4 supported.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • uri

    The Uniform Resource Identifier to this resource.

  • subresource_uris

    URIs for managing this resource.







Update ACL IP

updates IP address for IP access control list

https://api.zang.io/v2/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses/{IpSid}.json
Path Parameters
  • AclSid: required

    IP access control list SID.

  • IpSid: required

    Access control list IP address SID.

Body Parameters
  • FriendlyName: required

    A readable name associated with this domain.

  • IpAddress: required

    An IP address from which you wish to accept traffic. At this time, only IPv4 is supported.

Response Parameters

Response parameters are equal to those on "View ACL IP" API call.







Delete ACL IP

deletes IP address from IP access control list

https://api.zang.io/v2/Accounts/:AccountSid/SIP/IpAccessControlLists/:AclSid/IpAddresses/:IpSid.json
Path Params
  • AclSid: required

    IP access control list SID.

  • IpSid: required

    Access control list IP address SID.

Response Parameters

Response parameters are equal to those on "View ACL IP" API call.







BYOC Number APIs

The Bring-Your-Own-Carrier (BYOC) APIs allow BYOC service-type customers to perform regular number management routines, such as view, add, list, update, and delete operations.

The APIs work the same and have the same parameters as regular Incoming Phone Numbers APIs for Avaya Communications APIs. There are several extra parameters, specific to BYOC numbers. BYOC service type users also use BYOC-specific request URLS. You can find more information about the use of particular APIs with BYOC service type under:

"View Number"

"List Number"

"Add Number"

"Update Number"

"Delete Number"







List Numbers

Shows information on all incoming numbers associated with the Communication API account or BYOC account.

A base URL for Communication API users:

https://api.zang.io/version/Accounts/AccountSid/IncomingPhoneNumbers.json

A base URL for BYOC service type users:

https://api.zang.io/version/Accounts/AccountSid/Numbers/Byoc.json
Query Params
  • Contains:

    List numbers containing certain digits.

  • FriendlyName:

    Specifies that only IncomingPhoneNumber resources matching the input FriendlyName should be returned in the list request.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • incoming_phone_numbers

    Array containing phone numbers.

Response parameters for incoming phone numbers are equal to those on "View Incoming Number" API call.







View Number

Shows information on an incoming phone number or an incoming BYOC phone number.

A base URL for the Communication API users and BYOC service type users:

https://api.zang.io/v2/Accounts/AccountSid/IncomingPhoneNumbers/IncomingNumberSid

Path Params
  • IncomingNumberSid: required

    Incoming number SID.

Avaya Communications APIs phone numbers associated with an account are represented with the IncomingPhoneNumbers resource.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • friendly_name

    A human-readable name associated with this domain.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • type

    The type of Avaya Communications APIs number (local, international, etc.). For the BYOC number, the type is always local.

  • voice

    The URL returning InboundXML incoming calls should execute when connected.

  • voice_method

    Specifies the HTTP method (GET or POST) used to request the VoiceUrl once incoming call connects.

  • voice_fallback_url

    URL used if any errors occur during execution of InboundXML on a call or at initial request of the VoiceUrl.

  • voice_fallback_method

    Specifies the HTTP method (GET or POST) used to request the VoiceFallBackUrl if it is needed.

  • voice_caller_id

    Specifies if the incoming number has voice caller ID lookup enabled.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • sms_url

    The URL returning InboundXML incoming phone numbers should execute when receiving an sms.

  • sms_method

    The HTTP method used when making requests to the SmsUrl. Either GET or POST.

  • sms_fallback_url

    URL used if any errors occur during execution of InboundXML from an sms or at initial request of the SmsUrl.

  • sms_fallback_method

    Specifies the HTTP method (GET or POST) used to request the SmsFallbackUrl.

  • heartbeat_url

    URL that can be used to monitor the phone number.

  • hearbeat_method

    The HTTP method Avaya Communications APIs will use when requesting the HeartbeatURL. Either GET or POST.

  • capabilities

    The features available with this incoming phone number. The Elements voice and sms are nested within this property with their values as either True or False depending on what the number is capable of.

  • status_callback

    URL that can be requested to receive notification when and how incoming call has ended.

  • status_callback_method

    Specifies the HTTP method (GET or POST) used to request the HangupCallback URL.

  • hangup_callback

    This is a StatusCallback clone that will be phased out in future versions.

  • hangup_callback_method

    This is a StatusCallbackMethod clone that will be phased out in future versions.

  • api_version

    The API version used with this incoming number.

  • uri

    The Uniform Resource Identifier to this resource.







List Numbers

Shows info on all incoming numbers associated with some account.

https://api.zang.io/version/Accounts/AccountSid/IncomingPhoneNumbers.json
Query Params
  • Contains:

    List numbers containing certain digits.

  • FriendlyName:

    Specifies that only IncomingPhoneNumber resources matching the input FriendlyName should be returned in the list request.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • incoming_phone_numbers

    Array containing phone numbers.

Response parameters for incoming phone numbers are equal to those on "View Incoming Number" API call.







Add Number

Add Number allows you to purchase a number from our inventory. You can purchase a random number from a specified area code or an available number from our inventory. See "List Available Numbers". Note: An AreaCode or PhoneNumber must be specified in your request. Both are not required, just one.

For BYOC type users, this endpoint allows you to add a BYOC number. You can add any BYOC number as long as your ByocVendor parameter is in the approved BYOC vendor list. ByocVendor, PhoneNumber, and Type must be specified in your request. A BYOC PhoneNumber can be of any length. All BYOC numbers are considered as local number type.

An example of a base URL for Communication API:

https://api.zang.io/version/Accounts/AccountSid/IncomingPhoneNumbers.json

An example of a base URL for BYOC API:

https://api.zang.io/version/Accounts/AccountSid/Byoc.json?ByocVendor=< CarrierName >&PhoneNumber=39111111111&Type=Local
Body Parameters
  • AreaCode: required

    The area code from which a random available number will be added.

  • PhoneNumber: required

    The phone number in E.164 format. It can be of any length for a BYOC number

  • ByocVendor: required

    This parameter is used for BYOC numbers only. It checks the BYOC vendor database to confirm if your Add Number operation is valid.

  • Type: required

    This parameter is required only for BYOC numbers. The value is always local.

  • FriendlyName:

    User generated name for the incoming number.

  • VoiceUrl:

    The URL returning InboundXML incoming calls should execute when connected.

  • VoiceMethod:

    Specifies the HTTP method used to request the VoiceUrl once incoming call connects.

  • VoiceFallbackUrl:

    URL used if any errors occur during execution of InboundXML on a call or at initial request of the VoiceUrl.

  • VoiceFallbackMethod:

    Specifies the HTTP method used to request the VoiceFallbackUrl once incoming call connects.

  • VoiceCallerIdLookup:

    Look up the caller’s caller-ID name from the CNAM database (additional charges apply).

  • SmsUrl:

    The URL returning InboundXML incoming phone numbers should execute when receiving an SMS.

  • SmsMethod:

    Specifies the HTTP method used to request the SmsUrl once an incoming SMS is received.

  • SmsFallbackUrl:

    URL used if any errors occur during execution of InboundXML from an SMS or at initial request of the SmsUrl.

  • SmsFallbackMethod:

    Specifies the HTTP method used to request the SmsFallbackUrl.

  • HeartbeatUrl:

    URL that can be used to monitor the phone number.

  • HeartbeatMethod:

    The HTTP method Avaya Communications APIs will use when requesting the HeartbeatURL.

  • StatusCallback:

    URL that can be requested to receive notification when and how incoming call has ended.

  • StatusCallbackMethod:

    The HTTP method Avaya Communications APIs will use when requesting the HangupCallback URL.

  • HangupCallback:

    This is a StatusCallback clone that will be phased out in future versions.

  • HangupCallbackMethod:

    This is a StatusCallbackMethod clone that will be phased out in future versions.

  • VoiceApplicationSid:

    The SID of the Voice Application you wish to associate with this incoming number.

  • SmsApplicationSid:

    The SID of the SMS Application you wish to associate with this incoming number.

  • MmsApplicationSid:

    The SID of the MMS Application you wish to associate with this incoming number.

Avaya Communications APIs numbers can be added or removed from an account using our REST API. When adding a phone number, users can either make the request for a specific available phone number using the PhoneNumber parameter, or a random phone number within a specific area code using the AreaCode parameter. To view a list of numbers available for purchase, a GET request to the AvailablePhoneNumbers URI can be made.

The Response parameters for this endpoind are identical to "View Number".







Update Number

Updates incoming phone number characteristics for Communication API and BYOC service types.

A base URL example for Communication API service:

https://api.zang.io/2/Accounts/:AccountSid/IncomingPhoneNumbers/:IncomingPhoneNumberSid.json

A base URL example for BYOC API service:

https://api.zang.io/2/Accounts/:AccountSid/Numbers/BYOC/:IncomingPhoneNumberSid.json
Path Params
  • IncomingPhoneNumberSid: required

    34 characters long unique incoming phone number identifier.

Body Params
  • FriendlyName:

    User generated name for the incoming number.

  • VoiceUrl:

    The URL returning InboundXML incoming calls should execute when connected.

  • VoiceMethod:

    Specifies the HTTP method used to request the VoiceUrl once incoming call connects.

  • VoiceFallbackUrl:

    URL used if any errors occur during execution of InboundXML on a call or at initial request of the VoiceUrl.

  • VoiceFallbackMethod:

    Specifies the HTTP method used to request the VoiceFallbackUrl once incoming call connects.

  • VoiceCallerIdLookup:

    Look up the caller’s caller-ID name from the CNAM database (additional charges apply).

  • SmsUrl:

    The URL returning InboundXML incoming phone numbers should execute when receiving an SMS.

  • SmsMethod:

    Specifies the HTTP method used to request the SmsUrl once an incoming SMS is received.

  • SmsFallbackUrl:

    URL used if any errors occur during execution of InboundXML from an SMS or at initial request of the SmsUrl.

  • SmsFallbackMethod:

    Specifies the HTTP method used to request the SmsFallbackUrl.

  • HeartbeatUrl:

    URL that can be used to monitor the phone number.

  • HeartbeatMethod:

    The HTTP method Avaya Communications APIs will use when requesting the HeartbeatURL.

  • StatusCallback:

    URL that can be requested to receive notification when and how incoming call has ended.

  • StatusCallbackMethod:

    The HTTP method Avaya Communications APIs will use when requesting the HangupCallback URL.

  • HangupCallback:

    This is a StatusCallback clone that will be phased out in future versions.

  • HangupCallbackMethod:

    This is a StatusCallbackMethod clone that will be phased out in future versions.

  • VoiceApplicationSid:

    The SID of the Voice Application you wish to associate with this incoming number.

  • SmsApplicationSid:

    The SID of the SMS Application you wish to associate with this incoming number.

  • MmsApplicationSid:

    The SID of the MMS Application you wish to associate with this incoming number.


Response Parameters

Response parameters are equal to those on "View Incoming Number" API call.







Delete Number

Deletes an incoming phone number. When an Avaya phone number is deleted with this endpoint, it is released and added to the Avaya inventory and can be repurchased by another customer. When a BYOC number is deleted with this endpoint, it is completely removed from the Avaya Communications APIs system.

A base URL example for Communication API service:

https://api.zang.io/2/Accounts/:AccountSid/IncomingPhoneNumbers/:IncomingPhoneNumberSid.json

A base URL example for BYOC API service:

https://api.zang.io/2/Accounts/:AccountSid/Numbers/Byoc/:IncomingPhoneNumberSid.json
Path Params
  • IncomingPhoneNumberSid: required

    34 characters long unique incoming phone number identifier.

Response Parameters

Response parameters are equal to those on "View Incoming Number" API call.







List Recordings

shows info on all recordings associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/Recordings.json
Query Params
  • CallSid:

    Filters by recordings associated with a given CallSid.

  • DateCreated:

    Lists all recordings created on or after a certain date. Date range can be specified using inequalities like so: DateSent=>YYYY-MM-DD.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Request this endpoint with no parameters to see all SMS associated with your account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • recordings

    Array containing recordings.

Response parameters for recordings are equal to those on "View Recording" API call.







Delete Recording

deletes recording

https://api.zang.io/v2/Accounts/:AccountSid/Recordings/:RecordingSid.json
Path Params
  • RecordingSid: required

    Recording SID.

Response Parameters

Response parameters are equal to those on "View Recording" API call.







Record Call

records an Avaya Communications APIs call

https://api.zang.io/v2/Accounts/:AccountSid/Calls/:CallSid/Recordings.json
Path Params
  • CallSid: required

    Call SID.

Body Params
  • Record: required

    Specifies if a call recording should start or end. Allowed values are "true" to start recording and "false" to end recording. Any number of simultaneous, separate recordings can be initiated.

  • Direction:

    Specifies which audio stream to record. Allowed values are "in" to record the incoming caller's audio, "out" to record the outgoing caller's audio, and "both" to record both.

  • TimeLimit:

    The maximum duration of the recording. Allowed value is an integer greater than 0.

  • Callback:

    A URL that will be requested when the recording ends, sending information about the recording. The longer the recording, the longer the delay in processing the recording and requesting the CallbackUrl. Url length is limited to 200 characters.

  • FileFormat:

    Specifies the file format of the recording. Allowed values are "mp3" or "wav" - any other value will default to "mp3".

  • TrimSilence:

    Trims all silence from the beginning of the recording. Allowed values are "true" or "false" - any other value will default to "false".

  • Transcribe:

    Specifies if this recording should be transcribed. Allowed values are "true" and "false" - all other values will default to "false".

  • TranscribeQuality:

    Specifies the quality of the transcription. Allowed values are "auto" for automated transcriptions and "keywords" returns topics and keywords for a given audio file - all other values will default to "auto".

  • TranscribeCallback:

    A URL that will be requested when the call ends, sending information about the transcription. The longer the recording, the longer the delay in processing the transcription and requesting the TranscribeCallback. URL length is limited to 200 characters.


Response Parameters

Response parameters are equal to those on "View Recording" API call.







View Recording

shows information on some recording

https://api.zang.io/v2/Accounts/:AccountSid/Recordings/:RecordingSid.json
Path Params
  • RecordingSid: required

    Recording SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • call_sid

    The sid identifying the recorded call.

  • duration

    Time of recording in seconds.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • recording_url

    The URL where the mp3 file of the recording is located.

  • api_version

    The API version used with this incoming number.

  • uri

    The Uniform Resource Identifier to this resource.

  • price

    The cost of this recording.







List Notifications

shows info on all notifications associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/Notifications.json
Query Params
  • Log:

    Specifies that only notifications with the given log level value should be listed. Allowed values are 1,2 or 3, where 2=INFO, 1=WARNING, 0=ERROR.

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Request this endpoint with no parameters to see all SMS associated with your account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • notifications

    Array containing notifications.

Response parameters for notifications are equal to those on "View Notification" API call.







View Notification

shows information on some notification

https://api.zang.io/v2/Accounts/:AccountSid/Notifications/:NotificationSid.json
Path Params
  • NotificationSid: required

    Notification SID.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account associated with this resource.

  • call_sid

    The sid identifying the recorded call.

  • date_created

    The date this credential list was created.

  • date_updated

    The date the credential list was last updated.

  • log

    Specifies the notification log level: 2=INFO, 1=WARNING, 0=ERROR.

  • error_code

    Identifies the specific error type. For more information on error codes see the Error Dictionary.

  • more_info

    URL leading to our error dictionary for more information on the error.

  • message_text

    Text of the notification message.

  • log

    Specifies the notification log level: 2=INFO, 1=WARNING, 0=ERROR.

  • message_date

    The date the Avaya Communications APIs account received the actual notification. May be a bit different from DateCreated due to buffering.

  • response_headers

    The HTTP headers returned by the server when the notification occurred.

  • response_data

    The HTTP body returned by the server when the notification occurred.

  • request_url

    The URL being requested when notification was generated.

  • request_method

    The method used to request RequestUrl when the notification was generated.

  • request_variables

    The variables sent with the HTTP request that generated the notification.

  • api_version

    The API version used with this incoming number.

  • uri

    The Uniform Resource Identifier to this resource.







List Available Countries

This endpoint provides access to a list of available countries a user can buy numbers from.

https://{BaseZangURL}/v2/Accounts/{AccountSID}/Numbers/AllowedCountries/{NumberType}
Path Parameterss
  • AccountSid: required

    Call SID.

  • NumberType: required

    Type of the phone number. Can be Local or Tollfree.

Body Parameters
  • URL:

    The URL that in-progress calls will request for new instructions.

  • Method:

    The HTTP method used with the query. Valid value is GET.

  • Country:

    A 2-letter country code or LEGACY_COUNTRY. Example: GB (Great Britain), US (The United States).

  • ServiceType:

    The type of service used. Valid values are: byoc, siptrunk, cpaas, LEGACY_SERVICE.

The keyword LEGACY_ denotes blank configuration. Some customers may have no information of country or service type. To handle that case, you can use the words LEGACY_COUNTRY for country, and LEGACY_SERVICE for service





List Available Numbers

shows information on all phone numbers available for purchasing

https://api.zang.io/2/Accounts/:AccountSid/AvailablePhoneNumbers/:Country/:Type.json
Path Params
  • Country: required

    Two letter country code.

  • Type: required

    Type of the phone number. Can be Local or Tollfree.

Query Params
  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

  • Contains:

    Specifies the desired characters contained within the available numbers to list.

  • AreaCode:

    Specifies the area code that the returned list of available numbers should be in. Only available for North American numbers.

  • InRegion:

    Specifies the desired region of the available numbers to be listed.

  • InPostalCode:

    Specifies the desired postal code of the available numbers to be listed.

If you want to add a new Avaya Communications APIs number, you need to know what ones are available. Our REST API provides a way to request a list of available numbers along with all of their resource properties so you know the numbers you have to choose from.

Note that individual AvailablePhoneNumber resources can not be requested. Requests only return a list of available resources based on the filtering parameters sent with the request.

Response Parameters

Parameter
  • friendly_name

    Domestic format version of the available phone number. (e.g. 1234567890 to (123)-456-7890).

  • phone_number

    The E.164 format number of each available number.

  • lata

    Local Access and Transportation Area of the available number. The LATA is determined by geographical region.

  • rate_center

    The available phone numbers rate center.

  • latitude

    The latitude of the available phone number.

  • longitude

    The longitude of the available phone number.

  • country_code

    Code used to identify the phone numbers geographic origin. Found at the beginning of the number.

  • npa

    Numbering Plan Area of the available number. This is more commonly known as the area code.

  • exchange

    Three digits following the NPA (area code) in the available number.

  • city

    The available phone numbers city.

  • region

    The region of the available phone number. Usually a two letter abbreviation.

  • postal_code

    The postal code (also known as zip code) of the available number.

  • iso_country

    Two letter country code of the available phone number.

  • type

    Type of phone number (local or tollfree).

  • setup_cost

    Cost of phone number setup.

  • monthly_cost

    Cost of phone number per month.

  • voice_enabled

    Is voice enabled for this phone number? Can be true or false.

  • sms_enabled

    Is SMS enabled for this phone number? Can be true or false.

  • supports_forwarded_from

    Does phone number support forwarded from? Can be true or false.

Listing Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • available_phone_numbers

    Array containing available phone numbers.







View Transcription

shows info on some transcription

https://api.zang.io/v2/Accounts/:AccountSid/Transcriptions/:TranscriptionSid.json
Path Params
  • TranscriptionSid: required

    Transcription SID.

To return just the text of a transcription rather than all resource properties, simply include “.txt” at the end of your request:


https://api.zang.io/v2/Accounts/{AccountSID}/Transcriptions/{TranscriptionSid}.txt

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account this transcription occurred through.

  • date_created

    The date the transcription resource was created.

  • date_updated

    The date the transcription resource was last updated.

  • status

    Status of the transcription. May be in-progress, completed, or failed.

  • type

    Transcription quality tier. May be auto or keywords. Default is auto.

  • audio_url

    URL where a file containing the transcribed audio is located.

  • recording_sid

    An alphanumeric string used to identify the recording that was transcribed. This field is only returned for transcriptions of Avaya Communications APIs recordings.

  • duration

    Length in seconds of the transcribed recording.

  • transcription_text

    Text of the transcribed audio.

  • api_version

    The API version being used when the transcription was made.

  • price

    Cost of the transcription.

  • transcribe_callback

    URL where transcription will report to after completion.

  • callback_method

    Method to request TranscribeCallback URL. May be POST or GET. Default is POST.

  • uri

    The URL to this resource.







List Transcriptions

shows info on all transcriptions associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/Transcriptions.json
Query Params
  • Status:

    Filter by transcriptions with a given status. Allowed values are "completed", "in-progress", and "failed".

  • DateTranscribed:

    Lists all transcriptions created on the specified date or a date range in descending order. Specify a date as YYYY-MM-DD. You can retrieve transcriptions on or before a specified date using "DateTranscribed<=YYYY-MM-DD". You can retrieve transcriptions or after a specified date using "DateTranscribed>=YYYY-MM-DD"

  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

A list of all transcriptions associated with a recording can be be accessed via:


https://api.zang.io/v2/Accounts/{AccountSID}/{RecordingSid}/Transcriptions

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • transcriptions

    Array containing transcriptions.

Response parameters for transcriptions are equal to those on "View Transcription" API call.







Transcribe Recording

transcribes some recording

https://api.zang.io/v2/Accounts/:AccountSid/Recordings/:RecordingSid/Transcriptions.json
Path Params
  • RecordingSid: required

    Recording SID.

Body Params
  • TranscribeCallback:

    The URL some parameters regarding the transcription will be passed to once it is completed. The longer the recording time, the longer the process delay in returning the transcription information. If no TranscribeCallback is given, the recording will still be saved to the system and available either in your Transcriptions Logs or via a REST List Transcriptions (ADD URL LINK) request. URL length is limited to 200 characters.

  • CallbackMethod:

    The HTTP method used to request the TranscribeCallback. Valid parameters are GET and POST - any other value will default to POST.

  • SliceStart:

    Start point for slice transcription (in seconds).

  • SliceDuration:

    Duration of slice transcription (in seconds).

  • Quality:

    Specifies the transcription quality. Transcription price differs for each quality tier. See pricing page for details. Allowed values are "auto" and "keywords", where "auto" is a machine-generated transcription and "keywords" returns topics and keywords for a given audio file.

Response Parameters

Response parameters are equal to those on "View Transcription" API call.







Transcribe Audio Url

transcribes an audio file on some URL

https://api.zang.io/v2/Accounts/:AccountSid/Transcriptions.json
Body Params
  • AudioUrl:

    URL where the audio to be transcribed is located

  • TranscribeCallback:

    URL that will be requested when the transcription has finished processing.

  • SliceStart:

    Start point for slice transcription (in seconds).

  • SliceDuration:

    Duration of slice transcription (in seconds).

  • CallbackMethod:

    Specifies the HTTP method to use when requesting the TranscribeCallback URL. Allowed values are "POST" and "GET".

  • Quality:

    Specifies the transcription quality. Transcription price differs for each quality tier. See pricing page for details. Allowed values are "auto" and "keywords", where "auto" is a machine-generated transcription and "keywords" returns topics and keywords for a given audio file.

Response Parameters

Response parameters are equal to those on "View Transcription" API call.







Carrier Lookup

The Carrier Lookup API allows you to retrieve additional information about a phone number

https://api.zang.io/v2/Accounts/{AccountSID}/Lookups/Carrier.json
Body Parameters
  • PhoneNumber: required

    The phone number in E.164 format.

Response Parameters
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account this lookup occurred through.

  • date_created

    The date the lookup resource was created.

  • date_updated

    The date the lookup resource was last updated.

  • phone_number

    The phone number the lookup was performed on.

  • network

    The carrier the phone number is currently operating on.

  • mobile

    Boolean value specifying whether the phone number is mobile.

  • carrier_id

    Four digit Carrier Identification Code.

  • country_code

    The iso country code of the mobile number.

  • mnc

    The Mobile Network Code is only returned if available. It is used in conjunction with Mcc to uniquely identify a carrier.

  • mcc

    The Mobile Country Code is only returned if available. It is used in conjunction with Mnc to uniquely identify a carrier.

  • price

    The cost of the lookup.

  • api_version

    The API version being used when the carrier lookup was made.

  • uri

    The Uniform Resource Identifier to this resource.







Carrier Lookup List

shows info on all carrier lookups associated with some account

https://api.zang.io/v2/Accounts/{AccountSid}/Lookups/Carrier.json
Query Params
  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Avaya Communications APIs provide a way to list all carrier lookups which have previously occurred through an Avaya account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • carrier_lookups

    Array containing carrier lookups.

Response parameters for carrier lookups are equal to those on "Carrier Lookup" API call.







CNAM Lookup

shows a CNAM information on some phone number

https://api.zang.io/v2/Accounts/{AccountSid}/Lookups/Cnam.json
Body Params
  • PhoneNumber: required

    The number of the phone you are attempting to perform the CNAM lookup on. Multiple PhoneNumbers to lookup can be specified in a single request.

Avaya Communications APIs provide a way to look up the CNAM (caller name) caller ID information of a phone number via the REST API.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account this lookup occurred through.

  • date_created

    The date the lookup resource was created.

  • date_updated

    The date the lookup resource was last updated.

  • phone_number

    The phone number the lookup was performed on.

  • body

    The result of our CNAM lookup. Usually a name or organisation associated with this phone.

  • price

    The cost of the lookup.

  • api_version

    The API version being used when the carrier lookup was made.

  • uri

    The Uniform Resource Identifier to this resource.







CNAM Lookup List

shows info on all CNAM lookups associated with some account

https://api.zang.io/v2/Accounts/{AccountSid}/Lookups/Cnam.json
Query Params
  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Avaya Communications APIs provide a way to list all CNAM lookups which have previously occurred through an Avaya account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • cnam_lookups

    Array containing CNAM lookups.

Response parameters for CNAM lookups are equal to those on "CNAM Lookup" API call.







BNA Lookup

shows information on billing name address for some phone number

https://api.zang.io/v2/Accounts/{AccountSid}/Lookups/Bna.json
Body Params
  • PhoneNumber: required

    The number of the phone you are attempting to perform the BNA lookup on. Multiple PhoneNumbers to lookup can be specified in a single request.

Avaya Communications APIs provide an endpoint for performing BNA (Billing Name Address) lookups on numbers. BNA lookups provide geolocation information for phone numbers. BNA lookups are currently only available for US numbers.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • account_sid

    An alphanumeric string identifying the account this lookup occurred through.

  • date_created

    The date the lookup resource was created.

  • date_updated

    The date the lookup resource was last updated.

  • phone_number

    The phone number the lookup was performed on.

  • first_name

    The first name of the individual associated with this phone number.

  • last_name

    The last name of the individual associated with this phone number.

  • address

    The address associated with this phone number.

  • city

    The city associated with this phone number.

  • state

    The US state associated with this phone number.

  • zip_code

    The zip code associated with this phone number.

  • country_code

    The country code associated with this phone number. (BNA lookups are currently only available in US).

  • price

    The price to perform the lookup. If only the city and state of the number are looked up, you are charged $.01. If a full address lookup is successful you are charged $.15.

  • api_version

    The API version being used when the carrier lookup was made.

  • uri

    The Uniform Resource Identifier to this resource.







BNA Lookup List

shows info on all BNA lookups associated with some account

https://api.zang.io/v2/Accounts/{AccountSid}/Lookups/Bna.json
Query Params
  • Page:

    Used to return a particular page within the list.

  • PageSize:

    Used to specify the amount of list items to return per page.

Avaya Communications APIs provide a way to list all BNA lookups which have previously occurred through an Avaya account.

Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • bna_lookups

    Array containing BNA lookups.

Response parameters for BNA lookups are equal to those on "BNA Lookup" API call.







Block Destination

restricts outbound calls and sms messages to some destination

https://api.zang.io/v2/Accounts/{AccountSid}/Fraud/Block/{CountryCode}.json
Path Params
  • CountryCode: required

    Country code.

Query Params
  • MobileEnabled:

    Mobile status for the destination. If false, all mobile call activity will be rejected or disabled. Allowed values are "true" and "false".

  • LandlineEnabled

    Landline status for the destination. If false, all landline call activity will be rejected or disabled. Allowed values are "true" and "false".

  • SmsEnabled:

    SMS status for the destination. If false, all SMS activity will be rejected or disabled. Allowed values are "true" and "false".


Response Parameters

Parameter
  • is_lock

    Specifies whether the destinations permission state (blocked, whitelisted, etc.) has been locked by our system. Currently, the US is locked as a whitelisted destination.

  • mobile_enabled

    Mobile status for the destination. If false, all mobile call activity will be rejected or disabled.

  • landline_enabled

    Landline status for the destination. If false, all landline call activity will be rejected or disabled.

  • date_updated

    The date this block was last updated.

  • country_code

    Two letter country code being whitelisted, authorized or blocked.

  • sid

    An alphanumeric string identifying this resource.

  • country_name

    Name of the country.

  • date_created

    The date this block was created.

  • sms_enabled

    SMS status for the destination. If false, all SMS activity will be rejected or disabled.

  • country_prefix

    Prefix of the destination being blocked.

Response parameters for recordings are equal to those on "View Recording" API call.







Authorize Destination

authorizes previously blocked destination for outbound calls and sms messages

https://api.zang.io/v2/Accounts/:AccountSid/Fraud/Authorize/:CountryCode.json
Path Params
  • CountryCode: required

    Country code.

Query Params
  • MobileEnabled:

    Mobile status for the destination. If false, all mobile call activity will be rejected or disabled. Allowed values are "true" and "false".

  • LandlineEnabled

    Landline status for the destination. If false, all landline call activity will be rejected or disabled. Allowed values are "true" and "false".

  • SmsEnabled:

    SMS status for the destination. If false, all SMS activity will be rejected or disabled. Allowed values are "true" and "false".

Used to authorize previously blocked destinations for outbound calls and sms messages. Authorize is only meant to provide temporary permission: see the whitelist docs if you want to permanently enable a destinations. Unless extended, authorized destination will expire after 30 days.

Response Parameters

Response parameters are equal to those on "Block Destination" API call.







Extend Destination Authorization

extends a destinations authorization expiration by 30 days

https://api.zang.io/v2/Accounts/:AccountSid/Fraud/Extend/:CountryCode.json
Path Params
  • CountryCode: required

    Country code.

By default, individuals from all destinations can call in or SMS your Avaya Communications APIs numbers. However, if our fraud system detects unusual volume or activity from a certain destination, we may block that destination as a precaution. Whitelisting is provided for destinations you wish to permanently authorize that may have been blocked by our automated fraud detection system. Another reason you may add a destination to the whitelist is to specifically define activity permissions (allow/disallow SMS, Mobile, or Landline) for that destination.

Response Parameters

Response parameters are equal to those on "Block Destination" API call.







Whitelist Destination

permanently authorizes destination that may have been blocked by our automated fraud detection system

https://api.zang.io/v2/Accounts/:AccountSid/Fraud/Whitelist/:CountryCode.json
Path Params
  • CountryCode: required

    Country code.

Query Params
  • MobileEnabled:

    Mobile status for the destination. If false, all mobile call activity will be rejected or disabled. Allowed values are "true" and "false".

  • LandlineEnabled

    Landline status for the destination. If false, all landline call activity will be rejected or disabled. Allowed values are "true" and "false".

  • SmsEnabled:

    SMS status for the destination. If false, all SMS activity will be rejected or disabled. Allowed values are "true" and "false".

By default, individuals from all destinations can call in or SMS your Avaya Communications APIs numbers. However, if our fraud system detects unusual volume or activity from a certain destination, we may block that destination as a precaution. Whitelisting is provided for destinations you wish to permanently authorize that may have been blocked by our automated fraud detection system. Another reason you may add a destination to the whitelist is to specifically define activity permissions (allow/disallow SMS, Mobile, or Landline) for that destination.

Response Parameters

Response parameters are equal to those on "Block Destination" API call.







List Fraud Control Resources

shows information on all fraud control resources associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/Fraud.json
Query Params
  • Page:

    Used to return a particular page within the list.

  • PageSize

    Used to specify the amount of list items to return per page.

  • SmsEnabled:

    SMS status for the destination. If false, all SMS activity will be rejected or disabled. Allowed values are "true" and "false".

Response Parameters

Parameter
  • max_outbound_rate

    The price limit an outbound call may be. Calls which cost more will be rejected.

  • country_name

    Full name of the destination being whitelisted, authorized or blocked.

  • country_code

    Two letter country code being whitelisted, authorized or blocked.

  • country_prefix

    Prefix of the destination being whitelisted, authorized or blocked.

  • mobile_enabled

    Mobile status for the destination. If false, all mobile call activity will be rejected or disabled.

  • landline_enabled

    Landline status for the destination. If false, all landline call activity will be rejected or disabled.

  • sms_enabled

    Status of the SMS for destination. Can be true or false. If false, SMS for same destination will be rejected.

  • date_created

    The date the fraud control resource was created.

  • date_updated

    The date the fraud control resource was last updated.

  • expiration_date

    The date the fraud control resource will expire.

  • is_lock

    Specifies whether the destinations permission state (blocked, whitelisted, etc.) has been locked by our system. Currently, the US is locked as a whitelisted destination.

Listing Response Parameters

Parameter
  • first_page_uri

    URI for the first page of results.

  • end

    Last result index.

  • total

    Number of items.

  • previous_page_uri

    URI for the previous page of results.

  • num_pages

    Number of pages.

  • uri

    The Uniform Resource Identifier to this resource.

  • page_size

    Number of items on a single page.

  • start

    Index of the first item on the current page.

  • next_page_uri

    URI for the next page of the results.

  • last_page_uri

    URI for the last page of the results.

  • page

    Current page number.

  • frauds

    Object containing fraud control resources.

API Explorer

Required Parameters

The unique identifier of each usage resource

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page
Only list SMS messages sent to this number
Only list SMS messages sent from this number
Only list SMS messages sent in the specified date range

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page
Only list MMS messages sent to this number
Only list MMS messages sent from this number
Only list MMS messages sent in the specified date range

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page
Only list calls to this number
Only list calls from this number
Only list calls starting within the specified date range
The unique identifier of each sms message resource

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page
Only return conferences with the specified FriendlyName

Optional Parameters

URL requested once the call connects
URL requested if the voice URL is not available
URL that can be requested every 60 seconds during the call to notify of elapsed time
URL requested when an SMS is received
URL requested if the sms URL is not available
lookup the callers callerID from a CNAM database

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page
Only return conferences with the specified FriendlyName
The unique identifier of each sms message resource
The unique identifier of each mms message resource
The unique identifier of each call resource
The unique identifier of each call resource

Optional Parameters

URL the in-progress call will be redirected to
The method used to request the above Url parameter
Status to set the in-progress call to
The unique identifier of each call resource
DTMF digits to play to the call. 0-9, #, *, W, or w

Optional Parameters

The leg of the call DTMF digits should be sent to
The unique identifier of each call resource
URL to sound that should be played

Optional Parameters

Time limit in seconds for audio play back
The leg of the call audio will be played to
Repeat audio playback indefinitely
If false, all other audio will be muted
The unique identifier of each call resource

Optional Parameters

value between -14 and 14
value between -1 and 1
value greater than 0
value greater than 0
value greater than 0
The unique identifier of each call resource
Set true to initiate recording or false to terminate recording

Optional Parameters

The leg of the call to record
Time in seconds the recording duration should not exceed
URL consulted after the recording completes
Format of the recording file. Can be .mp3 or .wav
The unique identifier of each conference resource
The unique identifier of each conference resource
The unique identifier of each participant resource
The unique identifier of each conference resource
The unique identifier of each participant resource

Optional Parameters

The unique identifier of each conference resource

Optional Parameters

Which page of the overall response will be returned. Zero indexed
Number of individual resources listed in the response per page
The unique identifier of each conference resource
The unique identifier of each participant call resource
The unique identifier of each conference resource
The unique identifier of each participant resource
The unique identifier of each participant resource
The unique identifier of each application resource
The unique identifier of each application resource

Optional Parameters

URL requested once the call connects
URL requested if the voice URL is not available
URL that can be requested every 60 seconds during the call to notify of elapsed time
URL requested when an SMS is received
URL requested if the sms URL is not available
lookup the callers callerID from a CNAM database
The unique identifier of each application client resource
The unique identifier of each incoming phone number resource
The SMS enabled Avaya Communications APIs number to send this message from
The SMS enabled Avaya Communications APIs number to send this message from
The message to be sent

Optional Parameters

The number to send this MMS from
The number to send the MMS to
URL where the multimedia to be sent is located

Optional Parameters

The message to be sent
The number to display on Caller ID as calling
The number to call
URL requested once the call connects

Optional Parameters

URL requested if the initial Url parameter fails or encounters an error
URL requested if the initial Url parameter fails or encounters an error
URL that can be requested every 60 seconds during the call to notify of elapsed time
The forwarding number to pass to the receiving carrier
Time (in seconds) Avaya Communications APIs should wait while the call is ringing before canceling the call
DTMF Digits to play to the call once it connects. 0-9, #, or *
Specifies if the caller id will be hidden
Specifies if the call should be recorded
Recording parameters will be sent here upon completion
Specifies if the call should be recorded
Specifies if the call recording should be transcribed
Transcription parameters will be sent here upon completion
Should this call be sent directly to the receivers voicemail
How Avaya Communications APIs should handle the receiving numbers voicemail machine
URL requested when ifMachine=redirect
Should this call be sent directly to the receivers voicemail