Upgrade 3CX to v18 and get it hosted free!

Voice2Phone Outbound Call API

Author image

Company: Voice2Phone Software Inc
E-mail: [email protected]

Getting Started

The Voice2Phone Outbound Calling API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.

  1. Your app makes a HTTP request to Voice2Phone
  2. Voice2Phone initiates an outbound phone call
  3. Your end user receives the call

Authentication

API keys allow apps to make requests to Voice2Phone Call API on the behalf of a user. Each API key is unique to the user, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth. API keys do not expire, but they may be regenerated by the user. Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail. Your secret API key can be found when you login to your account.

API Responses

Voice2Phone Outbound Call API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided, and codes in the 5xx range indicate an error with Voice2Phone’s servers (these are rare).

200 – OK Everything worked as expected.
400 – Bad Request The request was unacceptable, often due to missing a required parameter.
401 – Unauthorized No valid API key provided.
402 – Request Failed The parameters were valid but the request failed.
404 – Not Found The requested resource doesn’t exist.
429 – Too Many Requests Too many requests hit the API too quickly.
500, 502, 503, 504 – Server Errors Something went wrong on Voice2Phone’s end. (These are rare.)

 

Make an Outbound Phone Call

The following API enables you to make a single call to a landline phone or cell phone.

Request


POST https://api.voice2phone.com/call

Header


Authorization: Your API key
Content-Type: application/json

Body


{
    Phone:
    {
        "Number":"4252337837",
        "CountryCode":"US"
    },
    Message: "Please press one",
    
    Dtmf:
    {
        "1"     : "Thank you"
    }
}

Arguments

Phone.Number (mandatory) The phone number to call. The phone number can be in local or international format.
Phone.CountryCode (mandatory) The ISO code A2 of the country. For example: US, CA, GB etc.
Message (mandatory) The text to be played during a call using text-to-speech engine.
Dtmf (optional) Provides a mapping from a touch-key to a message.

 

Response

HTTP Status Code: 200 OK


{
    CallId : "54b16dd7-8e68-4a2a-973d-063e39a6998c"
}

Get Call Status

The following API enables you to get information about a call

Request


GET https://api.voice2phone.com/call/{callId}

Header


Authorization: Your API key 

Response

HTTP Status Code: 200 OK


{
  "CallId": "54b16dd7-8e68-4a2a-973d-063e39a6998c",
  "Status": 2,
  "CreatedDateUtc": "2016-08-01T18:33:08.997",
  "UpdatedDateUtc": "2016-08-01T18:33:08.997",
  "Dtmf": "1"
}

Fields

Status The phone number to call. The phone number can be in local or international format.
CreatedDateUtc The ISO code A2 of the country. For example: US, CA, GB etc.
UpdatedDateUtc The text to be played during a call using text-to-speech engine.
Dtmf Provides a mapping from a touch-key to a message.

Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.