---
title: "Add/Remove segment in/from the exclusion list"
method: POST
path: "/segment/exclude/{operation}"
tags: ["Segments"]
---

# Add/Remove segment in/from the exclusion list

`POST /segment/exclude/{operation}`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/segment/exclude/{operation}`
- Auth: API key in header `Authorization`

Adds/Removes the passed segment id in/from the exclusion list. Exclusion list allows to exclude all the users from the segment during the export job. Pass auth_id to scope the exclusion to one authorization; workflow-level and auth-level exclusions are combined, never substituted.

## Path parameters

- `operation` string, required

## Query parameters

- `account_id` string
- `workflow` string
- `segment_id` string
- `auth_id` string

## Response `200`

OK

- ModelsApiResponse
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

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

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/segment/exclude/:operation/post.md)

---

[API](https://skmtc.dev/lytics/apis/lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/lytics-api/revisions/d8e975057aec?raw)
