Skip to content

Imported Numbers

Use the Imported Numbers API endpoints to list imported numbers or import a number that's already been provisioned with an NNID for use with Sinch. Imported numbers can be used with Sinch SMS services.

Note: The SMS enablement process is only supported in United States and Canada.

List imported numbers

Request

Lists all imported numbers for the project.

Security
Basic or OAuth2.0
Path
projectIdstringrequired

Found on your Sinch Customer Dashboard. Settings > Projects.

Example:d1923022-5199-4bb3-a513-c47b3a656bc5
Query
regionCodestring

Region code to filter by. ISO 3166-1 alpha-2 country code of the phone number. Currently supported are US, CA

Example:regionCode=US
numberPattern.patternstring

Sequence of digits to search for. If you prefer or need certain digits in sequential order, you can enter the sequence of numbers here. When using START, a plus sign (+) must be included and URL encoded. For example, to search for area code 206 in the US, the url encoded string would be %2B1206

Example:numberPattern.pattern=+1732
numberPattern.searchPatternstring

Search pattern to apply. The options are, START, CONTAIN, and END. Numbers that begin with the numberPattern.pattern entered. Often used to search for a specific area code.

Enum ValueDescription
START

Number starts with specified pattern.

CONTAIN

Number contains specified pattern.

END

Number ends with specified pattern.

Example:numberPattern.searchPattern=START
pageSizeinteger

The maximum number of items to return, server can enforce an upper limit and overwrite the value.

Example:pageSize=20
pageTokenstring

The next page token value returned from a previous listing.

Example:pageToken=C2VNYXJrEg4KDCsxMjAxMjI2MzUyOQ==
orderBystring

Parameter used to order the returned hosting orders

Enum ValueDescription
createdTime

Order by the time the hosting order was created.

updatedTime

Order by the time the hosting order was last updated.

servicePlanIdstringrequired

The hosting order servicePlanId

Example:servicePlanId=324e4567-e89b-12d3-a456-426614174000
campaignIdstringrequired

The hosting order campaignId

Example:campaignId=123e4567-e89b-12d3-a456-426614174000
curl -i -X GET \
  -u '<username>:<password>' \
  'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/importedNumbers?regionCode=US&numberPattern.pattern=%2B1732&numberPattern.searchPattern=START&pageSize=20&pageToken=C2VNYXJrEg4KDCsxMjAxMjI2MzUyOQ%3D%3D&orderBy=createdTime&servicePlanId=324e4567-e89b-12d3-a456-426614174000&campaignId=123e4567-e89b-12d3-a456-426614174000'

Responses

OK

Bodyapplication/json
importedNumbersArray of objects(ImportedNumberResponse)

List of numbers associated to the client project specified in ListImportedNumbers.

nextPageTokenstring

The token to be used for listing the next page.

totalSizeinteger, (int32)

https://cloud.google.com/apis/design/design_patterns#list_pagination

Response
{ "importedNumbers": [ { … } ], "nextPageToken": "string", "totalSize": 0 }