v1 Reference
Programmable Chat deprecated
Programmable Chat has been deprecated and receives no support. Twilio has turned its focus to the next generation of chat: Twilio Conversations. Find out more about the EOL process.
- To start a project, see Conversations.
- To switch from Programmable Chat, see the Migration Guide to learn about how to switch.
Danger
This is reference documentation for the v1 REST API, which has been deprecated. You should use the current v2 REST API.
The Programmable Chat REST API allows you to control your Chat applications from the server in much the same way you can from the client, except from a service perspective rather than a 1st person one. You can create channels, send messages, and query the state of your messaging applications using the resources in this REST API.
All URLs in the reference documentation use the following base URL:
https://chat.twilio.com/v1
All requests to the Programmable Chat REST API are served over HTTPS. Unencrypted HTTP is not supported.
To authenticate requests to the Twilio APIs, Twilio supports HTTP Basic authentication. Use your API key as the username and your API key secret as the password. You can create an API key either in the Twilio Console or using the API.
Note: Twilio recommends using API keys for authentication in production apps. For local testing, you can use your Account SID as the username and your Auth token as the password. You can find your Account SID and Auth Token in the Twilio Console.
Learn more about Twilio API authentication.
1curl -G https://chat.twilio.com/v1/Services \2-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
You can use the Twilio SDKs to interact with the Programmable Chat REST endpoints. See the Twilio SDKs for the available languages.
The Programmable Chat v1 REST API exposes the following resources:
| Resource | Description |
|---|---|
| Channels | A "chat room" - a scope in which messages can be sent or received |
| Credentials | Credentials used by Twilio to integrate with Google Cloud Messaging or Apple Push Notifications Service |
| Invites | Represents all pending invitations to Users within the Service instance to become a Member of the Channel. |
| Members | Members of a Channel |
| Messages | Messages sent to a Channel |
| Roles | Define actions users are allowed to take in a Channel or Service scope |
| Services | A Service roughly maps to a Chat app. Channels, Users, Credentials, and all other resources are scoped to a Service. A Service can define webhook URLs for events |
| Users | A user with a unique identity within the scope of your Service |