Remove a Voice Route for a Phone Number

Remove an inbound route from your account.

Endpoint

DELETE /routes/:id/

Path Parameter

  • id
    string REQUIRED

    The route id you wish to remove. Note: the route specified must not be in use by any TNs as either a Primary or Failover Route.

    (see Remove a Voice Route for a Phone Number to remove all existing references to this route.)

Response

On success, the HTTP status code in the response header is 204 NO CONTENT which means that the server successfully processed the request and is not returning any content. On error, the header status code is an error code and the response body contains an array of error objects.


Example Request

DELETE /v2/routes/523493 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

                        

Example Request

curl https://api.flowroute.com/v2/routes/523493 -X DELETE \
-u accessKey:secretKey -H 'Content-Type':'application/vnd.api+json'

                        

Example Responses

204 NO CONTENT (Success)

401 Unauthorized

403 Route still has TNs associated

404 Invalid Route Id

Examples:

{
  "errors": [
    {
      "detail": "Please disassociate all numbers before deleting.",
      "id": "7fc8c70a-ca58-430c-b383-b89df84f8083",
      "status": 403,
      "title": "This Route has numbers still associated to it."
    }
  ]
}

                

403 Forbidden

{  "errors": 
  [
    {
      "status": 403, 
      "detail": "Please disassociate all numbers before deleting.",
      "title": "This Route has numbers still associated to it."
    }
  ]
}