---
title: "Create a new Market Segmentation Segment."
method: POST
path: "/market-segmentation/v1/segments"
tags: ["Market Segmentation"]
---

# Create a new Market Segmentation Segment.

`POST /market-segmentation/v1/segments`

## Request

- Base URL: `https://api.cloudbeds.com`
- URL: `https://api.cloudbeds.com/market-segmentation/v1/segments`
- Auth: OAuth 2
  - Authorization code: `https://api.cloudbeds.com/auth/oauth/authorize`
  - Token URL: `https://api.cloudbeds.com/auth/oauth/token` scopes: `write:marketsegment`

## Headers

- `x-property-id` string, required

## Request body

- SegmentCreateRequestSchema
  - `groupId` string, required: Group ID.
  - `name` string, required: Segment name.
  - `code` string, required: Segment code.
  - `description` string, required: Segment description.
  - `isEnabled` boolean, required: Is Segment enabled?.
  - `ratePlanIds` string[], required: List of Rate Plan IDs.

## Response `201`

Created Market Segmentation Segment.

- SegmentResponseSchema
  - `id` string
  - `groupId` string
  - `name` string
  - `code` string
  - `description` string
  - `isEnabled` boolean
  - `isDefault` boolean
  - `ratePlanIds` string[]
  - `createdAt` string, Y-m-d\TH:i:sP
  - `updatedAt` string, Y-m-d\TH:i:sP, nullable
  - `canEdit` string[]
  - `canDelete` boolean
  - `canDisable` boolean

## Other responses

- `400`: Bad request response.
- `403`: Forbidden response.
- `404`: Not found response.
- `500`: Internal server error.

---

[API](https://skmtc.dev/cloudbeds/apis/cloudbeds-api-v2.md) - [All operations](https://skmtc.dev/cloudbeds/apis/cloudbeds-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/cloudbeds-api-v2/revisions/69bffac143cc?raw)
