---
title: "Delete segments with either ids or by type"
method: DELETE
path: "/v1/assets/{asset_id}/segments/bulk/"
---

# Delete segments with either ids or by type

`DELETE /v1/assets/{asset_id}/segments/bulk/`

## Request

- Base URL: `https://app.iconik.io/API/assets`
- URL: `https://app.iconik.io/API/assets/v1/assets/{asset_id}/segments/bulk/`
- Auth: none declared. Required headers: `App-ID`, `Auth-Token`
- TypeScript: <https://skmtc.dev/iconik/apis/iconik-assets/docs/v1/assets/:asset_id/segments/bulk/delete.ts> (a function with typed inputs; its response is checked against the schema)

Required roles:
 - can_delete_segments

## Path parameters

- `asset_id` string, required

## Query parameters

- `immediately` boolean
- `ignore_reindexing` boolean

## Headers

- `App-ID` string, required
- `Auth-Token` string, required

## Request body

- DeleteSegmentsSchema
  - `attributes` SegmentAttributeMatch[]: List of Segment attribute name/value pairs that must all match for a segment to be deleted. Can be combined with segment_ids or segment_type to further filter which segments are deleted.
    - `name` string, required
    - `operator` 'eq' | 'lt' | 'gt': Comparison operator used when matching the attribute. 'eq' works for any attribute, while 'lt' (less than) and 'gt' (greater than) are only valid for date and number attributes.
    - `value` unknown, required
  - `segment_ids` string[]
  - `segment_type` 'MARKER' | 'QC' | 'GENERIC' | 'COMMENT' | 'TAG' | 'TRANSCRIPTION' | 'SCENE' | 'SHOT' | 'PERSON' | 'SEMANTIC_TRANSCRIPTION'
  - `version_id` string, uuid, nullable

## Response `204`

Without body

## Other responses

- `400`: Segment ids or segment type not provided correctly
- `401`: Token is invalid
- `403`: Share user is not allowed to delete the segments
- `404`: No segments found
- `default`: Error response

---

[API](https://skmtc.dev/iconik/apis/iconik-assets.md) - [All operations](https://skmtc.dev/iconik/apis/iconik-assets/llms.txt) - [OpenAPI document](https://skmtc.dev/iconik/apis/iconik-assets/revisions/62580d9e640e?raw)
