Docs

Link endpoint to number

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

Overview

To link endpoint to the number you need to make PUT request with defined endpoint_sid to /accounts/{accountSID}/numbers/{numberSID}

To unlink endpoint from the number you need to make PUT request with empty value of endpoint_sid parameter to /accounts/{accountSID}/numbers/{numberSID}

Input parameters

Parameter

Required?

Description

Default value

endpoint_sid

no

Endpoint unique identifier

none

Required

no

Description

Endpoint unique identifier

Default value

none

Link request example

The following example demonstrates linking an Endpoint:

curl –X PUT ‘https://api.apifonica.com/v2/accounts/{accountSID}/numbers/{numberSID}’ \
-H 'Content-Type: application/json' \
-d '{ \
"endpoint_sid": "end7a43bdb4-70b5-3d46-ac11-f346bddcafa8" \
    }' \
-u {accountSid}:{authToken}

Unlink request example

The following example demonstrates unlinking an Endpoint:.

curl –X PUT ‘https://api.apifonica.com/v2/accounts/{accountSID}/numbers/{numberSID}’ \
-H 'Content-Type: application/json' \
-d '{ \
"endpoint_sid": "" \
    }' \
-u {accountSid}:{authToken}

Response example

{
  "status_code": 200,
  "status_message": "OK",
  "uri": "/v2/accounts/{accountSID}/numbers/{numberSID}"
}