Skip to main content
When an agent is configured with a phone number, it answers texts. Each sender is one conversation, and the reply goes back from the number the text came in on.

Phone Numbers

deploy puts the number on a messaging profile and points its webhook at the agent. A number that is missing from the account, or not active yet, stops the deploy. telnyx-acp status shows whether the webhook still points at the agent. remove phone plus the next deploy, or delete, put the number back where it was. The same number answers calls, which Voice covers. To use a messaging profile that already exists, without touching numbers, add it as a channel:
The sender’s number is the conversation, so the same person always reaches the same conversation. A redelivered text is recognized by its message id and never runs twice (the reply itself can go out twice only when the API’s answer was lost between sending and recording it), and media-only messages are ignored. A reply the messaging API refuses with a 5xx or a 429, or does not answer, is sent again after 30 seconds, then 1, 2, 5, 10, 20 and 30 minutes, about an hour in all; any other 4xx is final at once. Each failed try is one {"delivery":"failed"} or {"delivery":"gave up"} line in telnyx-acp logs, with the status and the API’s reason. Inside the Managed Harness follows a text through the code: Phone and Channels for what deploy wires, The Messaging Webhook for receiving, and Delivery for the reply.

Testing Without a Phone

telnyx-acp invoke <name> --conversation <id> "<text>" is one text turn against the deployed agent from any machine, and the fastest check that the deployment, the model and the instructions are right. It goes straight to the instance over the mount, so it says nothing about the number. telnyx-acp text "<message>" tests the number. It sends an SMS from one of the account’s own numbers to the agent’s through the messaging API, the text arrives at the webhook as any phone’s would, and the reply is read back from the conversation the sender’s number names:
The sender is the first active number on a messaging profile other than the agent’s own, or --from <number>; a number on the agent’s profile cannot be the sender, since the reply would come back in on that profile as a new conversation. --to picks one of the agent’s numbers when it has several. Both numbers are Telnyx’s, so the text never crosses a carrier: that is why it works without 10DLC registration.
A text from a phone is a different matter. A US handset gets a reply only once the agent’s number is 10DLC-registered (a brand, a campaign, the number assigned to it, in Mission Control under Messaging → 10DLC); until then the reply fails with error 40010. A phone outside the US cannot reach a US long code at all: its messaging is domestic. deploy and status say so on the number’s line, domestic texts only: this number cannot receive or send international SMS, so a phone abroad cannot reach it, when the number’s features say so. A messaging profile deploy creates is open to every destination, so a number that can text abroad replies abroad. telnyx-acp text is the way to test texting during development.