Segments

Update a segment with the JSON patch method.

PATCH
/api/v1/envs/{envId}/segments/{segmentId}

Use with caution as this can make arbitrary changes to the segment, incorrect usage may lead to malformed data. Perform a partial update to a segment. The request body must be a valid JSON patch.

Authorization

AccessToken
Authorization<token>

Use access token to access this API. Example: "Authorization: api-MzQ..."

In: header

Path Parameters

segmentId*string
Formatuuid
envId*string

Header Parameters

Organization?string

The organization ID associated with the request. Some APIs require this header to identify the organization context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Workspace?string

The workspace ID associated with the request. Some APIs require this header to identify the workspace context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body?unknown

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/envs/string/segments/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '[    {      "value": "new name",      "path": "/name",      "op": "replace",      "from": null    },    {      "value": "new description",      "path": "/description",      "op": "replace",      "from": null    }  ]'
{  "success": true,  "errors": [    "string"  ],  "data": true}