Phone

Get basic route by ID

Retrieves the basic route with the given ID.

get/v1/projects/{project_id}/phones/{id}

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/projects/{project_id}/phones/{id}
  • 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

idstring required

Response

Successful response

idstring

ID of the phone

namestring

Name of the phone

phone_numberstring

Phone number or sender ID

phone_typestring

Type of this phone/route (e.g. android, twilio, nexmo, etc)

countrystring

2-letter country code (ISO 3166-1 alpha-2) where phone is from

send_pausedboolean

True if sending messages is currently paused, false if the phone can currently send messages

time_createdinteger

Time the phone was created in Telerivet

last_active_timeinteger nullable

Approximate time this phone last connected to Telerivet

varsobject

Custom variables stored for this phone. 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.

project_idstring

ID of the project this phone belongs to

validate_recipient_numbersboolean

Set to true to check that recipient phone numbers appear to be valid before sending messages. Messages to invalid phone numbers will fail without being sent. Only applies to phones capable of sending messages.

allowed_recipient_countriesstring[] nullable

Array of 2-letter country codes (ISO 3166-1 alpha-2) to which this phone is allowed to send messages. When null, there is no restriction on recipient countries.

sent_message_limitinteger nullable

Maximum number of messages that can be sent from this phone in a given period. When the sent_message_count reaches this limit, sending is automatically paused. Set to null to disable the limit.

sent_message_countinteger

Number of messages sent from this phone since the counter was last reset (see sent_message_epoch). This property is not updated if sent_message_limit is null.

sent_message_epochinteger nullable

The UNIX timestamp when the sent_message_count was last reset to 0.

send_delaynumber nullable

Number of seconds to wait after sending each message from this phone, to avoid exceeding carrier rate limits.

timezone_idstring nullable

A string specifying the time zone that will be used when implementing quiet hours or estimating send times; see List of tz database time zones Wikipedia article. When null, the project's default time zone is used.

quiet_mode'off' | 'delay' | 'confirm'

Controls behavior during quiet hours (see quiet_start/quiet_end). Possible values are 'off' (quiet hours disabled), 'delay' (messages are delayed until quiet hours end), or 'confirm' (requires manual confirmation to send during quiet hours).

quiet_startstring nullable

Time of day when quiet hours begin, in HH:MM format (24-hour time) in the phone's time zone. Messages sent during quiet hours are delayed or require confirmation depending on quiet_mode. Only applicable when quiet_mode is not 'off'.

quiet_endstring nullable

Time of day when quiet hours end, in HH:MM format (24-hour time) in the phone's time zone. Messages sent during quiet hours are delayed or require confirmation depending on quiet_mode. Only applicable when quiet_mode is not 'off'.

batteryinteger nullable

Current battery level, on a scale from 0 to 100, as of the last time the phone connected to Telerivet (only present for Android phones)

chargingboolean nullable

True if the phone is currently charging, false if it is running on battery, as of the last time it connected to Telerivet (only present for Android phones)

internet_typestring nullable

String describing the current type of internet connectivity for an Android phone, for example WIFI or MOBILE (only present for Android phones)

app_versionstring

Currently installed version of Telerivet Android app (only present for Android phones)

android_sdkinteger nullable

Android SDK level, indicating the approximate version of the Android OS installed on this phone; see list of Android SDK levels (only present for Android phones)

mccmncstring

Code indicating the Android phone's current country (MCC) and mobile network operator (MNC); see Mobile country code Wikipedia article (only present for Android phones). Note this is a string containing numeric digits, not an integer.

manufacturerstring

Android phone manufacturer (only present for Android phones)

modelstring

Android phone model (only present for Android phones)

send_limitinteger nullable

Maximum number of SMS messages per hour that can be sent by this Android phone. To increase this limit, install additional SMS expansion packs in the Telerivet Gateway app. (only present for Android phones)

external_account_idstring nullable

Account ID for the external API (e.g. Twilio Account SID, Vonage API Key). Only present for routes that support external API configuration. See createPhone for the meaning of this field for each phone type.

external_idstring nullable

External phone/resource ID within the external API account (if applicable). Only present for routes that support external API configuration.

external_configobject nullable

Additional configuration settings specific to the phone_type. Only present for routes that support external API configuration. See createPhone for available settings for each phone type.

external_setupobject nullable

Configuration info for routes that require manual webhook setup. Only present for routes that require manual configuration of callback URLs with the external provider. Contains URL properties for each webhook type that needs to be configured (e.g., incoming_message_url, message_status_url, incoming_call_url).

external_secretstring nullable

Secret/API key for the external API (e.g. Twilio Auth Token, Vonage API Secret). Only applicable for routes that support external API configuration. Write-only; not returned by the API when retrieving a phone.

urlstring

URL to this phone in the Telerivet web app

Example response

{
  "id": "PN4d246818d0ecd1fa",
  "name": "Android Phone 1",
  "phone_number": "+16505550001",
  "phone_type": "android",
  "country": "TZ",
  "time_created": 1390343779,
  "last_active_time": 1390353800,
  "project_id": "PJ2ad0100821a98bea",
  "validate_recipient_numbers": true,
  "sent_message_limit": 1000,
  "sent_message_count": 150,
  "sent_message_epoch": 1720300000,
  "send_delay": 1.5,
  "timezone_id": "America/Los_Angeles",
  "quiet_mode": "delay",
  "quiet_start": "22:00",
  "quiet_end": "08:00",
  "battery": 95,
  "internet_type": "WIFI",
  "app_version": "3.1.17",
  "android_sdk": 17,
  "mccmnc": "23203",
  "manufacturer": "LGE",
  "model": "Nexus 4",
  "send_limit": 900,
  "url": "https://telerivet.com/p/asdf/phone/PN4d246818d0ecd1fa"
}

Changes

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