Comment on page

Update Destination Priority


This method allows you to update existing destination priorities for phone numbers.


Authentication is done by passing your TSG Global API key via the Authorization header in the format "Authorization: Bearer <api_key>"


Add a destination priority associated with a phone number.
For VOIP Call Type you need to enter just the IP Address of the Gateway and we will format the rest of the destination. For PSTN Call Type you need to just enter the PSTN Destination in e.164 format or e.164 (-) the Plus.
Type must only contain one of the following VOIP = VOIP Destination | PSTN = PSTN Destination (This is case sensitive.)
NP = VOIP DID Sent to Gateway with out plus | WP = VOIP DID Sent to Gateway with plus. (This is case sensitive.)

Example PATCH

curl -n -XPATCH -H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" -d '{
"did": "12003004000",
"destination": "16352321233",
"priority": 2,
"call_type": "PTSN",
"call_option": "NP"

Error Codes

  • -1000 Invalid or Blank API Key
  • -1001 Invalid or Blank Call Option
  • -1003 Invalid or No DID Provided
  • -1004 Invalid or No Priority Provided
  • -1005 Invalid or No Destination Provided
  • -1006 Invalid or No Call Type Provided
  • -1007 Priority Already Exists Use Another Priority
  • -1008-V Priority Added to Database as VoIP Destination
  • -1008-P Priority Added to Database as PSTN Destination
  • -1010 Unknown Error Please Contact TSG Support with URL String for Review