---
title: "Update a specific segment"
method: PUT
path: "/api-offers/segment/{segmentId}"
tags: ["Segment"]
---

# Update a specific segment

`PUT /api-offers/segment/{segmentId}`

## Request

- Base URL: `https://live.copilot.fabric.inc`
- URL: `https://live.copilot.fabric.inc/api-offers/segment/{segmentId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fabric/apis/offers-v2/docs/api-offers/segment/:segmentId/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a specific segment by segmentId

## Path parameters

- `segmentId` number, required

## Headers

- `x-site-context` string, required

## Request body

- CreateSegmentRequest
  - `name` string, required: Name of segment
  - `value` string[], required: Array of segment value

## Response `200`

OK

- GetSegmentResponse
  - `_id` string: fabric internal database ObjectId of the record
  - `segmentId` number: System generated unique ID of the Segment
  - `name` string: Name of the segment
  - `value` string[]: Array of segment values
  - `deleted` boolean: true: segment is deleted<br /> false: segment is not deleted
  - `createdAt` string, date-time: Creation date of the record
  - `updatedAt` string, date-time: Last updated date of the record

## Other responses

- `400`: Bad request
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/fabric/apis/offers-v2.md) - [All operations](https://skmtc.dev/fabric/apis/offers-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/fabric/apis/offers-v2/revisions/da2bd742b9bc?raw)
