---
title: "Create a segment"
method: POST
path: "/v1/segments"
tags: ["segment"]
---

# Create a segment

`POST /v1/segments`

This endpoint creates a new segment using the data provided in the request body.

## Request body

- V1CreateSegmentRequest
  - `segment` V1Segment, required
    - `id` string
    - `segmentId` string — The identifier of the segment.
    - `sourceId` string — The identifier the source where the segment came from.
    - `name` string — The name of the campaign.
    - `description` string — Meaningful description of the segment.
    - `category` string[] — The category to which segment belongs.
    - `retailerTeamId` string — The identifier of the retailer that owns the segment.

## Response `200`

The created segment

- V1CreateSegmentResponse
  - `segment` V1Segment, required
    - `id` string
    - `segmentId` string — The identifier of the segment.
    - `sourceId` string — The identifier the source where the segment came from.
    - `name` string — The name of the campaign.
    - `description` string — Meaningful description of the segment.
    - `category` string[] — The category to which segment belongs.
    - `retailerTeamId` string — The identifier of the retailer that owns the segment.

## Other responses

- `400` — There was a problem with input.
- `401` — Login failed or token not valid.
- `403` — Login failed or token not valid.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/citrusad/apis/citrus-auth-api.md) · [All operations](https://skmtc.net/citrusad/apis/citrus-auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/citrusad/citrus-auth-api/revisions/a040003c7378/schema)
