Applications

You can use the API to manage features of applications in your project.

Get Numbers

Get information about your numbers. It returns a list of numbers that you own, as well as their capability (voice or SMS). For the ones that are assigned to an app, it returns the application key of the app.

SecurityBasic or Signed
Responses
200

A success response, or an Error.

Response Schema: application/json
Array of objects
Default: "numbers"

The object type. Will always be list of numbers, associated application keys and capabilities

Array
number
string

Numbers that you own in E.164 format.

applicationkey
string

Indicates the application where the number(s) will be assigned. If no number is assigned the applicationkey will not be returned.

capability
string

indicates the DID capability that needs to be assigned to the chosen application. Valid values are 'voice' and 'sms'. Please note that the DID needs to support the selected capability.

Enum: "voice" "sms"
get/v1/configuration/numbers
Request samples
Response samples
application/json
{
  • "numbers": [
    • {
      },
    • {
      },
    • {
      }
    ]
}

Update Numbers

Assign a number or a list of numbers to an application.

SecurityBasic or Signed
Request
Request Body schema: application/json
numbers
Array of strings [ 1 .. 100 ] items

The phone number or list of numbers in E.164 format.

applicationkey
string

indicates the application where the number(s) will be assigned. If empty, the application key that is used to sign the request will be used.

capability
string

indicates the DID capability that needs to be assigned to the chosen application. Valid values are 'voice' and 'sms'. Please note that the DID needs to support the selected capability.

Enum: "voice" "sms"
Responses
204

A success response, or an Error.

post/v1/configuration/numbers
Request samples
application/json
{
  • "numbers": "+14151112223333",
  • "applicationkey": "11983f76-12c8-1111-9515-4785c7b67ca8",
  • "capability": "voice"
}

Un-assign number

Un-assign a number from an application.

SecurityBasic or Signed
Request
Request Body schema: application/json
number
string

The phone number in E.164 format (https://en.wikipedia.org/wiki/E.164)

applicationkey
string

Indicates the application where the number(s) was assigned. dIf empty, the application key that is used to sign the request will be used.

capability
string

(optional) indicates the DID capability that was assigned to the chosen application. Please note that the DID needs to support the selected capability.

Enum: "voice" "sms"
Responses
204

A success response, or an Error.

delete/v1/configuration/numbers
Request samples
application/json
{
  • "numbers": "+14151112223333",
  • "applicationkey": "11983f76-12c8-1111-9515-4785c7b67ca8",
  • "capability": "voice"
}

Get Callback URLs

Returns any callback URLs configured for the specified application.

SecurityBasic or Signed
Request
path Parameters
applicationkey
required
string

The unique identifying key of the application.

Example: 94983f76-1161-6655-9515-4785c7b67dd8
Responses
200

A success response, or an Error.

Response Schema: application/json
object

Gets primary and if configured fallback callback URLs

primary
string

Your primary callback URL

fallback
string

Your fallback callback URL (returned if configured). It is used only if Sinch platform gets a timeout or error from your primary callback URL.

get/v1/configuration/callbacks/applications/{applicationkey}
Request samples
Response samples
application/json
{}

Update Callbacks

Update the configured callback URLs for the specified application.

SecurityBasic or Signed
Request
path Parameters
applicationkey
required
string

The unique identifying key of the application.

Example: 94983f76-1161-6655-9515-4785c7b67dd8
Request Body schema: application/json
object

Contains primary and or fallback callback URLs

primary
string

Your primary callback URL

fallback
string

Your fallback callback URL

Responses
204

A success response, or an Error.

post/v1/configuration/callbacks/applications/{applicationkey}
Request samples
application/json
{}

Query number

Returns information about the requested number.

SecurityBasic or Signed
Request
path Parameters
number
required
string

The phone number you want to query.

Example: +46730170101
Responses
200

A success response, or an Error.

Response Schema: application/json
method
string

The type of method.

object

The number item object.

get/v1/calling/query/number/{number}
Request samples
Response samples
application/json
{
  • "method": "numberItem",
  • "numberItem": {
    • "countryId": "SE",
    • "numberType": "Mobile",
    • "normalizedNumber": "+14151112223333",
    • "restricted": false,
    • "rate": {
      }
    }
}