Download OpenAPI specification:Download

SIP Trunks

The SIP Trunks endpoint has operations that allow you to create, view, update, and remove SIP trunks.

Create SIP trunk

Creates a new SIP trunk.

SecurityBasic or OAuth2.0
Request
Request Body schema: application/json
required
name
required
string

The friendly name of your SIP trunk.

hostName
required
string

The host of the domain you would like to have for you trunk.

enableCallerName
boolean
Default: false

Enable caller name lookup for incoming calls. US and canada only.

Responses
201

SIP trunk created successfully

Response Schema: application/json
name
required
string

The friendly name of your SIP trunk.

hostName
required
string

The host of the domain you would like to have for you trunk.

id
string

The SIP trunk id.

topLevelDomain
string

The top level domain to which the SIP trunk belongs.

domain
string

The fully qualified name of the domain, which is a combination of your 'hostName' and the 'topLevelDomain'.

callsPerSecond
integer >= 1
Default: 1

Number of calls started per second, to increase this please contact your account manager.

enableCallerName
boolean
Default: false

Enable caller name lookup for incoming calls. US and canada only.

createTime
string <date-time>

The date and time that the SIP trunk was created.

updateTime
string <date-time>

The date and time that the SIP trunk was last modified.

projectId
string

The ID of the account.

post/trunks
Request samples
application/json
{
  • "hostName": "acme-domain-1",
  • "name": "Acme Trunk"
}
Response samples
application/json
{
  • "id": "",
  • "hostName": "acme-domain-1",
  • "topLevelDomain": ".elastic-sip.sinch.com",
  • "domain": "acme-domain-1.elastic-sip.sinch.com",
  • "name": "Acme Trunk",
  • "callsPerSecond": 100,
  • "enableCallerName": true,
  • "createTime": "2022-01-01T00:00:00Z",
  • "updateTime": "2022-01-01T00:00:00Z",
  • "projectId": "1bf62742-7b84-4666-9cbe-8e5734fd57d0"
}

List SIP trunks

Returns a list of all SIP trunks. If you specify pagination settings, the list of SIP trunks can be returned separated and sorted into pages.

SecurityBasic or OAuth2.0
Request
query Parameters
page
integer
Default: 1

The page you want to fetch, can set to 1 for first page, or omitted for first page

pageSize
integer [ 1 .. 500 ]
Default: 500

The size of each page to fetch

domain
string

Filter by domain

Responses
200

Request completed successfully

Response Schema: application/json
totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

Array of objects (SipTrunk)

The list of SIP trunks that matches the query parameters.

get/trunks
Request samples
Response samples
application/json
{
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500,
  • "trunks": [
    • {
      }
    ]
}

Get SIP Trunk

Search for a SIP trunk by ID.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

Responses
200

SIP trunk found successfully

Response Schema: application/json
name
required
string

The friendly name of your SIP trunk.

hostName
required
string

The host of the domain you would like to have for you trunk.

id
string

The SIP trunk id.

topLevelDomain
string

The top level domain to which the SIP trunk belongs.

domain
string

The fully qualified name of the domain, which is a combination of your 'hostName' and the 'topLevelDomain'.

callsPerSecond
integer >= 1
Default: 1

Number of calls started per second, to increase this please contact your account manager.

enableCallerName
boolean
Default: false

Enable caller name lookup for incoming calls. US and canada only.

createTime
string <date-time>

The date and time that the SIP trunk was created.

updateTime
string <date-time>

The date and time that the SIP trunk was last modified.

projectId
string

The ID of the account.

get/trunks/{sipTrunkId}
Request samples
Response samples
application/json
{
  • "id": "",
  • "hostName": "acme-domain-1",
  • "topLevelDomain": ".elastic-sip.sinch.com",
  • "domain": "acme-domain-1.elastic-sip.sinch.com",
  • "name": "Acme Trunk",
  • "callsPerSecond": 100,
  • "enableCallerName": true,
  • "createTime": "2022-01-01T00:00:00Z",
  • "updateTime": "2022-01-01T00:00:00Z",
  • "projectId": "1bf62742-7b84-4666-9cbe-8e5734fd57d0"
}

Update SIP trunk

Update an existing SIP Trunk by ID. The whole object must be sent. Any missing fields will be set to null.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

Request Body schema: application/json
required
name
required
string

The friendly name of your SIP trunk.

hostName
required
string

The host of the domain you would like to have for you trunk.

enableCallerName
boolean
Default: false

Enable caller name lookup for incoming calls. US and canada only.

Responses
200

SIP trunk updated successfully

Response Schema: application/json
name
required
string

The friendly name of your SIP trunk.

hostName
required
string

The host of the domain you would like to have for you trunk.

id
string

The SIP trunk id.

topLevelDomain
string

The top level domain to which the SIP trunk belongs.

domain
string

The fully qualified name of the domain, which is a combination of your 'hostName' and the 'topLevelDomain'.

callsPerSecond
integer >= 1
Default: 1

Number of calls started per second, to increase this please contact your account manager.

enableCallerName
boolean
Default: false

Enable caller name lookup for incoming calls. US and canada only.

createTime
string <date-time>

The date and time that the SIP trunk was created.

updateTime
string <date-time>

The date and time that the SIP trunk was last modified.

projectId
string

The ID of the account.

put/trunks/{sipTrunkId}
Request samples
application/json
{
  • "hostName": "acme-domain-1",
  • "name": "Acme Trunk"
}
Response samples
application/json
{
  • "id": "",
  • "hostName": "acme-domain-1",
  • "topLevelDomain": ".elastic-sip.sinch.com",
  • "domain": "acme-domain-1.elastic-sip.sinch.com",
  • "name": "Acme Trunk",
  • "callsPerSecond": 100,
  • "enableCallerName": true,
  • "createTime": "2022-01-01T00:00:00Z",
  • "updateTime": "2022-01-01T00:00:00Z",
  • "projectId": "1bf62742-7b84-4666-9cbe-8e5734fd57d0"
}

Delete SIP trunk

Delete a SIP trunk by its ID.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

Responses
204

The SIP trunk deleted successfully

delete/trunks/{sipTrunkId}
Request samples

Add ACL to a trunk

Add an access control list entry to a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Request Body schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList ids

Responses
200

The list of access control list entries

Response Schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList ids

post/trunks/{trunkId}/accessControlLists
Request samples
application/json

Request to add access control lists to a trunk.

{
  • "accessControlListIds": [
    • "01HA2E80QCBX185VVP21PJG9CT",
    • "01H8Y95DBJT31F104PWFVV9H8B"
    ]
}
Response samples
application/json

The access control lists added to a trunk.

{
  • "accessControlListIds": [
    • "01HA2E80QCBX185VVP21PJG9CT",
    • "01H8Y95DBJT31F104PWFVV9H8B"
    ]
}

List all ACLs for a trunk

Get all access control list entries for a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Responses
200

The list of access control list entries

Response Schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList ids

totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/trunks/{trunkId}/accessControlLists
Request samples
Response samples
application/json

All access control lists assigned to a trunk.

{
  • "accessControlListIds": [
    • "01HA2E80QCBX185VVP21PJG9CT"
    ],
  • "pageNumber": 1,
  • "pageSize": 1000,
  • "totalItems": 1
}

Bulk update ACLs for a trunk

Update the list of access control list entries for a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Request Body schema: application/json
Array
string

The ID of the access control list entry.

Responses
200

The list of access control list entries

Response Schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList IDs

put/trunks/{trunkId}/accessControlLists
Request samples
application/json
[
  • "01GNZ9MXEZ4K6S8GB7RW063VAN",
  • "01GNZ9MXEZ4K6S8GB7RW063VAN"
]
Response samples
application/json
{
  • "accessControlListIds": [
    • "01GNZ9MXEZ4K6S8GB7RW063VAN",
    • "01GNZ9MXEZ4K6S8GB7RW063VAN"
    ]
}

Bulk update credential lists for a trunk

Update the list of credential list entries for a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Request Body schema: application/json
Array
string

The ID of the credential list entry.

Responses
200

The list of credential list entries

Response Schema: application/json
credentialListIds
Array of strings

Array of credential list IDs

put/trunks/{trunkId}/credentialLists
Request samples
application/json
[
  • "01GNZ9MXEZ4K6S8GB7RW063VAN",
  • "01GNZ9MXEZ4K6S8GB7RW063VAN"
]
Response samples
application/json
{
  • "credentialListIds": [
    • "01GNZ9MXEZ4K6S8GB7RW063VAN",
    • "01GNZ9MXEZ4K6S8GB7RW063VAN"
    ]
}

Delete ACL from trunk

Remove an access control list entry from a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

accessControlListId
required
string

The ID of the access control list entry. that you want to remove from trunk

Responses
204

Access control list entry deleted

delete/trunks/{trunkId}/accessControlLists/{accessControlListId}
Request samples

SIP Endpoints

A SIP endpoint is the resource that represents your SIP infrastructure, typically an SBC. Note the Elastic SIP Trunk API does not support user registration and presence.

Return SIP endpoints

Returns a list of all SIP endpoints with paging.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

query Parameters
page
integer
Default: 1

The page you want to fetch, can set to 1 for first page, or omitted for first page

pageSize
integer [ 1 .. 500 ]
Default: 500

The size of each page to fetch

Responses
200

A successful response.

Response Schema: application/json
totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

Array of StaticEndpoint (object) or RegisteredEndpoint (object) (SipEndpoint)
get/trunks/{sipTrunkId}/endpoints
Request samples
Response samples
application/json
{
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500,
  • "endpoints": [
    • {
      }
    ]
}

Create SIP endpoint

Create a new SIP endpoint.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

Request Body schema: application/json
One of:

A SIP endpoint which is the address of your SIP infrastructure. SIP endpoints can be one of two types: static endpoints or registered endpoints.

Endpoint Description
Static endpoints Static endpoints are defined by a static value which can either be an IP address or a domain name.
Registered endpoints Registered endpoints use a credential list to determine the endpoint.

address
required
string

The address of the SIP endpoint can be an IP address or a domain name. EST uses IP authentication and will only accept calls from the specified address or domain.

name
required
string

The friendly name of the SIP endpoint.

priority
required
integer <int32> >= 1

Inbound call routing priority. If two or more endpoints have the same priority, calls will be routed to them using a round-robin strategy.

port
integer <int32> [ 1 .. 65535 ]
Default: 5060

The port of the SIP endpoint.

transport
string
Default: "UDP"

The transport protocol of the SIP endpoint.

enabled
boolean
Default: true

Sets whether the SIP endpoint is enabled or not.

post/trunks/{sipTrunkId}/endpoints
Request samples
application/json
{
  • "address": "127.0.0.1",
  • "name": "Acme Endpoint",
  • "priority": 1
}

Get SIP endpoint by ID

Get a SIP endpoint by specifying its ID.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

sipEndpointId
required
integer <int64> >= 0

The ID of the SIP endpoint.

Responses
200

A successful response.

Response Schema: application/json
One of:

A SIP endpoint which is the address of your SIP infrastructure. SIP endpoints can be one of two types: static endpoints or registered endpoints.

Endpoint Description
Static endpoints Static endpoints are defined by a static value which can either be an IP address or a domain name.
Registered endpoints Registered endpoints use a credential list to determine the endpoint.

address
required
string

The address of the SIP endpoint can be an IP address or a domain name. EST uses IP authentication and will only accept calls from the specified address or domain.

name
required
string

The friendly name of the SIP endpoint.

priority
required
integer <int32> >= 1

Inbound call routing priority. If two or more endpoints have the same priority, calls will be routed to them using a round-robin strategy.

port
integer <int32> [ 1 .. 65535 ]
Default: 5060

The port of the SIP endpoint.

id
string

The ID of the SIP endpoint.

sipTrunkId
string

The ID of the SIP trunk to which the endpoint is assigned.

transport
string
Default: "UDP"

The transport protocol of the SIP endpoint.

enabled
boolean
Default: true

Sets whether the SIP endpoint is enabled or not.

createTime
string <date-time>

The date and time that the SIP endpoint was created.

updateTime
string <date-time>

The date and time that the SIP endpoint was last modified.

get/trunks/{sipTrunkId}/endpoints/{sipEndpointId}
Request samples
Response samples
application/json
{
  • "address": "127.0.0.1",
  • "port": 5060,
  • "id": "string",
  • "sipTrunkId": "bbc55c4c-fe25-11ec-8482-d2e74e85a66f",
  • "name": "Acme Endpoint",
  • "transport": "UDP",
  • "priority": 1,
  • "enabled": true,
  • "createTime": "2022-01-01T00:00:00Z",
  • "updateTime": "2022-01-01T00:00:00Z"
}

Update existing SIP endpoint

Updated an existing SIP endpoint by specifying its ID.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

sipEndpointId
required
integer <int64> >= 0

The ID of the SIP endpoint.

Request Body schema: application/json
One of:

A SIP endpoint which is the address of your SIP infrastructure. SIP endpoints can be one of two types: static endpoints or registered endpoints.

Endpoint Description
Static endpoints Static endpoints are defined by a static value which can either be an IP address or a domain name.
Registered endpoints Registered endpoints use a credential list to determine the endpoint.

address
required
string

The address of the SIP endpoint can be an IP address or a domain name. EST uses IP authentication and will only accept calls from the specified address or domain.

name
required
string

The friendly name of the SIP endpoint.

priority
required
integer <int32> >= 1

Inbound call routing priority. If two or more endpoints have the same priority, calls will be routed to them using a round-robin strategy.

port
integer <int32> [ 1 .. 65535 ]
Default: 5060

The port of the SIP endpoint.

transport
string
Default: "UDP"

The transport protocol of the SIP endpoint.

enabled
boolean
Default: true

Sets whether the SIP endpoint is enabled or not.

Responses
200

A successful response.

Response Schema: application/json
One of:

A SIP endpoint which is the address of your SIP infrastructure. SIP endpoints can be one of two types: static endpoints or registered endpoints.

Endpoint Description
Static endpoints Static endpoints are defined by a static value which can either be an IP address or a domain name.
Registered endpoints Registered endpoints use a credential list to determine the endpoint.

address
required
string

The address of the SIP endpoint can be an IP address or a domain name. EST uses IP authentication and will only accept calls from the specified address or domain.

name
required
string

The friendly name of the SIP endpoint.

priority
required
integer <int32> >= 1

Inbound call routing priority. If two or more endpoints have the same priority, calls will be routed to them using a round-robin strategy.

port
integer <int32> [ 1 .. 65535 ]
Default: 5060

The port of the SIP endpoint.

id
string

The ID of the SIP endpoint.

sipTrunkId
string

The ID of the SIP trunk to which the endpoint is assigned.

transport
string
Default: "UDP"

The transport protocol of the SIP endpoint.

enabled
boolean
Default: true

Sets whether the SIP endpoint is enabled or not.

createTime
string <date-time>

The date and time that the SIP endpoint was created.

updateTime
string <date-time>

The date and time that the SIP endpoint was last modified.

put/trunks/{sipTrunkId}/endpoints/{sipEndpointId}
Request samples
application/json
{
  • "address": "127.0.0.1",
  • "name": "Acme Endpoint",
  • "priority": 1
}
Response samples
application/json
{
  • "address": "127.0.0.1",
  • "port": 5060,
  • "id": "string",
  • "sipTrunkId": "bbc55c4c-fe25-11ec-8482-d2e74e85a66f",
  • "name": "Acme Endpoint",
  • "transport": "UDP",
  • "priority": 1,
  • "enabled": true,
  • "createTime": "2022-01-01T00:00:00Z",
  • "updateTime": "2022-01-01T00:00:00Z"
}

Delete SIP endpoint

Delete a SIP endpoint by specifying its ID.

SecurityBasic or OAuth2.0
Request
path Parameters
sipTrunkId
required
string

The ID of the SIP trunk.

sipEndpointId
required
integer <int64> >= 0

The ID of the SIP endpoint.

Responses
204

SIP endpoint deleted successfully.

delete/trunks/{sipTrunkId}/endpoints/{sipEndpointId}
Request samples

Country Permissions

Country permissions are used to control which countries can be dialed from a specific SIP trunk. You can view, update, and remove country permissions. For beta, only US, CA and wild card are supported. Please note that these permissions are not per trunk but rather they are per project/account. In the future Sinch may extend these permissions to other voice and messaging products. If you are using sub-projects you can use the same country permissions for all sub-projects. You can also specify different country permissions for each sub-project that will override the parent country permissions.

Fetch all country permissions

Fetches the list of country permissions.

SecurityBasic or OAuth2.0
Responses
200

The list of countries available

Response Schema: application/json
Array of objects (CountryPermission)
Array
enabled
required
boolean
Default: true

If the country is enabled or not. When this is enabled regular numbers can be dialed from the account.

isoCode
string <= 2 characters

The ISO code of the country

name
string

Country name in english

continent
string

Continent of the country

countryDialingCodes
Array of strings

The country calling codes as an array, most countries have only one but some have multiple like the San Marino, China, and a few others.

get/countryPermissions
Request samples
Response samples
application/json
{
  • "countryPermissions": [
    • {
      }
    ]
}

Bulk update country permissions

Provides the ability to enable and disable multiple country permissions at once.

SecurityBasic or OAuth2.0
Request
Request Body schema: application/json

Include the countries you want to be enabled. Anything not included will be disabled.

Array of objects (CountryPermission)
Array
enabled
required
boolean
Default: true

If the country is enabled or not. When this is enabled regular numbers can be dialed from the account.

Responses
200

The list of countries enabled

Response Schema: application/json
Array of objects (CountryPermission)
Array
enabled
required
boolean
Default: true

If the country is enabled or not. When this is enabled regular numbers can be dialed from the account.

isoCode
string <= 2 characters

The ISO code of the country

name
string

Country name in english

continent
string

Continent of the country

countryDialingCodes
Array of strings

The country calling codes as an array, most countries have only one but some have multiple like the San Marino, China, and a few others.

put/countryPermissions
Request samples
application/json
{ }
Response samples
application/json
{
  • "countryPermissions": [
    • {
      }
    ]
}

Fetch country permission

Fetches the requested country permission.

SecurityBasic or OAuth2.0
Request
path Parameters
isoCode
required
string

The ISO code of the country.

Responses
200

The returned country permission

Response Schema: application/json
enabled
required
boolean
Default: true

If the country is enabled or not. When this is enabled regular numbers can be dialed from the account.

isoCode
string <= 2 characters

The ISO code of the country

name
string

Country name in english

continent
string

Continent of the country

countryDialingCodes
Array of strings

The country calling codes as an array, most countries have only one but some have multiple like the San Marino, China, and a few others.

get/countryPermissions/{isoCode}
Request samples
Response samples
application/json
{
  • "isoCode": "US",
  • "name": "United States/Canada",
  • "continent": "North America",
  • "countryDialingCodes": [
    • [
      ]
    ],
  • "enabled": true
}

Update country permission

Update the requested country permission.

SecurityBasic or OAuth2.0
Request
path Parameters
isoCode
required
string

The ISO code of the country.

Request Body schema: application/json
enabled
required
boolean
Default: true

If the country is enabled or not. When this is enabled regular numbers can be dialed from the account.

Responses
200

The updated country permission

Response Schema: application/json
enabled
required
boolean
Default: true

If the country is enabled or not. When this is enabled regular numbers can be dialed from the account.

isoCode
string <= 2 characters

The ISO code of the country

name
string

Country name in english

continent
string

Continent of the country

countryDialingCodes
Array of strings

The country calling codes as an array, most countries have only one but some have multiple like the San Marino, China, and a few others.

put/countryPermissions/{isoCode}
Request samples
application/json
{
  • "enabled": true
}
Response samples
application/json
{
  • "isoCode": "US",
  • "name": "United States/Canada",
  • "continent": "North America",
  • "countryDialingCodes": [
    • [
      ]
    ],
  • "enabled": true
}

Phone Numbers

The /phoneNumbers endpoint has operations that allow you to assign and remove phone numbers from SIP trunks.

Get all phone numbers

Get all phone numbers. You can filter and sort the phone numbers returned with paging.

SecurityBasic or OAuth2.0
Request
query Parameters
filter
string

A query string to filter the results by.

sipTrunkId
integer <int64> >= 0

The ID of the SIP trunk to search for.

page
integer
Default: 1

The page you want to fetch, can set to 1 for first page, or omitted for first page

pageSize
integer [ 1 .. 500 ]
Default: 500

The size of each page to fetch

sort
Array of arrays

An array setting the sorting criteria in the format of property,(ascending/descending)

Responses
200

A successful response is an array containing phone numbers.

Response Schema: application/json
totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

Array of objects (Number)
get/phoneNumbers
Request samples
Response samples
application/json
{
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500,
  • "phoneNumbers": [
    • {
      }
    ]
}

Find a specific phone number

Search for an Elastic SIP Trunk-enabled phone number by the e.164 number.

SecurityBasic or OAuth2.0
Request
path Parameters
phoneNumber
required
string

The phone number you want to search for. Must be in E.164 format.

Example: +12225559999
Responses
200

A successful response.

Response Schema: application/json
id
string

The ID of the phone number.

sipTrunkId
string

The ID of the SIP trunk to which the phone number is assigned.

phoneNumber
string (PhoneNumber)

A Sinch phone number on your account and configured for Elastic SIP Trunking.

countryCode
string

The country code of the phone number in ISO 3166-1 alpha-2 format.

createTime
string <date-time>

The date and time that the number was assigned to the SIP trunk.

updateTime
string <date-time>

The date and time that the phone number was last modified.

get/phoneNumbers/{phoneNumber}
Request samples
Response samples
application/json
{
  • "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  • "sipTrunkId": "5RTRZ3NDEKTSV4RRFFQ69G5EWS",
  • "phoneNumber": "+15551239898",
  • "countryCode": "US",
  • "createTime": "2022-01-01T00:00:00Z",
  • "updateTime": "2022-01-01T00:00:00Z"
}

Calls

The /calls endpoint has operations that allow you to retrieve call history and details about calls made or received using EST.

Find calls

Find calls by query parameters.

SecurityBasic or OAuth2.0
Request
query Parameters
from
string <phonenumber>

A phone number that you want to use to filter results. You can pass a partial number to get all calls sent to numbers that start with the number you passed.

to
string <phonenumber>

Only include calls made to this number or address. You can pass a partial number to get all calls sent to numbers that start with the number you passed.

trunkId
string

Only include calls made from this trunk.

createTime
string
Default: "now-24h"

Filter calls based on createTime. You make the query more precise, fewer results will be returned. For example, 2021-02-01 will return all calls from the first of February 2021, and 2021-02-01T14:00:00+0600 will return all calls after 14:00 on the first of February. This field also supports <= and >= to search for calls in a range ?createTime>=2021-10-01&createTime<=2021-10-30 to get a list if calls for october 2021 It is also possible to submit partial dates for example createTime=2021-02 will return all calls for February

Defaults to 24 hours

Internal notes If a customer submits = and not <> we should add min and max for the date range psueodo sql

createTime = 2021-02-01
select * from calls where createTime >= 2021-02-01 and createTime <= 2021-02-01T23:59:59Z

createTime = 2021-02-01T08
select * from calls where createTime >= 2021-02-01T08:00:00 and createTime <= 2021-02-01T08:59:59+0600

but if they submit < or > we should just use the value they submitted and parse it a complete date

Example: createTime=2021-02-01T23:59:59+0600
createTimeStart
string

Filters calls based on the time that the call was created.

Example: createTimeStart=2021-02-01T23:59:59+0600
createTimeEnd
string

Filters calls based on the time that the call ended.

Example: createTimeEnd=2021-02-01T23:59:59+0600
callResult
string (CallResult)

only include calls by on the callResult(s), example callResult=COMPLETED will return all calls which have completed normally.

Enum Value Description
COMPLETED

The call was completed successfully.

NO_ANSWER

The call timeout before the recipient answered.

CANCEL

The call was canceled.

BUSY

The recipient was busy.

FAILED

The call failed.

Example: callResult=COMPLETED
fromCountryCode
string

Filters calls based on the country in which the call originated.

Example: fromCountryCode=US
toCountryCode
string

Filters calls based on the country of the call destination.

Example: toCountryCode=US
emergencyOnly
string

Filters calls based on whether the call was an emergency call or not.

Enum Value Description
true

Only returns calls that are emergency calls.

false

Only returns calls that are not emergency calls.

null

Returns all call types.

Example: emergencyOnly=false
direction
string

only include calls by on the direction(s), example direction=INBOUND,OUTBOUND will return all calls that are inbound or outbound.

Enum Value Description
INBOUND

Somebody called your Sinch number.

OUTBOUND

You called somebody from your SIP device.

page
string

The page you want to fetch

pageSize
integer [ 1 .. 500 ]

The maximum number of items to return per request. The default is 100 and the maximum is 500. If you need to export larger amounts and pagination is not suitable for you can use the Export function in the dashboard.

Responses
200

Call result response

Response Schema: application/json
Array of objects (Call)

The list of calls that matches the query parameters.

totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/calls
Request samples
Response samples
application/json
{
  • "calls": [
    • {
      }
    ],
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500
}

Access Control List

The Access Control List (ACL) endpoint has operations that allow you to create, view, update, and remove ACLs. You use ACLs to control which IP addresses can send traffic to your SIP trunk. You can create multiple ACLs and assign them to multiple SIP trunks. In order to make outbound calls you need to have at least one ACL set up.

List ACLs

Fetches the list of Access Control List entries.

SecurityBasic or OAuth2.0
Responses
200

The list of ACL entries

Response Schema: application/json
Array of objects (AccessControlList)
totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/accessControlLists
Request samples
Response samples
application/json

List all access control lists for the project.

{
  • "accessControlLists": [
    • {
      },
    • {
      }
    ],
  • "pageNumber": "1",
  • "pageSize": 500,
  • "totalItems": 2
}

Create an ACL

Create an access control list entry with at least one IP address or IP range.

SecurityBasic or OAuth2.0
Request
Request Body schema: application/json
name
required
string

Your name for the access control list entry.

required
Array of objects (IpRange) non-empty

The associated IP ranges. When creating you need to submit at least one IP range.

enabled
boolean
Default: true

Whether the access control list entry is enabled. You can use this to disable an list temporarily without deleting it.

Responses
200

The list of access control list entries

Response Schema: application/json
name
required
string

Your name for the access control list entry.

required
Array of objects (IpRange) non-empty

The associated IP ranges. When creating you need to submit at least one IP range.

id
string

The ID of the access control list entry.

enabled
boolean
Default: true

Whether the access control list entry is enabled. You can use this to disable an list temporarily without deleting it.

trunks
Array of strings

The associated SIP trunks ID.

createTime
string <date-time>

The time the call was created.

updateTime
string <date-time>

The time the call was created.

projectId
string

The ID of the project.

post/accessControlLists
Request samples
application/json

Create a new access control list.

{
  • "name": "My new ACL",
  • "enabled": true,
  • "ipRanges": [
    • {
      }
    ]
}
Response samples
application/json

The newly created access control list.

{
  • "name": "My new ACL",
  • "projectId": "3acb7ae1-cf3d-4112-ba5e-3a9d8c71cd47",
  • "enabled": true,
  • "id": "01HA9BRJW4J3QE4WBKVC337V4E",
  • "createTime": "2023-09-14T08:08:48.264185988",
  • "updateTime": "null,",
  • "ipRanges": [
    • {
      }
    ]
}

Update ACL

Create an access control list entry with at least one IP address or IP range.

SecurityBasic or OAuth2.0
Request
path Parameters
id
required
string

The ID of the access control list entry.

Request Body schema: application/json
name
required
string

Your name for the access control list entry.

enabled
boolean
Default: true

Whether the access control list entry is enabled. You can use this to disable a list temporarily without deleting it.

Responses
200

The list of access control list entries

Response Schema: application/json
name
required
string

Your name for the access control list entry.

required
Array of objects (IpRange) non-empty

The associated IP ranges. When creating you need to submit at least one IP range.

id
string

The ID of the access control list entry.

enabled
boolean
Default: true

Whether the access control list entry is enabled. You can use this to disable an list temporarily without deleting it.

trunks
Array of strings

The associated SIP trunks ID.

createTime
string <date-time>

The time the call was created.

updateTime
string <date-time>

The time the call was created.

projectId
string

The ID of the project.

put/accessControlLists/{id}
Request samples
application/json

Update an access control list.

{
  • "name": "Test Prague 5",
  • "enabled": false
}
Response samples
application/json

The updated access control list.

{
  • "name": "Test Prague 5",
  • "projectId": "3acb7ae1-cf3d-4112-ba5e-3a9d8c71cd47",
  • "enabled": false,
  • "id": "01HA9BRJW4J3QE4WBKVC337V4E",
  • "createTime": "2023-09-14T08:08:48",
  • "updateTime": "2023-09-14T08:10:10.187513334",
  • "ipRanges": [
    • {
      }
    ]
}

Delete ACL

Delete an access control list entry.

SecurityBasic or OAuth2.0
Request
path Parameters
id
required
string

The ID of the access control list entry.

Responses
204

List deleted\

delete/accessControlLists/{id}
Request samples

Get trunks for ACL

Returns a list of all trunks which use the specified access control list.

SecurityBasic or OAuth2.0
Request
path Parameters
id
required
string

The ID of the access control list entry.

Responses
200

The list of trunks which use the access control list.

Response Schema: application/json
Array of objects (SipTrunk)
totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/accessControlLists/{id}/trunks
Request samples
Response samples
application/json
{
  • "trunks": [
    • {
      }
    ],
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500
}

Add IP range to ACL

Add an IP range to an access control list entry.

SecurityBasic or OAuth2.0
Request
path Parameters
accessControlListId
required
string

The ID of the access control list entry. that you want to work with

Request Body schema: application/json
description
string

A description of the IP range.

ipAddress
string

The start of the IP range.

range
integer
Default: 32

A range, also known as a CIDR, represents the number of leading bits that define the network portion of an IP address in CIDR notation. The range is specified after a slash (/) at the end of the IP address. The remaining bits define specific hosts within the network.

  • 10.0.0.0/8: Represents all IP addresses from 10.0.0.0 to 10.255.255.255, allowing for over 16 million unique host addresses.
  • 172.16.0.0/16: Includes all IP addresses from 172.16.0.0 to 172.16.255.255, providing up to 65,536 unique host addresses.
  • 192.168.1.0/24: Encompasses all IP addresses from 192.168.1.0 to 192.168.1.255, offering 256 unique host addresses.
  • 192.168.1.0/32: Encompasses one ip address
Responses
200

The list of IP ranges

Response Schema: application/json
id
string

The ID of the IP range.

description
string

A description of the IP range.

ipAddress
string

The start of the IP range.

range
integer
Default: 32

A range, also known as a CIDR, represents the number of leading bits that define the network portion of an IP address in CIDR notation. The range is specified after a slash (/) at the end of the IP address. The remaining bits define specific hosts within the network.

  • 10.0.0.0/8: Represents all IP addresses from 10.0.0.0 to 10.255.255.255, allowing for over 16 million unique host addresses.
  • 172.16.0.0/16: Includes all IP addresses from 172.16.0.0 to 172.16.255.255, providing up to 65,536 unique host addresses.
  • 192.168.1.0/24: Encompasses all IP addresses from 192.168.1.0 to 192.168.1.255, offering 256 unique host addresses.
  • 192.168.1.0/32: Encompasses one ip address
createTime
string <date-time>

The time the call was created.

updateTime
string <date-time>

The time the call was created.

projectId
string

The ID of the project.

accessControlListId
string

The ID of the access control list.

post/accessControlLists/{accessControlListId}/ipRanges
Request samples
application/json

Request to add an IP range to an access control list.

{
  • "description": "IP range name",
  • "ipAddress": "11.12.13.14",
  • "range": 27
}
Response samples
application/json

The added IP range.

{
  • "description": "IP range name",
  • "ipAddress": "11.12.13.14",
  • "range": 27,
  • "projectId": "3acb7ae1-cf3d-4112-ba5e-3a9d8c71cd47",
  • "accessControlListId": "01H8Y95DBJT31F104PWFVV9H8B",
  • "id": "01HA9BYAH3J5TFDGK62991YYWC",
  • "createTime": "2023-09-14T08:11:56.324855024",
  • "updateTime": ""
}

List all IP ranges for ACL

Get all IP ranges for an access control list entry.

SecurityBasic or OAuth2.0
Request
path Parameters
accessControlListId
required
string

The ID of the access control list entry. that you want to work with

Responses
200

The list of IP ranges

Response Schema: application/json
Array of objects (IpRange)

The list of IP ranges

totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/accessControlLists/{accessControlListId}/ipRanges
Request samples
Response samples
application/json
{
  • "ipRanges": [
    • {
      }
    ],
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500
}

Delete IP range from ACL

Remove an IP range to an access control list entry.

SecurityBasic or OAuth2.0
Request
path Parameters
accessControlListId
required
string

The ID of the access control list entry that you want to update.

ipRangeId
required
string

The ID of the IP range that you want to update.

Responses
204

IP range deleted

delete/accessControlLists/{accessControlListId}/ipRanges/{ipRangeId}
Request samples

Update IP range

Update an IP range to an access control list entry.

SecurityBasic or OAuth2.0
Request
path Parameters
accessControlListId
required
string

The ID of the access control list entry that you want to update.

ipRangeId
required
string

The ID of the IP range that you want to update.

Request Body schema: application/json
description
string

A description of the IP range.

ipAddress
string

The start of the IP range.

range
integer
Default: 32

A range, also known as a CIDR, represents the number of leading bits that define the network portion of an IP address in CIDR notation. The range is specified after a slash (/) at the end of the IP address. The remaining bits define specific hosts within the network.

  • 10.0.0.0/8: Represents all IP addresses from 10.0.0.0 to 10.255.255.255, allowing for over 16 million unique host addresses.
  • 172.16.0.0/16: Includes all IP addresses from 172.16.0.0 to 172.16.255.255, providing up to 65,536 unique host addresses.
  • 192.168.1.0/24: Encompasses all IP addresses from 192.168.1.0 to 192.168.1.255, offering 256 unique host addresses.
  • 192.168.1.0/32: Encompasses one ip address
Responses
200

The updated IP range.

Response Schema: application/json
id
string

The ID of the IP range.

description
string

A description of the IP range.

ipAddress
string

The start of the IP range.

range
integer
Default: 32

A range, also known as a CIDR, represents the number of leading bits that define the network portion of an IP address in CIDR notation. The range is specified after a slash (/) at the end of the IP address. The remaining bits define specific hosts within the network.

  • 10.0.0.0/8: Represents all IP addresses from 10.0.0.0 to 10.255.255.255, allowing for over 16 million unique host addresses.
  • 172.16.0.0/16: Includes all IP addresses from 172.16.0.0 to 172.16.255.255, providing up to 65,536 unique host addresses.
  • 192.168.1.0/24: Encompasses all IP addresses from 192.168.1.0 to 192.168.1.255, offering 256 unique host addresses.
  • 192.168.1.0/32: Encompasses one ip address
createTime
string <date-time>

The time the call was created.

updateTime
string <date-time>

The time the call was created.

projectId
string

The ID of the project.

accessControlListId
string

The ID of the access control list.

put/accessControlLists/{accessControlListId}/ipRanges/{ipRangeId}
Request samples
application/json

Request to update an IP range for an access control list.

{
  • "ipAddress": "11.12.13.14",
  • "range": 27
}
Response samples
application/json

The updated access control list.

{
  • "name": "Test Prague 5",
  • "projectId": "3acb7ae1-cf3d-4112-ba5e-3a9d8c71cd47",
  • "enabled": false,
  • "id": "01HA9BRJW4J3QE4WBKVC337V4E",
  • "createTime": "2023-09-14T08:08:48",
  • "updateTime": "2023-09-14T08:10:10.187513334",
  • "ipRanges": [
    • {
      }
    ]
}

Add ACL to a trunk

Add an access control list entry to a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Request Body schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList ids

Responses
200

The list of access control list entries

Response Schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList ids

post/trunks/{trunkId}/accessControlLists
Request samples
application/json

Request to add access control lists to a trunk.

{
  • "accessControlListIds": [
    • "01HA2E80QCBX185VVP21PJG9CT",
    • "01H8Y95DBJT31F104PWFVV9H8B"
    ]
}
Response samples
application/json

The access control lists added to a trunk.

{
  • "accessControlListIds": [
    • "01HA2E80QCBX185VVP21PJG9CT",
    • "01H8Y95DBJT31F104PWFVV9H8B"
    ]
}

List all ACLs for a trunk

Get all access control list entries for a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Responses
200

The list of access control list entries

Response Schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList ids

totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/trunks/{trunkId}/accessControlLists
Request samples
Response samples
application/json

All access control lists assigned to a trunk.

{
  • "accessControlListIds": [
    • "01HA2E80QCBX185VVP21PJG9CT"
    ],
  • "pageNumber": 1,
  • "pageSize": 1000,
  • "totalItems": 1
}

Bulk update ACLs for a trunk

Update the list of access control list entries for a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Request Body schema: application/json
Array
string

The ID of the access control list entry.

Responses
200

The list of access control list entries

Response Schema: application/json
accessControlListIds
Array of strings

Array of AccessControlList IDs

put/trunks/{trunkId}/accessControlLists
Request samples
application/json
[
  • "01GNZ9MXEZ4K6S8GB7RW063VAN",
  • "01GNZ9MXEZ4K6S8GB7RW063VAN"
]
Response samples
application/json
{
  • "accessControlListIds": [
    • "01GNZ9MXEZ4K6S8GB7RW063VAN",
    • "01GNZ9MXEZ4K6S8GB7RW063VAN"
    ]
}

Delete ACL from trunk

Remove an access control list entry from a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

accessControlListId
required
string

The ID of the access control list entry. that you want to remove from trunk

Responses
204

Access control list entry deleted

delete/trunks/{trunkId}/accessControlLists/{accessControlListId}
Request samples

Credential List

The Credential List endpoint has operations that allow you to view credential lists. You use credential lists to easily configure which users are allowed to make calls on a trunk.

Get trunks for credential list

Returns a list of all the trunks which use the specified credential list.

SecurityBasic or OAuth2.0
Request
path Parameters
id
required
string

The ID of the credential list entry.

Responses
200

The list of trunks which use the credential list.

Response Schema: application/json
Array of objects (SipTrunk)
totalItems
integer <int32>

Total size of the result.

pageNumber
string

The token to be used for listing the next page

pageSize
integer <int32>

The number of items per page. Default is 500.

get/credentialLists/{id}/trunks
Request samples
Response samples
application/json
{
  • "trunks": [
    • {
      }
    ],
  • "totalItems": 10000,
  • "pageNumber": 1,
  • "pageSize": 500
}

Bulk update credential lists for a trunk

Update the list of credential list entries for a trunk.

SecurityBasic or OAuth2.0
Request
path Parameters
trunkId
required
string

The ID of the trunk that you want to work with

Request Body schema: application/json
Array
string

The ID of the credential list entry.

Responses
200

The list of credential list entries

Response Schema: application/json
credentialListIds
Array of strings

Array of credential list IDs

put/trunks/{trunkId}/credentialLists
Request samples
application/json
[
  • "01GNZ9MXEZ4K6S8GB7RW063VAN",
  • "01GNZ9MXEZ4K6S8GB7RW063VAN"
]
Response samples
application/json
{
  • "credentialListIds": [
    • "01GNZ9MXEZ4K6S8GB7RW063VAN",
    • "01GNZ9MXEZ4K6S8GB7RW063VAN"
    ]
}

Error Messages

The type will give you a general idea of why the operation failed, whereas the errorCode describes the issue in more detail. Below we list the Error codes for the API

An error response. The code field is a unique identifier for the error. The message field is a human-readable description of the error.

code
integer <int32>

HTTP status code or error code

status
string

Response status name.

message
string

A developer-facing error message

Array of objects (ErrorDetail)

Details of the errors

{
  • "code": 400,
  • "status": "INVALID_ARGUMENT",
  • "message": "Bad request.",
  • "details": [
    • {
      }
    ]
}