Skip to content

Telephony

Connect your Plivo, Twilio, or Vonage account to use for outbound and inbound PSTN legs. Rymi encrypts provider credentials before storage.

Self-serve BYOC carrier costs are not bundled into Rymi's platform minute price. Your carrier bills PSTN minutes, number rental, taxes, and add-ons directly. Rymi bills at the selected Operator/Specialist/Executive agent-role rate. Enterprise plans can bundle telecom under a custom agreement.

List Available Providers

http
GET /v1/telephony/providers

Returns the full carrier catalog with the credential field shapes the dashboard uses to render dynamic connect forms. No auth required — field metadata is not sensitive.

Response 200

json
{
  "providers": [
    {
      "id": "twilio",
      "displayName": "Twilio",
      "credentialFields": [
        { "name": "auth_id", "label": "Account SID", "required": true },
        { "name": "auth_token", "label": "Auth token", "secret": true, "required": true }
      ]
    }
  ]
}

Validate Without Saving

http
POST /v1/telephony/validate

Dry-run credential check — pings the carrier's API and returns whether the credentials authenticate, without storing them. Rate-limited to 3 attempts per 5 minutes per tenant.

Request Body

Same shape as Connect Provider.

Response 200

json
{ "valid": true, "accountName": "Acme Twilio" }
json
{ "valid": false, "error": "Invalid credentials — could not authenticate with the provider" }

Errors

StatusMeaning
400Unsupported provider
401Missing Rymi auth context
429Too many validation attempts — wait and retry

Connect Provider

http
POST /v1/telephony/connect

Only one active telephony carrier is used per tenant at a time. Connecting a new provider deactivates the previous active carrier.

Request Body

FieldTypeRequiredDefaultDescription
providerstringYesplivo, twilio, or vonage
auth_idstringYes (Plivo/Twilio)Plivo Auth ID or Twilio Account SID
auth_tokenstringYes (Plivo/Twilio)Provider auth token
api_keystringYes (Vonage)Vonage API key
api_secretstringYes (Vonage)Vonage API secret
signature_secretstringNoOptional Vonage signature secret for webhook verification

Example — Twilio

bash
curl -X POST https://api.rymi.live/v1/telephony/connect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "twilio",
    "auth_id": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "auth_token": "your_twilio_auth_token"
  }'

Example — Plivo

bash
curl -X POST https://api.rymi.live/v1/telephony/connect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "plivo",
    "auth_id": "your_plivo_auth_id",
    "auth_token": "your_plivo_auth_token"
  }'

Example — Vonage

bash
curl -X POST https://api.rymi.live/v1/telephony/connect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "vonage",
    "api_key": "your_vonage_api_key",
    "api_secret": "your_vonage_api_secret",
    "signature_secret": "your_vonage_signature_secret"
  }'

Response 200

json
{
  "status": "connected",
  "provider": "twilio",
  "account_name": "Acme Twilio",
  "message": "twilio account connected successfully"
}

Errors

StatusMeaning
400Missing or unsupported provider, or missing provider-specific credentials
401Missing Rymi auth context or provider credential validation failed
429Too many credential connection attempts in a short window
500Credential storage failed

Status

http
GET /v1/telephony/status

Returns the current telephony connection state for the authenticated tenant. No query parameters.

Example Request

bash
curl https://api.rymi.live/v1/telephony/status \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "connected": true,
  "provider": "twilio",
  "account_name": "Acme Twilio",
  "account_country": null
}
FieldTypeDescription
connectedbooleanWhether a telephony provider is currently connected
providerstring or nullActive provider: plivo, twilio, or vonage
account_namestring or nullDisplay name from the provider account
account_countrystring or nullAccount country when reported by the provider

Errors

StatusMeaning
401Missing or invalid API key
500Provider status lookup failed

Provider Numbers

http
GET /v1/telephony/numbers

Returns carrier-owned numbers synced into Rymi for the connected provider. This is read-only — it does not search, buy, release, assign, or unassign carrier numbers.

Example Request

bash
curl https://api.rymi.live/v1/telephony/numbers \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "numbers": [
    {
      "id": "num_123",
      "provider": "twilio",
      "phone_number": "+15551234567",
      "number_status": "active",
      "backend_agent_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  ]
}
FieldTypeDescription
idstringInternal number record ID
providerstringCarrier provider name
phone_numberstringPhone number in E.164 format
number_statusstringactive or inactive
backend_agent_iduuid or nullAgent attached to this number, if any

Errors

StatusMeaning
401Missing or invalid API key
500Provider number lookup failed

Disconnect

http
POST /v1/telephony/disconnect

Deactivates the current telephony provider. No request body required.

Example Request

bash
curl -X POST https://api.rymi.live/v1/telephony/disconnect \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "status": "disconnected",
  "message": "Telephony disconnected."
}

Errors

StatusMeaning
401Missing or invalid API key
500Disconnect operation failed

Sync Numbers from Carrier

http
POST /v1/telephony/sync-numbers

Pulls phone-number inventory from the connected carrier and upserts it into provider_numbers. Numbers no longer present in the carrier inventory are removed locally. Rate-limited to one sync per 2 minutes per tenant.

Example Request

bash
curl -X POST https://api.rymi.live/v1/telephony/sync-numbers \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "numbers": [
    {
      "phone_number": "+15551234567",
      "number_type": "local",
      "provider": "twilio"
    }
  ],
  "synced_at": "2026-04-01T10:00:00Z"
}

Errors

StatusMeaning
400No active telephony provider connected, or provider doesn't support sync
429Sync rate-limited — wait 2 minutes between syncs
500Carrier API call failed

Number Management

Rymi does not search or purchase carrier numbers. Provision numbers in your carrier account, sync them via POST /v1/telephony/sync-numbers, then use the Numbers API to attach them to agents.