- Prepare the Twilio project and sender.
- Artemis channel configuration: create the connection, then copy its Webhook URL.
- Webhook configuration in Twilio: set the number’s incoming-message webhook.
- Verify the connection with signed two-way SMS and MMS.
- The Twilio phone number selects the connection: Save the number in E.164 format, such as
+15551234567. Artemis resolves the connection from the encoded number in the webhook path, then confirms the inboundTofield matches. A friendly connection name isn’t a valid identifier. - The reply doesn’t travel in the webhook response: Artemis returns an empty TwiML response immediately and sends the agent’s reply separately. A 2xx proves only that Twilio delivered the inbound message.
- Twilio signs the exact URL: Scheme, host, port, path, the encoded plus sign, and form values all participate in signature validation. A proxy that rewrites any of them breaks it.
- One account boundary: The Account SID, Auth Token, phone number, and optional Messaging Service must come from the same Twilio project or subaccount.
Prerequisites
Confirm these before you start.- Access to the Twilio project or subaccount that owns the sender and its billing.
- A messaging-capable Twilio number for the destination countries, with any sender registration your traffic needs, such as A2P 10DLC for US long codes.
- Artemis project access with permission to open Deployments -> Channels, and a deployed agent in the environment you intend to bind.
How Artemis routes Twilio SMS messages
Twilio calls a URL you set per number, so Artemis puts the number in the path.
Artemis keys each conversation as
twilio_sms:{To}:{From}, so a different sender or Twilio number starts a separate conversation.
Prepare the Twilio project and sender
Do this in Twilio before you open Artemis. Select Open Twilio Console or Open Messaging Services in the setup guide to jump straight there.1
Use the project that owns the sender
In the Twilio Console, switch to the project or subaccount that owns the production number and billing. Every value you collect must come from this one account.
2
Buy or select a messaging-capable number
- Go to Phone Numbers -> Manage -> Active numbers, or buy a number from Buy a number.
- Confirm it supports SMS, and MMS if the agent handles media, for the destination countries.
- Keep the full E.164 value, including the leading plus and country code.
3
Complete sender and destination compliance
Finish the registration, sender verification, consent, opt-out, and regional requirements Twilio shows for your countries and traffic type. A configured webhook doesn’t bypass carrier or regulatory rules.
4
Copy the Account SID and Auth Token
From the account information panel on the Twilio Console dashboard, copy the
AC-prefixed Account SID, then reveal and copy the Auth Token.5
Decide whether to use a Messaging Service
A Messaging Service is optional. To use one, go to Messaging -> Services, add your number to its Sender Pool, configure inbound handling at the service or number level, and copy the
MG-prefixed SID.Artemis channel configuration
Create the connection before you configure the Twilio webhook. The callback URL contains the encoded phone number, so you can’t finalize it until the identifier exists.- Open Artemis and select the project.
- Go to Deployments -> Channels -> Twilio SMS -> + New. The New Twilio SMS Connection dialog opens, with the setup guide on the left and the fields on the right.
-
Configure the fields:
- Select Create.
-
Copy the Webhook URL from the connection’s summary panel. It ends with the encoded number, where a leading plus appears as
%2B.
Webhook configuration in Twilio
Twilio calls this URL every time the sender receives a message.- Confirm the Artemis connection exists and is Active. Artemis resolves the connection from the encoded number before it verifies the signature or reads the form body.
- Open the sender’s incoming-message configuration. For a direct number, go to Phone Numbers -> Manage -> Active numbers and select the number. For a Messaging Service that owns inbound handling, use the service’s Integration settings.
- Paste the exact public HTTPS URL into A message comes in. Keep the encoded phone-number segment.
- Select HTTP POST, and save. Twilio sends
application/x-www-form-urlencodedfields includingMessageSid,AccountSid,From,To,Body,NumMedia, and anyMediaUrlN. - Keep the public callback URL exact. Twilio signs the full URL plus the sorted form fields with HMAC-SHA1 and the Auth Token. Artemis validates using its configured public Runtime URL, not an internal proxy URL.
200 with an empty TwiML response and queues the agent. The agent’s reply follows separately through the Messages API.
Validation checklist
Work down this list once per connection.Verify the connection
Artemis doesn’t synthesize Twilio requests, so a real SMS is the only end-to-end proof.- From an allowed recipient, send a unique SMS to the Twilio number. Confirm Twilio reports a 2xx webhook result and Artemis creates one session.
- Confirm the agent replies to the original
Fromnumber, from the inbound Twilio number or the configured Messaging Service. The empty TwiML is only an acknowledgement. - Send a second message from the same customer to the same Twilio number. Confirm it continues the
twilio_sms:{To}:{From}session. - Send MMS only where the number, destination, and carrier support it. Artemis authenticates downloads from allowed Twilio hosts and applies attachment type and size policy.
- Repeat with the production sender and a normal recipient. Validate opt-in, opt-out, regional registration, throughput, delivery status, and segmentation costs.
SMS behavior and limits
SMS is plain text with carrier economics attached.Security and transport boundaries
One credential does two jobs, and the URL both sides see must match exactly.- Signatures: Inbound requests require
X-Twilio-Signature. Artemis computes HMAC-SHA1 with the Auth Token, the configured public callback URL, and the sorted form parameters. - Signed URL: Keep HTTPS termination and reverse-proxy host and protocol aligned with the Runtime public base URL.
- Auth Token: It protects inbound verification and outbound Basic authentication. Rotate it in Artemis and Twilio as one coordinated change.
- MMS downloads: Artemis uses the Account SID and Auth Token, accepts only allowed Twilio hosts, then applies attachment policy.
- Environments: Use separate subaccounts or senders, credentials, webhooks, and connections for development and production.
Manage the channel connection
Open a connection from Deployments -> Channels -> Twilio SMS to manage it. The page has a header, three tabs, and a summary panel on the right. Header. Shows the connection name, its environment badge, its status, and when it last changed. The … overflow menu holds the connection-level actions. Summary panel. Stays visible on every tab.- Credentials
- Configuration
- Deployment
Artemis encrypts credentials after you save them. Leave a field blank to keep its current value, or enter a new value to replace it.
Select Save Credentials to apply your changes.
Troubleshoot connection issues
Most failures trace to the URL, the Auth Token, or the account boundary.Twilio reference
Use these pages when you need detail beyond what this article covers.Related articles: