---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/data-destinations/destination/segment#article
headline: Segment destination
description: Learn how to send event data to Twilio Segment through a Segment source write key.
url: https://www.twilio.com/docs/data-destinations/destination/segment
inLanguage: en
dateModified: 2026-11-04T17:24:28.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Segment destination

> \[!IMPORTANT]
>
> 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](/docs/data-destinations#private-beta-legal-information).

[Twilio Segment](https://segment.com/) lets you collect, unify, and route customer data to hundreds of downstream tools. Send your events to a Segment source to fold them into your existing customer data pipeline.

### Destination overview

* **Category**: CDP
* **Release status**: Beta
* **Authentication**: API key
* **Regional availability**: US1, IE1

## Join the Data Destinations private beta

[Sign up](https://airtable.com/appaJfyV6LiIFMxuP/pagIaOAtKsQVxTfdW/form)

Get early access to native destinations for data warehouses, observability tools, and event pipelines.

## Eligible events

The Segment Track API requires a resolvable identifier (either a `userId` or `anonymousId`) on every event. Twilio silently suppresses events without a supported identifier instead of delivering them. For more information, see [Common errors](#common-errors).

You can send the following event types to Segment:

* **Messaging**: [inbound message received](/docs/events/event-types/messaging/inbound-message#received), [message queued](/docs/events/event-types/messaging/outbound-message#queued), [message sent](/docs/events/event-types/messaging/outbound-message#sent), [message delivered](/docs/events/event-types/messaging/outbound-message#delivered), [message failed](/docs/events/event-types/messaging/outbound-message#failed), [message undelivered](/docs/events/event-types/messaging/outbound-message#undelivered), [message read](/docs/events/event-types/messaging/outbound-message#read)
* **Voice**: [call answered](/docs/events/event-types/voice/call-progress-event#answered-1), [call initiated](/docs/events/event-types/voice/call-progress-event#initiated-1), [call ringing](/docs/events/event-types/voice/call-progress-event#ringing-1), [call completed](/docs/events/event-types/voice/call-progress-event#completed-1), [call redirected](/docs/events/event-types/voice/twiml#call-redirected), [call requested](/docs/events/event-types/voice/twiml#requested), [call transferred](/docs/events/event-types/voice/twiml#call-transferred), [dial finished](/docs/events/event-types/voice/twiml#dial-finished), [enqueue finished](/docs/events/event-types/voice/twiml#enqueue-finished), [gather finished](/docs/events/event-types/voice/twiml#gather-finished), [record finished](/docs/events/event-types/voice/twiml#record-finished), [media fetched](/docs/events/event-types/voice/media#fetched)
* **Voice Insights**: [call summary complete](/docs/events/event-types/voice-insights/call-summary#complete)

No other event types are currently eligible for this destination.

In the IE1 region, only [Voice Insights](/docs/events/event-types-overview#voice-insights) events are eligible for delivery at this time.

## Get started

### Prerequisites

Before you set up a Segment destination, make sure you have:

* A Segment account with a source configured to receive HTTP Tracking API events.
* Your Segment source's **Write Key**, found in the source's settings.

## Create the destination

> \[!NOTE]
>
> See [Set up a destination](/docs/data-destinations/destination-setup) for the full UI and Destinations API setup flow common to every destination type.

### Twilio Console

To create a Segment destination in the Twilio Console:

1. From your Segment account, gather the settings listed in [Destination settings](#destination-settings).
2. In the Twilio Console, go to **Data** > **Data Destinations** > **Destinations** > **Add destination subscription**.
3. Complete the **Add destination subscription** wizard.

### Destinations API

To create a Segment destination through the Destinations API, send a `POST` request to the Destinations endpoint and set `destinationType` to `segment`. For authentication and the other request body fields, see [Create a destination](/docs/data-destinations/api-quickstart#create-a-destination).

```text title="Create a destination"
POST "https://destinations.twilio.com/v1/ControlPlane/Destinations"
```

Set the `config` object in the request body as follows:

| Name                                              | Type           | Description                                                         |
| ------------------------------------------------- | -------------- | ------------------------------------------------------------------- |
| `credentials.credentialType` <br />(**Required**) | string         | Set to `API_KEY`.                                                   |
| `credentials.writeKey` <br />(**Required**)       | string         | Your Segment source write key.                                      |
| `region`                                          | enum`<string>` | Your Segment region. The default is `US`. Valid values: `US`, `EU`. |

The following example shows a request body. Replace the uppercase placeholder values with your own.

```json title="Example request body"
{
  "destinationType": "segment",
  "name": "My Segment destination",
  "config": {
    "credentials": {
      "credentialType": "API_KEY",
      "writeKey": "WRITE_KEY"
    }
  }
}
```

## Destination settings

Use `segment` as the `destinationType`.

| Field     | Description                                                                                                             | Required | Default or choices                 |
| --------- | ----------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------- |
| Write Key | Segment source write key, sent as the HTTP Basic Auth username. Marked as sensitive: entered once and stored encrypted. | Yes      | None                               |
| Region    | Segment region determining the API endpoint.                                                                            | No       | Default: `US`. Choices: `US`, `EU` |

Twilio authenticates to Segment by using HTTP Basic Auth, with your **Write Key** as the username and an empty password. This credential is stored encrypted and never appears in event payloads.

## Default mappings

| Field                            | Segment field              |
| -------------------------------- | -------------------------- |
| Event friendly name              | Event name                 |
| Event time                       | Timestamp                  |
| Event ID                         | Message ID (deduplication) |
| Event payload                    | Properties                 |
| Resolved user/anonymous identity | `userId` / `anonymousId`   |
| External IDs                     | `context.externalIds`      |

## Verification and troubleshooting

When you save a Segment destination, Twilio validates your **Write Key** against Segment before marking the destination active. If validation fails, check that:

* Your **Write Key** is correct and belongs to an active Segment source.
* The **Region** you selected in the Console matches where your Segment source is actually hosted.

To trigger a test event, open the Console and go to the **Trigger Test Event** utility.

A corresponding Track call appears in your Segment source's debugger within a few seconds.

### Common errors

| Cause                                          | What you'll see                                                                                                                                                           | Fix                                                                   |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| Invalid or revoked Write Key                   | Validation fails with an auth error                                                                                                                                       | Re-check the write key in Segment and update the destination          |
| Wrong Region selected in the Console           | Validation fails even with a correct write key                                                                                                                            | Confirm your source's region in Segment and update the Region setting |
| Event missing both user and anonymous identity | Twilio silently suppresses the event. No error appears in the [Debugger](/docs/usage/troubleshooting/debugging-your-application), and the event doesn't arrive in Segment | Ensure the subscribed event type carries a resolvable user identifier |
| Segment unreachable or timing out              | Delivery errors reported in the [Debugger](/docs/usage/troubleshooting/debugging-your-application)                                                                        | Check the Segment status page and retry                               |

If Twilio can't deliver events to your destination, Twilio sends an error notification to the [Debugger](/docs/usage/troubleshooting/debugging-your-application) (available in US1 region only). If Twilio continues to encounter delivery errors, Twilio notifies you every 20 minutes after the initial error.

## Additional resources

* [Destinations overview](/docs/data-destinations/destinations-overview)
* [Set up a destination](/docs/data-destinations/destination-setup)
* [Event types reference](/docs/events/event-types-overview)
