Skip to main content
connic

Telnyx Messaging

By connic
InboundOutbound

Let an agent answer SMS, WhatsApp and RCS messages sent to your Telnyx sender, and send replies, media and approved WhatsApp templates from any run.

Publisher
By connic
Modes
Inbound, Outbound
Set up in
Dashboard or connectors/*.yaml

Turn incoming messages into agent runs

An inbound connector receives messages for one channel and one sender from your Telnyx account. An outbound connector with the same settings sends the reply.

A shared Telnyx Connection
Save the API key and the account's Ed25519 public key once. Telnyx Voice uses the same Connection, and each connector picks its own channel and sender.
What connic configures
connic sets the incoming webhook on the number's messaging profile or on the RCS agent. It replaces the primary webhook, removes the failover webhook and any Telnyx AI assistant, and logs the earlier values. The profile must contain only this number.
External WhatsApp numbers
If connic can't find the number's messaging profile, enter the profile ID and paste the generated webhook URL into that profile in Telnyx.
  1. The customer writes to your sender

    An SMS or MMS to your number, a WhatsApp message to your registered number, or an RCS message to your RCS agent.

  2. connic verifies the event

    The account's Ed25519 public key checks the signature and timestamp. connic then matches the messaging profile, channel and recipient to the connector.

  3. Linked agents run

    Each linked agent gets the text, the sender, downloaded attachments and a conversation ID. A repeated delivery of the same event maps to the same run.

  4. The outbound connector replies

    Without a recipient in the output, the reply goes back to the verified sender of the incoming message.

Give the agent the message, the sender and the files

The run input carries normalized message fields, plus the original Telnyx payload in raw.

Attachments
connic downloads up to 10 files per message within a shared 10 MiB budget and passes them base64-encoded in files. Anything it skips is listed in file_issues with a reason.
Conversation memory
Set session.key to input.conversation_id, and follow-up messages from the same customer to the same sender share history. Without a session, each message starts an independent run.
Receipts and paused connectors
Delivery notifications, read receipts and message echoes don't start runs. A paused connector acknowledges valid messages without starting its agents.
context["payload"]
{
  "event_id": "7a3a86b3-0e77-48f6-914a-63ad28b7d64e",
  "message_id": "4031938e-60e4-4235-a8dd-0b1c55a23e7a",
  "channel": "whatsapp",
  "from": "+4915112345678",
  "to": "+4930123456789",
  "text": "Is this the right cable for my device?",
  "conversation_id": "telnyx_messaging:9e0f77d9-2fd8-5a8e-8d47-59fbf5b8a091",
  "files": [
    {
      "name": "attachment-1.jpg",
      "mime_type": "image/jpeg",
      "data": "<base64-bytes>",
      "size": 284512
    }
  ]
}
agents/support-assistant.yaml
version: "1.0"
name: support-assistant
type: llm
model: connic/gpt-5.6-terra
description: Answers customer messages
system_prompt: |
  Answer the incoming message briefly.
  Check files and file_issues before you reply.
tools:
  - retrieval_query
session:
  key: input.conversation_id
  ttl: 86400

Reply, notify or send a template

Send automatically after a run, as an agent tool or from middleware. Text, public media URLs and approved WhatsApp templates go through the same connector.

Who receives it
An explicit to in the output comes first, then the connector's default recipient, then the verified sender of the incoming message.
Media per channel
MMS takes up to 10 media URLs. WhatsApp and RCS take one each. WhatsApp also needs a media_type, and RCS sends text and media as separate messages.
WhatsApp templates
Outside the customer-service window, send an approved template by template_id, or by name and language.code, with optional components. Set it as the connector default or pass it per message.
Delivery status
The outbound run records the Telnyx message ID once Telnyx accepts the message, and final delivery shows in Telnyx. After a timeout with an unclear outcome, check the Telnyx message logs before you resend.
whatsapp-image.json
{
  "to": "+4915112345678",
  "text": "Your shipping label",
  "media_urls": ["https://example.com/shipping-label.png"],
  "media_type": "image"
}
whatsapp-template.json
{
  "to": "+4915112345678",
  "whatsapp_template": {
    "name": "order_confirmation",
    "language": {"code": "en_US"},
    "components": [{
      "type": "body",
      "parameters": [{"type": "text", "text": "1042"}]
    }]
  }
}

Declare both directions in code

Keep the inbound and outbound connectors in connectors/. The source on the outbound link limits replies to runs the inbound connector started, and the API key stays in the Connection.

connectors/support-whatsapp.yaml
type: telnyx_messaging
mode: inbound
name: Support WhatsApp
connection: support-telnyx
config:
  channel: whatsapp
  sender: "+4930123456789"
agents:
  - support-assistant
connectors/support-replies.yaml
type: telnyx_messaging
mode: outbound
connection: support-telnyx
config:
  channel: whatsapp
  sender: "+4930123456789"
agents:
  - name: support-assistant
    outbound: { usage: automatic, source: [support-whatsapp] }

Where Telnyx Messaging fits

Pick a setup to see what arrives, which agent runs and what it sends back.

Customers text an order number, and the agent replies from the same number with the current status.

Customer SMS
Inbound SMS
order-assistant
SMS reply from your number
context["payload"]
{
  "event_id": "1f6c2a0e-8b3d-4d6f-9a51-2c7e4b9d0a13",
  "message_id": "6b2d9e41-3c7a-4f08-b5e2-9d1a7c4f8e20",
  "channel": "sms",
  "from": "+4915112345678",
  "to": "+4930123456789",
  "text": "Has order 1042 shipped yet?",
  "conversation_id": "telnyx_messaging:3c9e1d47-6a2b-5f80-9e4d-1b7a2c8f6d35"
}
agent-output.json
{
  "text": "Order 1042 shipped on October 12 and arrives on Thursday."
}

A customer sends a photo with a question, and the agent answers with a guide image.

WhatsApp customer
Inbound WhatsApp
device-support
Reply with a guide image
context["payload"]
{
  "event_id": "7a3a86b3-0e77-48f6-914a-63ad28b7d64e",
  "message_id": "4031938e-60e4-4235-a8dd-0b1c55a23e7a",
  "channel": "whatsapp",
  "from": "+4915112345678",
  "to": "+4930123456789",
  "text": "Is this the right cable for my device?",
  "conversation_id": "telnyx_messaging:9e0f77d9-2fd8-5a8e-8d47-59fbf5b8a091",
  "files": [
    {
      "name": "attachment-1.jpg",
      "mime_type": "image/jpeg",
      "data": "<base64-bytes>",
      "size": 284512
    }
  ]
}
agent-output.json
{
  "text": "Yes, that cable fits. Plug it into port B, shown here.",
  "media_urls": ["https://example.com/guides/port-b.png"],
  "media_type": "image"
}

Messages to your RCS agent reach an agent that looks up the right service guide.

RCS customer
Inbound RCS
install-helper
RCS reply with the next step
context["payload"]
{
  "event_id": "5d8b3f12-9c4e-4a7b-8e61-0f2d6c9a4b37",
  "message_id": "a2e7c591-4b3d-4e86-9f20-7d1c5b8e3a64",
  "channel": "rcs",
  "from": "+4915112345678",
  "to": "example_support",
  "text": "Where does the replacement filter go?",
  "conversation_id": "telnyx_messaging:7b4d2e98-1f6a-5c3b-a8e7-4d9c0b2f5e61"
}
agent-output.json
{
  "text": "Open the front panel and slide the filter into slot F2."
}

Your booking system posts each new booking, and the agent sends an approved WhatsApp template to the customer.

Booking system
Inbound webhook
booking-notifier
WhatsApp template via Telnyx
booking.json
{
  "booking_id": "B-2041",
  "customer_phone": "+4915112345678",
  "service": "Boiler service",
  "starts_at": "2026-10-21T09:00:00+02:00"
}
agent-output.json
{
  "to": "+4915112345678",
  "whatsapp_template": {
    "name": "booking_confirmation",
    "language": {"code": "en_US"},
    "components": [{
      "type": "body",
      "parameters": [
        {"type": "text", "text": "Boiler service"},
        {"type": "text", "text": "October 21, 9:00"}
      ]
    }]
  }
}

Telnyx Messaging FAQ

Yes, if the number is set up for both in Telnyx. Create one connector per channel with the same Connection and messaging profile. Both share one webhook, and connic routes each message to the matching connector.

Yes. Start the agent from a schedule, a webhook or another connector, and send through an outbound connector with a recipient in the output or a default recipient. Outside the WhatsApp customer-service window, use an approved template.

Yes, once you configure a session. Set session.key to input.conversation_id and pick a ttl. Each connector, channel, sender and customer gets its own conversation. The Telnyx Messaging docs show the full input.

No. Numbers, WhatsApp and RCS registration and template approval stay in Telnyx. connic lists the senders your account already has and sends the approved templates you reference.

It means Telnyx accepted the message. The run records the Telnyx message ID, which you can look up in Telnyx for the final delivery status.