---
updatedAt: 2026-04-24T16:36:55.000Z
agentTools:
  projectIndex: https://developers.cloudbeds.com/llms.txt
---

# Update a Market Segmentation Segment.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Cloudbeds API v2",
    "description": "<p>Welcome to the documentation for <strong>Cloudbeds API Version v2</strong>! If you are looking to learn how to use the Cloudbeds API to access guest information, reservations, or similar data for your Cloudbeds customers, then you've come to the right place.</p><p>In this document you will find all the API methods we provide along with explanations for parameters and response examples.</p><p>If you have questions about different implementation steps (e.g. how to implement OAuth 2.0), please refer to our <a href='https://integrations.cloudbeds.com/hc/en-us'>Integrations Portal</a>.</p><p>Be sure to <a href='https://go.pardot.com/l/308041/2018-07-24/qb2lg'>subscribe</a> to the monthly Cloudbeds API announcement mailing list to receive information on new additions and improvements to the Cloudbeds API and related developer tools.</p><p><strong>Endpoint:</strong> https://api.cloudbeds.com/{method}</p><p><strong>HTTPS:</strong> Our API requires HTTPS. We'll respond with an appropriate error if you're not using it.</p><p><strong>Request Format:</strong> HTTP GET, POST and PUT (Content-Type: application/x-www-form-urlencoded)</p><p><strong>Response Format:</strong> JSON</p><p><strong>Response Header:</strong> X-Request-ID is added to response headers in all calls to help accelerate support and troubleshooting.</p><p><strong><a href='https://integrations.cloudbeds.com/hc/en-us/articles/14104678058267-API-Documentation#postman-collection'><img src='https://run.pstmn.io/button.svg' alt='Run in Postman'></a></strong> use this link to access our Public collection in Postman.</p>",
    "version": "v2"
  },
  "servers": [
    {
      "url": "https://api.cloudbeds.com/",
      "description": "Cloudbeds API v2"
    }
  ],
  "paths": {
    "/market-segmentation/v1/segments/{id}": {
      "patch": {
        "tags": [
          "Market Segmentation"
        ],
        "summary": "Update a Market Segmentation Segment.",
        "operationId": "SegmentController::update",
        "parameters": [
          {
            "name": "x-property-id",
            "in": "header",
            "description": "A numeric, comma-separated string representing the property IDs, sent in the header.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1,2,3"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Segment ID.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SegmentUpdateRequestSchema/properties/id"
            }
          }
        ],
        "requestBody": {
          "description": "Segment data.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentUpdateRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Market Segmentation Segment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentResponseSchema"
                }
              }
            }
          },
          "400": {
            "description": "Bad request response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponseSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenResponseSchema"
                }
              }
            }
          },
          "404": {
            "description": "Not found response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundResponseSchema"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponseSchema"
                }
              }
            }
          }
        },
        "security": [
          {
            "default": [
              "write:marketsegment"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "BadRequestErrorItemSchema": {
        "required": [
          "field",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BadRequestErrorListSchema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/BadRequestErrorItemSchema"
        }
      },
      "BadRequestResponseSchema": {
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "errors": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BadRequestErrorListSchema"
              }
            ],
            "nullable": true,
            "description": "The list of errors"
          },
          "code": {
            "description": "Error code identifying the type of error",
            "type": "string",
            "example": "INVALID_REQUEST",
            "nullable": true
          }
        },
        "type": "object"
      },
      "ForbiddenResponseSchema": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "InternalServerErrorResponseSchema": {
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "description": "Error code identifying the type of error",
            "type": "string",
            "example": "PAYMENT_VOID_FAILED",
            "nullable": true
          }
        },
        "type": "object"
      },
      "NotFoundResponseSchema": {
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "description": "Error code identifying the type of error",
            "type": "string",
            "example": "RESOURCE_NOT_FOUND",
            "nullable": true
          }
        },
        "type": "object"
      },
      "SegmentUpdateRequestSchema": {
        "required": [
          "id",
          "groupId",
          "name",
          "code",
          "description",
          "isEnabled",
          "ratePlanIds"
        ],
        "properties": {
          "id": {
            "description": "Segment ID.",
            "type": "string",
            "example": "1-b"
          },
          "groupId": {
            "description": "Group ID.",
            "type": "string",
            "example": "1-b"
          },
          "name": {
            "description": "Segment name.",
            "type": "string",
            "example": "Abc"
          },
          "code": {
            "description": "Segment code.",
            "type": "string",
            "maxLength": 16,
            "example": "1000"
          },
          "description": {
            "description": "Segment description.",
            "type": "string",
            "example": "This is a Segment"
          },
          "isEnabled": {
            "description": "Is Segment enabled?.",
            "type": "boolean",
            "example": true
          },
          "ratePlanIds": {
            "description": "List of Rate Plan IDs.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "1-a",
              "2-b",
              "3-c"
            ]
          }
        },
        "type": "object"
      },
      "SegmentResponseSchema": {
        "properties": {
          "id": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "ratePlanIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "Y-m-d\\TH:i:sP"
          },
          "updatedAt": {
            "type": "string",
            "format": "Y-m-d\\TH:i:sP",
            "nullable": true
          },
          "canEdit": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "canDelete": {
            "type": "boolean"
          },
          "canDisable": {
            "type": "boolean"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "default": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.cloudbeds.com/auth/oauth/authorize",
            "tokenUrl": "https://api.cloudbeds.com/auth/oauth/token",
            "scopes": {
              "read:addon": "Read Addon information",
              "read:doorLockKey": "Read DoorLock keys and settings",
              "write:doorLockKey": "Write DoorLock keys and settings",
              "delete:doorLockKey": "Delete DoorLock keys and settings",
              "read:housekeeping": "Read Housekeeping inspections",
              "read:marketsegment": "Read Market Segmentation groups and segments",
              "write:marketsegment": "Write Market Segmentation groups and segments",
              "delete:marketsegment": "Delete Market Segmentation groups and segments",
              "write:importTask": "Create new data imports",
              "read:importTask": "Read data imports",
              "hotel:read": "Read Hotel information",
              "hotel:write": "Write Hotel information",
              "hotel:delete": "Delete Hotel information",
              "write:appError": "Write AppError information",
              "read:agePolicy": "Read Age Policy information",
              "write:agePolicy": "Write Age Policy information",
              "delete:agePolicy": "Delete Age Policy information",
              "write:allotmentBlocks": "Write AllotmentBlock information",
              "read:allotmentBlocks": "Read AllotmentBlock information",
              "delete:allotmentBlocks": "Delete AllotmentBlock information",
              "read:aiAvailability": "Read availability and pricing for AI agents"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Market Segmentation",
      "description": "Market Segmentation"
    }
  ]
}
```