# Programmable Chat REST API

> \[!CAUTION]
>
> Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the [EOL process here](https://www.twilio.com/en-us/changelog/programmable-chat-end-of-life-notice).
>
> If you're starting a new project, please visit the [Conversations Docs](/docs/conversations) to begin. If you've already built on Programmable Chat, please visit our [Migration Guide](/docs/conversations/migrating-chat-conversations) to learn about how to switch.

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.

## API Base URL

All URLs in the reference documentation use the following base URL:

```bash
https://chat.twilio.com/v2
```

All requests to the Programmable Chat REST API are served over HTTPS. Unencrypted HTTP is not supported.

## Authentication

To authenticate requests to the Twilio APIs, Twilio supports [HTTP Basic authentication](https://en.wikipedia.org/wiki/Basic_access_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](/docs/iam/api-keys/keys-in-console) or [using the API](/docs/iam/api-keys/key-resource-v1).

**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](https://www.twilio.com/console).

Learn more about [Twilio API authentication](/docs/usage/requests-to-twilio).

```bash
curl -G https://chat.twilio.com/v2/Services \
    -u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
```

## Twilio SDKs

You can use the Twilio SDKs to interact with the Programmable Chat REST endpoints.

Programmable Chat is available in the Next Gen Release builds of the [Twilio SDKs](/docs/libraries).

## Resources

Here are the resources you will be interacting with via the REST API:

| Resource                                          | Description                                                                                                                                                                                                                                                                                  |
| :------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Binding](/docs/chat/rest/binding-resource)       | A push notification subscription for Users within the Service instance                                                                                                                                                                                                                       |
| [Channel](/docs/chat/rest/channel-resource)       | A "chat room" - a container having members, in which messages can be exchanged.                                                                                                                                                                                                              |
| [Credential](/docs/chat/rest/credential-resource) | Credentials used by Twilio to integrate with [Google Cloud Messaging](https://developers.google.com/cloud-messaging/) or [Apple Push Notifications Service](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html) |
| [Invite](/docs/chat/rest/invite-resource)         | Invitations to a Channel                                                                                                                                                                                                                                                                     |
| [Member](/docs/chat/rest/member-resource)         | Members of a Channel                                                                                                                                                                                                                                                                         |
| [Message](/docs/chat/rest/message-resource)       | Messages sent to a Channel                                                                                                                                                                                                                                                                   |
| [Role](/docs/chat/rest/role-resource)             | Define actions users are allowed to take in a Channel or Service scope                                                                                                                                                                                                                       |
| [Service](/docs/chat/rest/service-resource)       | A service roughly maps to a Chat app. Channels, Users, Credentials, and all the REST (see what I did there?) are scoped to a Service. Can define webhook URLs for events in a Service                                                                                                        |
| [User](/docs/chat/rest/user-resource)             | A user with a unique identity within the scope of your Service                                                                                                                                                                                                                               |

## Media Messaging

Programmable Chat Multimedia Messaging feature has a [REST API](/docs/chat/rest/media) available via stand-alone API endpoint. Please refer to the [Media Resource](/docs/chat/rest/media) documentation for more details.
