---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/bulk-messaging/send-to-a-cohort#article
headline: Send a Message to a Cohort
description: Send a personalized Twilio Bulk Messaging request that fans out to every Profile in a Cohort, then track delivery with Operations.
url: https://www.twilio.com/docs/bulk-messaging/send-to-a-cohort
inLanguage: en
dateModified: 2026-10-02T16:04:19.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Send a Message to a Cohort

> \[!IMPORTANT]
>
> Twilio Cohorts is currently available as a Private Beta product and the information contained in this document is subject to change. You acknowledge and agree that your use of Twilio Cohorts is subject to the terms of the [Services in Private Beta](https://www.twilio.com/en-us/legal/service-country-specific-terms/private-beta). This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Private Beta products are not covered by the Twilio Support Terms or Twilio Service Level Agreement.

> \[!IMPORTANT]
>
> Request access to the private beta through [this form](https://airtable.com/appRfMcPhtbqS6n2A/pagrrzSGrvqgGjjEu/form).

This guide walks through sending a single Bulk Messaging request that fans out to every Profile in a Twilio Cohort, with per-Profile personalization.

For background on Cohorts and how they differ from Cohort Snapshots, see [Cohort vs Cohort Snapshot](/docs/bulk-messaging/cohorts#cohort-vs-cohort-snapshot).

## Prerequisites

Before you begin, make sure you have:

1. Completed the [Getting started](/docs/bulk-messaging/getting-started) guide, including a Twilio account, a compliant sender in your target region (note its `senderId`, which starts with `comms_sender_`), and API key credentials.
2. A Cohort in the same Twilio account you are authenticating as. Its ID starts with `cmp_cohort_`. To create one, see the [Cohorts getting started guide](/docs/cohorts/getting-started).
3. Optional: any Profile traits you plan to reference in personalization, for example `Contact.firstName`.

## Step 1: Confirm your Cohort ID

Copy the ID of the Cohort you want to send to. It looks like this:

```text
cmp_cohort_01h9krwprkeee8fzqspvwy6nq8
```

If you want a frozen audience instead of live membership, use a Cohort Snapshot ID (`cmp_cohortsnapshot_...`) and substitute `cohortSnapshotId` for `cohortId` in the requests below. The `variables` field, personalization behavior, and validation rules apply identically to `cohortSnapshotId` recipients. For a comparison of both options, see [Cohorts](/docs/bulk-messaging/cohorts).

## Step 2: Send the message

Make a `POST` request to `/v1/Messages`. In the `to` array, include a single entry with your `cohortId`. Twilio expands that entry to every Profile in the Cohort at send time.

```bash
curl -X POST 'https://comms.twilio.com/v1/Messages' \
--header 'Content-Type: application/json' \
--data '{
    "from": {
        "senderId": "comms_sender_01h9krwprkeee8fzqspvwy6nq8"
    },
    "to": [
        {
            "cohortId": "cmp_cohort_01h9krwprkeee8fzqspvwy6nq8",
            "variables": {
                "firstName": "${profile.trait.Contact.firstName}"
            }
        }
    ],
    "content": {
        "text": "Hello {{ firstName | default: '\''Valued Customer'\'' }}!"
    }
}' \
-u $TWILIO_API_KEY:$TWILIO_API_SECRET
```

For each Profile in the Cohort, Twilio does the following:

1. Resolves `${profile.trait.Contact.firstName}` from that Profile's traits.
2. Renders `content.text` with Liquid, replacing `{{ firstName }}` with the resolved value. If the trait is missing, the Liquid `default` filter falls back to `Valued Customer`.

A `cohortId` or `cohortSnapshotId` recipient must be the only entry in the `to` array. Mixing it with any other recipient, including another Cohort or Cohort Snapshot, returns `400`. The 10,000-entry cap on `to` applies to array length, not to Cohort size — a Cohort can contain many more Profiles than that cap.

## Step 3: Track the Operation

Twilio validates Cohort sends asynchronously, so check the Operation to confirm the outcome for each recipient.

```bash
curl -X GET 'https://comms.twilio.com/v1/Messages/Operations/comms_operation_01h9krwprkeee8fzqspvwy6nq8' \
-u $TWILIO_API_KEY:$TWILIO_API_SECRET
```

For the full response schema and status semantics, see [Operations and Message Tracking](/docs/bulk-messaging/operations-and-message-tracking).

## Common errors

* **`400 Bad Request` on send**: a synchronous personalization violation. Check that each `${...}` expression is at most 500 characters, that no single `variables` value contains more than one `${...}` expression, and that a recipient references at most 25 distinct expressions. See [Limits and validation](/docs/bulk-messaging/cohorts#limits-and-validation) on the Cohorts page.
* **Request succeeds (`202`) but the Operation reports failures**: a semantic error in a Cohort expression, for example a trait path that doesn't exist on the target Profiles. Twilio does not retry failed recipients automatically, and there is no partial-retry endpoint. Fix the expression and issue a new send for the affected recipients.
* **`cohortId` rejected**: confirm the ID prefix is `cmp_cohort_` and that the Cohort belongs to the same account you're authenticating as.

## Next steps

* Learn how to [personalize message content](/docs/bulk-messaging/personalization) with Liquid syntax, filters, and control flow.
* See [Operations and Message Tracking](/docs/bulk-messaging/operations-and-message-tracking) to track the delivery status of your Cohort send.
