Numbers

Phone numbers used to connect inbound and outbound calls from your communication applications

Numbers have the following properties:

Property

Description

phone_number_sid

Unique identifier for the phone number

number

User-specified phone number

voip_carrier_sid

Unique identifier for the voip carrier

account_sid

Unique identifier for the account

application_sid

Unique identifier for the application

service_provider_sid

The VoIP service provider.

Get Phone Numbers

GET /v1/PhoneNumbers

Get all Numbers linked to your account

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

Example request:

curl -X 'GET' \
'https://api.epacific.net/v1/PhoneNumbers' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a'

Example response:

[
    {
        "phone_number_sid": "3fd743ce-1e9c-4d92-94f9-0dd6c48e56de",
        "number": "8982392389",
        "voip_carrier_sid": "cc0cb0cc-c78f-4b60-a73e-4f3308ce9283",
        "account_sid": "9351f46a-678c-43f5-b8a6-d4eb58d131af",
        "application_sid": "bd9092a2-3721-4202-8254-a2a7905d9b5b",
        "service_provider_sid": null
    },
    {
        "phone_number_sid": "996cc44e-b228-47c9-b8bd-62d8d69a61a6",
        "number": "8982392388",
        "voip_carrier_sid": "cc0cb0cc-c78f-4b60-a73e-4f3308ce9283",
        "account_sid": "9351f46a-678c-43f5-b8a6-d4eb58d131af",
        "application_sid": "bd9092a2-3721-4202-8254-a2a7905d9b5b",
        "service_provider_sid": null
    },
    {
        "phone_number_sid": "d8802ab0-76cd-49b2-bf40-224d7fb8bca5",
        "number": "8982392387",
        "voip_carrier_sid": "cc0cb0cc-c78f-4b60-a73e-4f3308ce9283",
        "account_sid": "9351f46a-678c-43f5-b8a6-d4eb58d131af",
        "application_sid": "bd9092a2-3721-4202-8254-a2a7905d9b5b",
        "service_provider_sid": null
    }
]

Get Phone Number

GET /v1/PhoneNumbers/{phone_number_sid}

Retrieve a specific phone number by its unique identifier

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

phone_number_sid

Unique identifier for the phone number

Example request:

curl -X 'GET' \
'https://api.epacific.net/v1/PhoneNumbers/3fd743ce-1e9c-4d92-94f9-0dd6c48e56de' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a'

Example response:

{
"phone_number_sid": "3fd743ce-1e9c-4d92-94f9-0dd6c48e56de",
"number": "8982392389",
"voip_carrier_sid": "cc0cb0cc-c78f-4b60-a73e-4f3308ce9283",
"account_sid": "9351f46a-678c-43f5-b8a6-d4eb58d131af",
"application_sid": "bd9092a2-3721-4202-8254-a2a7905d9b5b",
"service_provider_sid": null
}

Create Phone Number

POST /v1/PhoneNumbers

Create a phone number

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

Example request:

curl -X 'POST' \
'https://api.servertesting.tk/v1/PhoneNumbers' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a' \
-H 'Content-Type: application/json' \
-d '{
"number": "89823232392385",
"application_sid": "bd9092a2-3721-4202-8254-a2a7905d9b5b",
"voip_carrier_sid": "cc0cb0cc-c78f-4b60-a73e-4f3308ce9283"
}'

Example response:

{
    "sid": "9d26a637-1679-471f-8da8-7150266e1254"
}

Update Phone number

PUT /v1/PhoneNumbers/{phone_number_sid}

Update a phone number

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

phone_number_sid

Unique identifier for the phone number

Example request:

curl -X 'PUT' \
'https://api.servertesting.tk/v1/PhoneNumbers/3fd743ce-1e9c-4d92-94f9-0dd6c48e56de' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a' \
-H 'Content-Type: application/json' \
-d '{
"application_sid": "4ca2fb6a-8636-4f2e-96ff-8966c5e26f8e"
}'

Example response:

Success is indicated by a 204 response


Delete Phone Number

DELETE /v1/PhoneNumbers/{phone_number_sid}

Deletes a phone number

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

phone_number_sid

Unique identifier for the phone number

Example request:

curl -X 'DELETE' \
'https://api.servertesting.tk/v1/PhoneNumbers/3fd743ce-1e9c-4d92-94f9-0dd6c48e56de' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a'

Example response:

Success is indicated by a 204 response


Please contact us for timely support via: