---
title: "Update segments with workspace Id"
method: PATCH
path: "/workspaces/{workspace_id}/split-segments"
tags: ["Split Segments"]
---

# Update segments with workspace Id

`PATCH /workspaces/{workspace_id}/split-segments`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/workspaces/{workspace_id}/split-segments`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Update split segments with workspace Id

## Path parameters

- `workspace_id` integer, required: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.

## Request body

- SegmentsPatch: Update segments with workspace Id
  - `patch` SegmentPatchData[], required
    - `op` 'add' | 'remove', required: Operation to be performed on the segment
    - `path` 'segments', required: Path of the patch request
    - `value` string, required: Value of the patch request

## Response `200`

Request fulfilled, document follows

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/4b2c943a00dc?raw)
