---
title: "Get a contact segment"
method: GET
path: "/contacts/segments/{segment_id}"
---

# Get a contact segment

`GET /contacts/segments/{segment_id}`

Get a contact segment definition by id

## Path parameters

- `segment_id` string, uuid, required

## Response `200`

Default Response

- ContactSegment
  - `id` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `definition` object, nullable, required
    - `or` object[], required
      - `and` ContactsFilter[], required
        - union
          - object
            - `type` 'all_contacts', required
          - object
            - `type` 'contact_id_in', required
            - `contact_ids` string[], required
          - object
            - `type` 'contacts_created_at_between', required
            - `after` string, date-time
            - `before` string, date-time
          - object
            - `type` 'contacts_email_domain_name_in', required
            - `domain_name_in` string[], required
          - object
            - `type` 'contacts_affected_by_sequence', required
            - `sequence_id` string, required
          - object
            - `type` 'contacts_name_in', required
            - `name_in` string[], required
          - object
            - `type` 'contacts_phone_number_in', required
            - `phone_number_in` string[], required
          - object
            - `type` 'contacts_email_in', required
            - `email_in` string[], required
          - object
            - `type` 'contacts_attributes_in', required
            - `attributes` object[]
              - …
          - object
            - `type` 'contacts_sessions_attributes_in', required
            - `attributes` object[]
              - …
          - object
            - `type` 'contact_belongs_to_segment', required
            - `segment_id` string, required
            - `belongs` boolean
          - object
            - `type` 'last_contacted_at_between', required
            - `after` string, date-time
            - `before` string, date-time
          - object
            - `type` 'last_contacted_at_with_handoff_between', required
            - `after` string, date-time
            - `before` string, date-time
          - object
            - `type` 'contact_has_phone', required
            - `has` boolean, required
          - object
            - `type` 'contact_has_email', required
            - `has` boolean, required
          - object
            - `type` 'contact_is_blocked', required
            - `blocked` boolean, required
          - object
            - `type` 'contact_is_unsubscribed', required
            - `unsubscribed` boolean, required
          - object
            - `type` 'contacts_custom_data', required
            - `conditions` object[], required
              - …
  - `created_at` string, nullable, required — ISO 8601 timestamp of when the segment was created
  - `updated_at` string, nullable, required — ISO 8601 timestamp of when the segment was last updated

## Other responses

- `500` — Internal Server Error

---

[API](https://skmtc.net/open/apis/opencx-api.md) · [All operations](https://skmtc.net/open/apis/opencx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/open/opencx-api/versions/57b06b52302d/schema)
