Overview

Interacting with Zang to perform all of your telephony needs is as simple as visiting a website. Experience with REST is useful when developing with Zang, but it is not required. We do our best to provide as much information needed for working with our REST API in our documentation. With so many possibilities and mash-up ideas, the sky is the limit to the things you can do using Zang's REST functionalities. Our REST API can initiate calls, buy phone numbers, send SMS messages, get detailed information about account activity, create conference calls, and much more! Dive into our documentation to learn about all of the capabilities our API can provide.

Base URL

All URLs for interacting with Zang have the following base URL:

https://api.zang.io/v2/

Appending the end of this base URL with different paths allows different types of interactions. HTTP methods like: GET, POST, or DELETE are used, along with a few parameters, to achieve the desired action or response from Zang.

Authentication

HTTP requests to the Zang REST API are protected with HTTP Basic authentication. Your Account SID is the username and your AuthToken is the password for HTTP Basic authentication. These can be found in the Dashboard of your account. Do not share these with anyone!

Making a Call

Making a call can be done a couple of ways. The following steps explain how to make a call using our API Explorer:

  1. Go to your Dashboard
  2. Select Developers > API
  3. Select Calls > Make Call
  4. Enter a 'From' number. For this example, let's use 908-289-4888.
  5. Enter a 'To' number. For this example, enter your mobile number.
  6. Enter a URL. For this example, let's use http://www.zang.io/ivr/welcome/call.
  7. Click 'Make Request'.

If you have done this correctly, you will receive a call from 908-289-4888 and the following message will play when the call is answered:


    <Response>
      <Say>Welcome to your new Zang Account.</Say>
      <Say voice="woman">Let us know if we can help you in any way during your development.</Say>
    </Response>
                          

Sending an Sms

Sending an SMS can be done a couple of ways. We'll show you how to send an SMS via our API Explorer and using cURL. To send an SMS using our API Explorer, follow these steps:

  1. Go to your Dashboard > Developers > API Explorer.
  2. Select SMS > Send SMS
  3. Select an SMS-enabled Zang number from the drop down menu under 'From'
  4. Enter a 'To' number. For this example, use your mobile phone number.
  5. Enter a 'Body'. For this example, let's use the following: Test from Zang!
  6. Click 'Make Request'.

Here's a helpful hint if you are making a call or sending an SMS using the API Explorer. Once you have completed steps 1 thru 6 from above for making a call or sending an SMS, scroll down to the cURL example before clicking on 'Make Request'. The cURL will be pre-populated with the appropriate parameters and authentication for you to use. Feel free to copy and paste this into your terminal to make a call or send an SMS using cURL.

That's all there is to it! Please check out the rest of the documentation and feel free to experiment. If you run into any issues, feel free to contact our support team: support@zang.io.

If you have done this correctly, you will receive an SMS from one of your SMS-enabled Zang with the following message:


    <Response>
      <Sms>Welcome to Zang! Let us know if we can help you in any way during your development.</Sms>
    </Response>
                          

Request

The following are important details about making requests with the Zang REST API.

Access Protocol

Zang only uses the HTTPS (https://) protocol. Making requests to the API with the HTTP (http://) protocol is not supported.

Authentication

Your AccountSid and AuthToken can be found in your Dashboard. In order to interact with the Zang REST API, your credentials (AccountSid and AuthToken) are required. Do not share these with anyone!

To authenticate when accessing Zang REST resources, you will need to either use an HTTP client library such as a CURL or HTTP basic authorization. For example:

https://{AccountSid}:{AuthToken}@api.zang.io/v2

Response

When you make a request to Zang, it will always return a response regarding the resources you have requested, created, or modified. These responses can be in a few different formats: XML, JSON, or CSV.

When something goes wrong during a request, Zang responds with an HTTP status code. A message describing what went wrong and an error code and link to more information regarding the error. Below is an example of an exception response returned by Zang 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 Zang. 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 2016 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 2016 17:29:06 -0000</StartTime>
          <DateCreated>Sun, 15 May 2016 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 2016 17:29:13 -0000</EndTime>
          <PhoneNumberSid></PhoneNumberSid>
        </Call>
    </Response>
                                    

JSON Response

To enable a JSON response, simply apply .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 right.

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

JSON Response


    {
      "date_updated": "Sun, 15 May 2016 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 2016 17:29:06 -0000",
      "date_created": "Sun, 15 May 2016 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 2016 17:29:13 -0000",
      "phone_number_sid": ""
    }  
                                    

CSV Response

To receive a CSV (Comma Separated Value) response, .csv can be appended at the end of your request URL. Data in a 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 2016 17:29:13 -0000,{CallSid},7,Unavailable,+12223334444,+15556667777,false,nobody,{CallSid},,0.00,v2,canceled,outbound-dial,Sun, 15 May 2016 17:29:06 -0000,Sun, 15 May 2016 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 2016 17:29:13 -0000,
                                    

Response Paging

Requests to Zang asking for lists will sometimes receive very large responses. To help with navigating through this data, Zang breaks larger responses up into pages and provides paging information in each response.

Property
  • page

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

  • pagesize

    The amount of items contained within a single page. Default is 50 items.

  • numsize

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

  • total

    The total amount of items returned in the response.

  • 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 to the current page being viewed.

  • 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 designate that a particular page or pagesize should be returned. An example of the response returned when using these optional parameters is below.

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 2016 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 2016 22:34:17 -0000</StartTime>
            <DateCreated>Wed, 11 May 2016 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 2016 22:34:54 -0000</EndTime>
            <PhoneNumberSid></PhoneNumberSid>
          </Call>
          <Call>
            <DateUpdated>Wed, 11 May 2016 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 2016 22:33:37 -0000</StartTime>
            <DateCreated>Wed, 11 May 2016 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 2016 22:34:54 -0000</EndTime>
            <PhoneNumberSid></PhoneNumberSid>
          </Call>
        </Calls>
      </Response>
                                    

Workflow

Zang 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 Zang portal, Zang Workflow does not require installation or configuration by its users.

We encourage you to visit the Workflow documentation for more information: https://workflow.zang.io/EngagementDesignerZang/Designer/help/index.html?task=Core%20tasks







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.

  • 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".

  • 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.

  • 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 Zang 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 Zang 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 Zang 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 Zang 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. In order to resolve issues please visit "Notifications" located at Zang dashboard.

Making a SIP Call

Zang offers 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

Zang offers 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.

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 Zang number calling, or being called. If no Zang 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 Zang. "inbound" for calls to Zang, "outbound-api" for calls from the Zang via REST request, or "outbound-dial" for calls from Zang 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".

  • 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.

Zang provides 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.

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 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.

  • 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 "hybrid" for human-reviewed transcriptions - 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/Play.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.

  • Pitch:

    Sets the pitch. The lower the value, the lower the tone. Allowed values are integers greater than 0.

  • PitchSemiTones:

    Changes the pitch of audio in semitone intervals. Allowed values are integers between -14 and 14.

  • PitchOctaves:

    Changes the pitch of the audio in octave intervals. Allowed values are integers between -1 and 1.

  • Rate:

    Sets the rate. The lower the value, the lower the rate. Allowed values are integers greater than 0.

  • Tempo:

    Sets the tempo. The lower the value, the slower the tempo. Allowed values are integers greater than 0.

The Pitch value will override the PitchSemiTones value.

Response Parameters

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







View SMS

shows info on SMS message

https://api.zang.io/v2/Accounts/:AccountSid/SMS/Messages/:SMSMessageSid.json
Path Params
  • SMSMessageSid: required

    SMS message SID.

The Direction parameter returns one of the following:

  1. "outbound-api" - the SMS was sent from the REST API
  2. "incoming" - the SMS was sent from an incoming phone number to Zang
  3. "outbound-call" - the SMS was sent from InboundXML initiated by outbound call
  4. "outbound-reply" - the SMS was sent from InboundXML initiated by an SMS reply

Response Parameters

Parameter
  • api_version

    The Api Version being used.

  • sid

    An alphanumeric string identifying this resource.

  • account_sid:

    An alphanumeric string identifying the account this call occurred through.

  • date_created

    The date the SMS resource was created.

  • date_updated

    The date the SMS resource was last updated.

  • date_sent

    The date the SMS was sent.

  • to

    The date the SMS was sent.

  • from

    The number that sent the SMS message.

  • body

    Text of the SMS message sent or received. May be up to 160 characters in length.

  • status

    Status of the SMS: sent, sending, queued, or failed.

  • direction

    Specifies the direction of the SMS: messages from REST API are “outbound-api”, messages from incoming phone numbers to Zang are “incoming”, messages from InboundXML initiated during an outbound call are “outbound-call”, and messages from InboundXML initiated via an sms reply are “outbound-reply”.

  • price

    Cost of the SMS.

  • uri

    The Uniform Resource Identifier to this resource.







List SMS

shows info on all SMS messages associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/SMS/Messages.json
Query Params
  • To:

    List all SMS sent to this number. The value does not have to be in any specific format.

  • From:

    List all SMS sent from this number. The value does not have to be in any specific format.

  • DateSent:

    Lists all SMS messages sent beginning on or from a certain date. Date ranges can also be used, such as "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.

  • sms_messages

    Array containing SMS messages.

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







Send SMS

send SMS message

https://api.zang.io/v2/Accounts/{AccountSID}/SMS/Messages.json
Body Params
  • To: required

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

  • Body: required

    Text of the SMS to be sent.

  • From:

    Must be a Zang number associated with your account. The value does not have to be in any specific format.

  • StatusCallback:

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

  • StatusCallbackMethod:

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

  • AllowMultiple:

    If the Body length is greater than 160 characters, the SMS will be sent as a multi-part SMS. Allowed values are True or False.

Response Parameters

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







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 a Zang 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, avi, flv

The media size limit is 5MB. 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, feel free to contact our support team: support@zang.io.







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 Zang. 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 (Hybrid)

    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 Zang 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 Zang 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.







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 should be muted. 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 info on a Zang 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

shows info on all SMS messages associated with some account

https://api.zang.io/v2/Accounts/:AccountSid/SMS/Messages.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 Zang 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 Zang 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 Zang 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.







Create Application Client

creates a new application client for your application

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

    Application SID.

Body Params
  • Nickname: required

    The name used to identify this application client.

Zang offers the ability to create multiple SIP credentials associated with a single application. Application client details can be accessed at a resource URI beginning with the Zang base URL and ending with a unique application SID and the parameter Clients.

Response Parameters

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







View Application Client

View all information about an application client

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

    Application SID.

  • ClientSid: required

    Client Sid.

Response Parameters

Parameter
  • sid

    An alphanumeric string identifying this resource.

  • nickname

    Nickname of the client.

  • account_sid

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

  • date_created

    The date the application resource was created.

  • date_updated

    The date the application resource was last updated.

  • application_sid

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

  • presence_status

    The current status of the client. Possible Values: init, idle, loggedin, loggedout.

  • client_password

    A one-time password.

  • remote_ip

    The IP address of the connecting machine.

  • api_version

    The API version used with this application.

  • uri

    The Uniform Resource Identifier to this resource.







List Application Clients

lists available application clients

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

    Application 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.

  • clients

    Array containing application clients.

Response parameters for application clients are equal to those on "View Application Client" API call.







Getting Started

With SIP Registration you can connect your SIP-enabled devices or soft phones directly to Zang Cloud 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. Zang will send REGISTER request 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 just like any incoming SIP call received on a Zang 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 Zang, you will use the same InboundXML or REST API calls you use today. Here’s a simple example how to receive a call to your Zang enabled SIP device. Simply buy a Zang phone number, create an InboundXML script that will ring your SIP Domain, and point the InboundXML script to your newly purchased Zang phone number. Note: yourusername MUST match one of the usernames specified in your Credential Lists.

Need Help?

If you run into any issues, feel free to contact our support team: support@zang.io.







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 Zang.

  • 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 Zang 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 Zang 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 Zang will use to send you status notifications regarding your SIP call.

  • VoiceStatusCallbackMethod:

    The URL that Zang 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 Zang will use to send you status notifications regarding your SIP call.

  • VoiceStatusCallbackMethod:

    The URL that Zang 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 Params
  • CLSid: required

    Credentials list SID.


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 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.

  • 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 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.







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.







View Number

shows info on an incoming phone number

https://api.zang.io/v2/Accounts/AccountSid/IncomingPhoneNumbers/IncomingNumberSid
Path Params
  • IncomingNumberSid: required

    Incoming number SID.

Zang 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 Zang number (local, international, etc.).

  • 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 Zang 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

purchases a new incoming number

https://api.zang.io/version/Accounts/AccountSid/IncomingPhoneNumbers.json
Body Params
  • AreaCode:

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

  • 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 Zang 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 Zang 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.

Zang 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.







Update Number

updates an incoming phone number data

https://api.zang.io/2/Accounts/:AccountSid/IncomingPhoneNumbers/: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 Zang 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 Zang 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.


Response Parameters

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







Delete Number

deletes an incoming phone number

https://api.zang.io/2/Accounts/:AccountSid/IncomingPhoneNumbers/: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 a Zang 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 "hybrid" for human-reviewed transcriptions - 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 Zang 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 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 Zang 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 hybrid. 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 Zang 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 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.

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", "hybrid" and "keywords", where "auto" is a machine-generated transcription, "hybrid" is reviewed by a human for accuracy and "keywords" returns topics and keywords for 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", "hybrid" and "keywords", where "auto" is a machine-generated transcription, "hybrid" is reviewed by a human for accuracy and "keywords" returns topics and keywords for 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
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.

  • 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/2/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.

Zang provides a way to list all carrier lookups which have previously occurred on through a Zang 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/2/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.

Zang provides a way to lookup 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/2/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.

Zang provides a way to list all CNAM lookups which have previously occurred on through a Zang 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/2/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.

Zang provides 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/2/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.

Zang provides a way to list all BNA lookups which have previously occurred on through a Zang 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/Recordings.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 Zang 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 Zang 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 Zang number to send this message from
The SMS enabled Zang 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) Zang 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 Zang should handle the receiving numbers voicemail machine
URL requested when ifMachine=redirect
Should this call be sent directly to the receivers voicemail