Get Phone Numbers

GET https://api.cm.com/voice-phonenumberapi/v1/{accountGuid}/phonenumbers

Parameters

Type

Name

Description

Schema

Path

accountGuid
required

Your account identifier. This can be either a voice account ID, or your account ID. See Authentication for more information.

string (uuid)

Query

skip

Amount of items to skip.
Default value is 0.
Minimum value is 0.

number

Query

take

Amount of items to retrieve.
Default value is 10.
Minimum value is 1.
Maximum value is 25.

number

Response

200 OK

Response headers

Header

Description

Schema

X-Cm-Pagination-Skip

Amount of items skipped.

number

X-Cm-Pagination-Take

Amount of items retrieved.

number

X-Cm-Pagination-Total

Total items that can be retrieved.

number

Response body

Name

Description

Schema

number

Phone number.

string

originalNumber

Original number. This is only applicable for some Belgian phone numbers.

number

customerAlias

Custom alias that can be set used to make it easier to identify the number. See Update Phone Number Alias.

string

voiceAccount

The Voice Account that this number belongs to.

Voice Account

application

The Voice Application that this number is configured to use.

Application

appConfig

The Voice Application configuration that's used for the set application.

See Update Phone Number Configurations for more information.

distributionGroup

The Distribution Group that this number is configured to.

Distribution Group

country

Information on the country of the number.

Country

validFrom

The date and time on which the number becomes valid.

datetime

validTo

The date and time on which the number becomes invalid.

datetime

numberType

The type of number, can be either FIXED_LINE, PREMIUM_RATE, TOLL_FREE, MOBILE, LOCAL or NATIONAL.

string

updatedOn

The date and time on which the number was last updated.

datetime

status

The status of the phone number.

Status

Voice Account

createdOn

Date and time on which the Voice Account was created.

datetime

name

The name of the Voice Account.

string

productAccountId

The unique identifier of the Voice Account.

string (uuid)

externalId

Optional external ID of the Voice Account that can be set by the customer for external references outside of the CM.com Platform.

number

externalName

Optional external name of the Voice Account that can be set by the customer for external references outside of the CM.com Platform.

string

isActive

Whether or not the Voice Account is set to Active.

boolean

Application

Name

Description

Schema

guid

Unique identifier of the application.

string (uuid)

name

Name of the application.

string

isConfigurable

Whether the application is configurable or not.

boolean

displayCode

The display code of the application.

number

Distribution Group

Name

Description

Schema

guid

Unique identifier of the Distribution Group.

string (uuid)

name

The name of the Distribution Group.

string

createdOn

Date and time on which the Distribution Group was created.

datetime

updatedOn

The date and time on which the Distribution Group was last updated.

datetime

voiceAccountGuid

The unique identifier of the Voice Account.

string (uuid)

Country

Name

Description

Schema

code

Country code in ISO 3166 alpha-2 format.

string

name

The English name of the country.

string

prefix

The number prefix used for the country.

string

zone

Whether or not the country is part of the European Economic Area zone or not. Can be EER or Non-EER.

string

Status

Name

Description

Schema

name

The name of the current phone number status. Can be either Requested, Operational, Deleted, Cooldown or PortedOut.

string

Example response

[
    {
        "number": "31600000000",
        "originalNumber": null,
        "customerAlias": null,
        "voiceAccount": {
            "createdOn": "2022-01-01T00:00:00",
            "name": "My Voice Account",
            "productAccountId": "00000000-0000-0000-0000-000000000000",
            "externalId": "ExternalId",
            "externalName": "The best Voice Account in the world",
            "isActive": true
        },
        "application": {
            "guid": "00000000-0000-0000-0000-000000000000",
            "name": "SIP trunking",
            "isConfigurable": true,
            "displayCode": 1
        },
        "appConfig": {
            "type": "sip",
            "distributionGroupGuid": "00000000-0000-0000-0000-000000000000",
            "algorithm": "RoundRobin",
            "anonymousMode": 2,
            "phoneNumber": 31600000000
        },
        "distributionGroup": {
            "guid": "00000000-0000-0000-0000-000000000000",
            "name": "My Distribution Group",
            "createdOn": "2022-01-01T00:00:00",
            "updatedOn": "2022-01-01T00:00:00",
            "voiceAccountGuid": "00000000-0000-0000-0000-000000000000"
        },
        "country": {
            "code": "NL",
            "name": "Netherlands",
            "prefix": "31",
            "zone": "EER"
        },
        "validFrom": "2022-01-01T00:00:00",
        "validTo": "2023-01-01T00:00:00",
        "numberType": "FIXED_LINE",
        "updatedOn": "2022-01-01T00:00:00",
        "status": {
            "name": "Operational"
        }
    }
]

Did this page help you?