Set up a destination
Beta
Data Destinations is currently available as a Private Beta product and the information contained in this document is subject to change. Data Destinations is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI. To learn more, see Private beta legal information.
Create a destination in the Twilio Console or by using the Destinations API.
To set up a destination and associated subscriptions in the Twilio Console, complete the following steps:
- In the Twilio Console, go to Data > Data Destinations > Get started.
- In the dialog box, select the region in which you'd like to create destination subscriptions. During the Private Beta, you can create subscriptions in the US (US1) and Ireland (IE1).
- Click Continue.
- On the Add destination subscription page, click Get started to set up your subscription.
- Select the destination you'd like to set up, then click Next. For a list of all destinations, see Available destinations.
- Enter the credentials and configuration fields for that destination, then click Next.
- On the Add destination subscription, click Get started to set up your subscription.
- Enter a name for your subscription, then select the event types you'd like to receive events from.
- Click Save subscription.
To set up a destination and subscriptions using the Destinations API, make two requests: first create a destination, then create a subscription.
To get started with Data Destinations, you first need to create a destination. A destination is a third-party business tool that can receive your Twilio event data.
You can create up to 200 destinations per account. Any destinations that exceed this limit result in a 409 Conflict error.
POST "https://destinations.twilio.com/v1/ControlPlane/Destinations"
| Name | Type | Description |
|---|---|---|
| destinationType (Required) | string | Destination type identifier from the catalog. If you don't know the destinationType, call GET /v1/Catalog/DestinationTypes and match against each entry's name and description. |
| name (Required) | string | A human readable description of this destination, up to 128 characters. |
| config | object | Use the reserved credentials key to supply authentication credentials, when that destination type's configOptions declares one. |
| status | enum<string> | Either ENABLED, if you want to begin validation and activate the destination, or DISABLED. ENABLED is the default value. |
Once you've created a destination, you'll create a subscription. By creating a subscription, you'll select the events you'd like to send downstream to your business tools.
You can create up to 200 subscriptions in your Twilio account. Any subscriptions that exceed this limit result in a 409 Conflict error.
POST "https://destinations.twilio.com/v1/ControlPlane/Subscriptions"
| Name | Type | Description |
|---|---|---|
| description (Required) | string | A human readable description of this subscription, up to 128 characters. |
| destinationId (Required) | string | The ID of the destination that you created and would like to send events to. |
| eventTypes (Required) | array[object] | An array of the event types you'd like to subscribe to. |
| status | enum<string> | Either ENABLED, if you want to activate the subscription, or DISABLED, if you'd like to create a subscription that doesn't receive events. |