TelDev

Objects

TelDev stores numbers, calls, messages, sessions, and campaigns as durable objects with stable ID prefixes.

| Prefix | Object | Example |

| --- | --- | --- |

| nl_test_ / nl_live_ | API key | nl_test_… |

| acct_ | Account | Timezone default America/Denver until they change it. |

| dev_ | Device | Tied to an Account. Last seen. Push or websocket handle. |

| trl_ | Trial identity token | Issued after SMS OTP. Bound to one E.164. |

| idn_ | Trial identity | Server-side remaining seconds and paid plan (null during the 10, then personal unless they picked another SKU) |

| num_ | Number | num_demo |

| call_ | Call | call_… |

| msg_ | Message | msg_… |

| ses_ | Session | ses_… |

| evt_ | Event | evt_… |

| agt_ | Agent | agt_clinic_front, agt_brief_420 |

| rte_ | Route | rte_default |

| cmp_ | Campaign | cmp_clinic, cmp_12 |

| tnx_ | Carrier reference (test / mock Telnyx) | tnx_… |

Device

A Device is tied to an Account. Id prefix dev_. TelDev stores last_seen and a push or websocket handle so it can ring that device. Trial, Free, and Personal ring a Device. No DID per user on those plans.

POST /v1/calls with to: device is a first-class call. Device is a new to shape on Calls, not a fourth product. Optional at stores the ISO-8601 instant as given and fires only to a Device on that Account.

Number

A TelDev-owned E.164. carrier and carrier_ref record which carrier provisioned it (carrier=telnyx). Test keys never call a carrier; they still return those fields so objects stay uniform. Live buys attach the number to rte_default via the Telnyx voice app and messaging profile.

Call / Message

Outbound voice or SMS. from must be an owned number. Each create opens a session. If agent is set, the object includes stream_url (wss://rt.teldev.bot/sessions/{ses_…}). That URL is session events, not audio. Browser audio is a Telnyx WebRTC peer using a client token from POST /v1/webrtc/token (or webrtc on the create response).

POST /v1/calls also accepts action answer, hangup, mute, unmute, hold, unhold.

Session

The realtime control object for a call or message. Hosts:

  • Realtime: wss://rt.teldev.bot
  • Dev / listen: https://dev-<id>.teldev.bot

Campaign

10DLC-style approval set. TelDev fails closed: missing, unknown, or unapproved campaigns return 422 campaign_not_approved. Seed: cmp_clinic (approved), cmp_12 (T-Mobile not approved).

Event

Append-only account log. Page with GET /v1/events?after={evt_id}.

Usage

Account invoice view. Example totals: $323.30 billed / $56.70 carrier.