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

ParameterRequiredDescriptionDefault value
endpoint_sid
no

Endpoint unique identifier

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:.

{
  "status_code": 201,
  "status_message": "CREATED",
  "uri": "https://api.apifonica.com/v2/accounts/{accountSID}/endpoints/{endpointSID}"
}

RESPONSE EXAMPLE

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