---
title: "Restore CustomerSegment"
method: POST
path: "/shop/customers/customer-segments/{customerSegmentId}/restore"
tags: ["CustomerSegments"]
---

# Restore CustomerSegment

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

Restores a soft-deleted `CustomerSegment` so it can once again be used for campaigns.
Partner to `deleteCustomerSegment`.

## Response `200`

The customer segment was successfully retrieved.

- object
  - `data` CustomerSegment, required — A named group of customers within a site that can be targeted for marketing campaigns. Segments can be defined manually or filtered automatically by label and membership criteria.
    - `id` string, uuid, required — The unique identifier of the customer segment.
    - `name` string, required — The display name of the segment.
    - `site_id` string, uuid, required — The ID of the site this segment belongs to.
    - `filters` object, nullable, required — Optional filters that define automatic membership criteria for this segment. `null` indicates no filters are applied.
      - `all_customers` boolean — When `true`, all customers in the site are included in the segment regardless of other filters.
      - `label_ids` string[], nullable — Customers that have all of the given label IDs are included in the segment.
      - `membership_type_ids` union — Customers that hold a membership matching one of the given IDs are included in the segment. Use `true` to include customers with any active membership.
        - string[], nullable
        - true

## Other responses

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

---

[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)
