# deleteSavedSegment

Source: <https://telegafirst.com/docs/api-op-deletesavedsegment>
Locale: ru
releaseGitSha: ea133cd4ad87fe549ef000b139be145be9bd1717
sourceContentDigest: d5c25b3c755e6296b096989292c242f759d611175f4c6066a3dcd27246e6a43a
Version: 2

# deleteSavedSegment

`DELETE /api/v1/tools/segments/saved/{seqNum}`

Delete an unreferenced saved filter with optimistic version

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["broadcasts:write"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.description | "Replay the same tenant, credential, controller handler and request for 24 hours." |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | false |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9ac136edb99a2063b3091602181c8d2022fdccb5b514991319d58544c2e57e95) |
| 1.in | "path" |
| 1.name | "seqNum" |
| 1.required | true |
| 1.schema | [1.schema](https://telegafirst.com/docs/schema-957862ee8ac02611c4b9b0014146301834c735bffb8ff32d10c381dea64ed87c) |

## Тело запроса

| Поле | Значение |
| - | - |
| content.application/json.schema | [SavedSegmentDeleteRequest](https://telegafirst.com/docs/schema-48559c729d2e66a00747486bc2383f714a66137ff1558d36ef16354008af1705) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 200.content.application/json.schema | [SavedSegmentDeleteResult](https://telegafirst.com/docs/schema-a04d63a680bf747dec2c8784ef16cd9721bc7aeee3afe6056460d106834dbaea) |
| 200.description | "Deleted saved segment." |
| 200.headers.X-Bot-Username.schema | [200.headers.X-Bot-Username.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-Client-Slug.schema | [200.headers.X-Client-Slug.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Limit.schema | [200.headers.X-RateLimit-Limit.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Remaining.schema | [200.headers.X-RateLimit-Remaining.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Reset.schema | [200.headers.X-RateLimit-Reset.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "Strict path/body validation failed." |
| 400.x-error-codes | \["VALIDATION\_ERROR"] |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "Missing, invalid, revoked, expired or conflicting API credentials; surface-session JWT is not accepted." |
| 401.x-error-codes | \["INVALID\_API\_KEY"] |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "Required effective scope, non-publishable credential and an active bot are mandatory." |
| 403.x-error-codes | \["INSUFFICIENT\_SCOPE","PUBLISHABLE\_KEY\_NOT\_ALLOWED","NO\_ACTIVE\_BOT"] |
| 404.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 404.description | "Sequence not found in the authenticated tenant." |
| 404.x-error-codes | \["NOT\_FOUND"] |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 409.description | "The same-key request is already processing, or the saved segment version/reference conflicts." |
| 409.x-error-codes | \["CONFLICT"] |
| 413.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 413.description | "The per-tool request size or item count exceeds the resource policy." |
| 413.x-error-codes | \["PAYLOAD\_TOO\_LARGE","ITEM\_COUNT\_EXCEEDED"] |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 422.description | "Idempotency-Key was reused with different request inputs." |
| 422.x-error-codes | \["IDEMPOTENCY\_KEY\_MISMATCH"] |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 429.description | "The per-tool rate limit is exceeded or unavailable; fail closed." |
| 429.headers.Retry-After.description | "Seconds before retry, when supplied by the resource policy." |
| 429.headers.Retry-After.required | false |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-2a1379ebe9f4b632fbdf3732d4b86b26e9fbf2aa92cf2449dde7bf4dc122060f) |
| 429.x-error-codes | \["RATE\_LIMIT\_EXCEEDED","RATE\_LIMIT\_UNAVAILABLE"] |
| 500.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 500.description | "Unexpected failure; the private cause is withheld." |
| 500.x-error-codes | \["INTERNAL\_ERROR"] |

## Дополнительные условия

| Поле | Значение |
| - | - |
| description | "The JSON body requires expectedVersion. Wrong version or a broadcast reference returns409; a missing tenant sequence returns404. Idempotency-Key is optional on DELETE; a supplied key replays the completed result, while a new unkeyed request after deletion is404." |
| operationId | "deleteSavedSegment" |
| summary | "Delete an unreferenced saved filter with optimistic version" |
| tags | \["segments"] |
| x-idempotency.mismatchStatus | 422 |
| x-idempotency.required | false |
| x-idempotency.ttlSeconds | 86400 |
| x-pagination.kind | "none" |
