---
title: "Update a Market Segmentation Segment."
method: PATCH
path: "/market-segmentation/v1/segments/{id}"
tags: ["Market Segmentation"]
---

# Update a Market Segmentation Segment.

`PATCH /market-segmentation/v1/segments/{id}`

## Request

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

## Path parameters

- `id` Id, required (unresolved $ref)

## Headers

- `x-property-id` string, required

## Request body

- SegmentUpdateRequestSchema
  - `id` string, required: Segment ID.
  - `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 `200`

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