Docs

Get Phone Number Details

https://api.apifonica.com/v2/accounts/{accountSID}/numbers/{numberSID}

Overview

To get information on the phone number, make the GET request to /accounts/{accountSID}/numbers/{numberSID}.

Request example

The following cURL example demonstrates getting the number details.

curl –X GET ‘https://api.apifonica.com/v2/accounts/{accountSID}/numbers/{numberSID}’ \
-u {accountSID}:{authToken}

Response example

        {
            "number_sid": "{numberSID}",
            "account_sid": "{accountSID}",
            "number": "447480600503",
            "token": null,
            "country_code": "GB",
            "country_name": "United Kingdom",
            "type": "local",
            "call_controller": "http://172.16.102.175:8082/voicexml/getxml?xml_variant=welcome_to_apifonica",
            "call_method": "GET",
            "msg_controller": "",
            "msg_method": "GET",
            "msg_app_sid": "default_msg_app_sid",
            "call_app_sid": "app47449776-12d9-3900-9cef-34718e931648",
            "endpoint_sid": null,
            "created": "Thu, 31 Mar 2016 11:16:59 +0000",
            "updated": "Thu, 31 Mar 2016 11:17:21 +0000",
            "voice": true,
            "messaging": false,
            "voice_recording": false,
            "mode": "xml"
        }

Response parameters

Parameter

Description

number_sid

Number identifier.

account_sid

Account identifier.

number

Phone number in E.164 format.

token

Authentication token (if number type is sip and null for other types)

country_code

Either country code according to ISO 3166-1 alpha-2 or international .

country_name

Full name of the country.

type

Number type.

One of the following: local, mobile or sip.

call_controller

URL which will be used to make a request for an XML controller file for incoming calls.

call_method

Method which will be used to make a request.

msg_controller

URL which will be used to send the events about the status change.

msg_method

Method which will be used to make a request.

msg_app_sid

Unique ID of the messaging application.

call_app_sid

Unique ID of the calling application.

endpoint_sid

Endpoint unique identifier.

created

Rental date.

updated

Date of the last update.

voice

Availability of voice communications for this number.

Either true or false.

messaging

Availability of messaging for this number.

Either true or false.

voice_recording

Availability of voice recording function for this number.

Either true or false.

mode

Parameter which regulates the phone number mode.

Modes can be as following:

end_point - enables sip-trunking mode;
sip_phone - enables mode to link Apifonica voice numbers with soft/hard phones;
xml - enables default mode to request XML instructions.

Description

Number identifier.

Description

Account identifier.

Description

Phone number in E.164 format.

Description

Authentication token (if number type is sip and null for other types).

Description

Either country code according to ISO 3166-1 alpha-2 or international.

Description

Full name of the country.

Description

Number type.

One of the following: localmobile or sip.

Description

URL which will be used to make a request for an XML controller file for incoming calls.

Description

Method which will be used to make a request.

Description

URL which will be used to send the events about the status change.

Description

Method which will be used to make a request.

Description

Unique ID of the calling application.

Description

Unique ID of the messaging application.

Description

Endpoint unique identifier.

Description

Rental date.

Description

Date of the last update.

Description

Availability of voice communications for the number.

Either true or false.

Description

Availability of messaging for the number.

Either true or false.

Description

Availability of voice recording function for this number.

Either true or false.

Description

Parameter which regulates the phone number mode.

Modes can be as following:

end_point - enables sip-trunking mode;
sip_phone - enables mode to link Apifonica voice numbers with soft/hard phones;
xml - enables default mode to request XML instructions.