Phone

Create a custom route

Creates a new custom route that can be used to send messages via one or more basic routes (phones).

The actions array defines the routing rules.

post/v1/projects/{project_id}/routes

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/projects/{project_id}/routes
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

project_idstring required

ID of the Project

Request body

namestring required

Name of the custom route to create

varsobject

Custom variables and values to set for this route

Example request

{
  "name": "My Custom Route",
  "actions": [
    {
      "type": "use_phone",
      "phone_ids": [
        "PN123abc",
        "PN456def"
      ]
    }
  ]
}

Response

Successful response

idstring

Telerivet's internal ID for the route

namestring

The name of the route

varsobject

Custom variables stored for this route. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

urlstring

URL to this route in the Telerivet web app

project_idstring

ID of the project this route belongs to

Example response

{
  "id": "RTed8af84c2679ac09",
  "name": "Custom Route",
  "url": "https://telerivet.com/p/asdf/route/RTed8af84c2679ac09",
  "project_id": "PJ2ad0100821a98bea",
  "actions": [
    {
      "type": "use_phone",
      "phone_ids": [
        "PN123abc",
        "PN456def"
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.