---
title: "Add CustomerSegmentMember"
method: POST
path: "/shop/customers/customer-segments/{customerSegmentId}/members"
tags: ["CustomerSegmentMembers"]
---

# Add CustomerSegmentMember

`POST /shop/customers/customer-segments/{customerSegmentId}/members`

Adds a customer to the given `CustomerSegment`.

## Request body

- object
  - `customer_id` string, uuid, required — The ID of the customer to add to the segment.

## Response `201`

The segment member was successfully retrieved.

- object
  - `data` CustomerSegmentMember, required — A customer who is a member of a `CustomerSegment`. Tracks subscription state for marketing communications.
    - `id` string, uuid, required — The unique identifier of the segment membership record.
    - `segment_id` string, uuid, required — The ID of the segment this membership belongs to.
    - `unsubscribed_at` string, date-time, nullable, required — The datetime at which the customer unsubscribed from this segment's communications, or `null` if they are currently subscribed.
    - `customer` CustomerSummary, required — A summary of the `Customer` this order belongs to.
      - `id` string, uuid, required — The ID of the customer.
      - `email` string, nullable, required — The email address of the customer. The case of the email address is not preserved, so you'll always see this in lowercase.
      - `first_name` string, nullable, required — The first name of the customer.
      - `full_name` string, nullable, required — The customer's full name
      - `labels` Label[], required
        - `id` string, required
        - `color` string, nullable, required
        - `name` string, required
      - `last_name` string, nullable, required — The last name of the customer.
      - `phone` string, nullable, required — The customer's phone number in E.164 format, or `null` if not provided.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
