Skip to main content
Use Telnyx through Corsair: one client, typed API calls. Create a key in the Telnyx portal under API Keys. Send it as Authorization: Bearer <key>. A key inherits the permissions of the user who created it, so a restricted user’s key cannot manage numbers. Things to know before you call:
  • Sending charges the account. messages.send bills per message part, and calls.create bills per minute from the moment the call is answered. There is no sandbox.
  • A sender is required, in one of two forms. Send from for a phone number or alphanumeric sender ID, or send messaging_profile_id and let that profile’s number pool pick the sender. The plugin rejects a send with neither.
  • SMS needs text, MMS needs media. A send with neither text nor media_urls is rejected before the request, because Telnyx refuses it too.
  • Paging uses bracketed keys. page[number] and page[size] on the messaging profile, number and application lists. page[size] runs from 1 to 250. The available-numbers route has no pages: it takes its filters bracketed, filter[country_code] and the rest, and limit is one of those filters rather than a top-level value.
  • Responses are wrapped. Every answer is { data }, and a list adds meta with total_pages, total_results, page_number and page_size. The one exception is messages.delete, which answers with the bare message.
  • Sends, dials and live-call actions are destructive. messages.send, calls.create, calls.speak and calls.hangup bill the account, reach a person or cannot be undone. calls.speak needs payload and voice; language is optional.
  • messages.delete cancels a scheduled message. It only works on a message sent with send_at that has not gone out yet.
  • Number settings. phoneNumbers.update changes the connection, tags, billing group, customer reference and similar fields. Telnyx sets a number’s messaging profile and emergency settings on separate routes this plugin does not cover.
  • Call control application first. calls.create takes a connection_id, which is the ID of a call control application. Create one with callControlApplications.create, which requires a webhook_event_url because Telnyx sends every call event there.
  • Releasing a number is permanent. phoneNumbers.delete gives the number back to the pool and it cannot be recovered. Deleting a messaging profile detaches its numbers rather than releasing them.
  • Error codes. A failure is core’s ApiError, whose body is { errors: [{ code, title, detail }] }; telnyxErrorDetails(error) reads the entries. 20100 is “Insufficient Funds”, which no retry fixes.
What you get:
  • 22 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List the numbers on the account
Send an SMS
See the full list on the API page.

What’s next

API reference

Every telnyx.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.