> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Segment

> A group of customers that campaigns and automations send to.

**Required scopes:** [`segments_read`](/docs/api-reference/v3/reference/scopes#scope-segments_read), [`segments_write`](/docs/api-reference/v3/reference/scopes#scope-segments_write)

<ResponseField name="conditions" type={<a href="/docs/api-reference/v3/reference/common/json">JSON</a>}>
  Dynamic segment condition tree. Null for static and persona segments.
</ResponseField>

<ResponseField name="countsRefreshedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
  When the member counts were last recalculated. They are not live.
</ResponseField>

<ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
  When the segment was created.
</ResponseField>

<ResponseField name="description" type="String">
  The merchant's description of who this segment is for.
</ResponseField>

<ResponseField name="emailSubscriberCount" type="Int">
  Members subscribed to email marketing as of `countsRefreshedAt`.
</ResponseField>

<ResponseField name="id" type="ID!" required>
  The id of this segment.
</ResponseField>

<ResponseField name="legacyId" type="String!" required>
  The segment's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
</ResponseField>

<ResponseField name="memberCount" type="Int">
  Customers in the segment as of `countsRefreshedAt`. Null until it has first been counted.
</ResponseField>

<ResponseField name="name" type="String!" required>
  The merchant-facing name of the segment.
</ResponseField>

<ResponseField name="smsSubscriberCount" type="Int">
  Members subscribed to SMS marketing as of `countsRefreshedAt`.
</ResponseField>

<ResponseField name="type" type={<a href="/docs/api-reference/v3/reference/marketing/segment-type">SegmentType!</a>} required>
  How membership of this segment is determined.
</ResponseField>

<ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
  When the segment was last updated.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.