К содержанию
TelegaFirst

Для AI-агентов: markdown этой страницы — /docs/api-op-finalizemediaupload.mdиндекс документации — /llms.txt

finalizeMediaUpload

Обновлено

POST /api/v1/media/uploads/{uploadId}/finalize

finalizeMediaUpload

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

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["content:write"]

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

ПолеЗначение
0.description"Optional 24-hour HTTP replay key for this bodyless POST"
0.in"header"
0.name"Idempotency-Key"
0.requiredfalse
0.schema0.schema
1.in"path"
1.name"uploadId"
1.requiredtrue
1.schema1.schema

Тело запроса

ПолеЗначение
Тело запросаnull

Ответы

ПолеЗначение
200.content.application/json.schema200.content.application/json.schema
200.description"Promoted and committed immutable media references"
200.headers.X-Bot-Username.description"Authenticated public bot username, when available"
200.headers.X-Bot-Username.schema200.headers.X-Bot-Username.schema
200.headers.X-Client-Slug.description"Authenticated tenant slug, when available"
200.headers.X-Client-Slug.schema200.headers.X-Client-Slug.schema
200.headers.X-RateLimit-Limit.description"Effective request budget"
200.headers.X-RateLimit-Limit.schema200.headers.X-RateLimit-Limit.schema
200.headers.X-RateLimit-Remaining.description"Remaining budget or unknown"
200.headers.X-RateLimit-Remaining.schema200.headers.X-RateLimit-Remaining.schema
200.headers.X-RateLimit-Reset.description"Window reset Unix seconds"
200.headers.X-RateLimit-Reset.schema200.headers.X-RateLimit-Reset.schema

Ошибки

ПолеЗначение
401.content.application/problem+json.schemaProblemDetails
401.description"Missing or invalid API key"
403.content.application/problem+json.schemaProblemDetails
403.description"Scope or resource policy refused the request"
404.content.application/problem+json.schemaProblemDetails
404.description"Upload does not exist for the authenticated tenant"
409.content.application/problem+json.schemaProblemDetails
409.description"CONFLICT: durable outcome differs or HTTP replay key is processing"
413.content.application/problem+json.schemaProblemDetails
413.description"PAYLOAD_TOO_LARGE or ITEM_COUNT_EXCEEDED: per-tool resource limits"
422.content.application/problem+json.schemaProblemDetails
422.description"VALIDATION_ERROR: invalid upload id or uncommittable state; IDEMPOTENCY_KEY_MISMATCH: different path under the same HTTP key"
429.content.application/problem+json.schemaProblemDetails
429.description"RATE_LIMIT_EXCEEDED or RATE_LIMIT_UNAVAILABLE: resource budget refusal"
429.headers.Retry-After.description"Retry delay in seconds, when supplied by the limiter"
429.headers.Retry-After.schema429.headers.Retry-After.schema
500.content.application/problem+json.schemaProblemDetails
500.description"INTERNAL_ERROR: unexpected failure; no internal payload is exposed"

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

ПолеЗначение
operationId"finalizeMediaUpload"
tags["media"]
x-idempotency"http-cache"