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

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

publishSite

Обновлено

POST /api/v1/tools/site/publish

Publish a staged site bundle

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

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

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

ПолеЗначение
0.description"Tenant, credential and handler-bound byte-shape replay key"
0.in"header"
0.name"Idempotency-Key"
0.requiredtrue
0.schema0.schema

Тело запроса

ПолеЗначение
content.application/json.schemaSitePublishRequest
requiredtrue

Ответы

ПолеЗначение
201.content.application/json.schemaSitePublishResult
201.description"Tenant site control-plane result"
201.headers.X-Bot-Username.description"Active bot username, when resolved"
201.headers.X-Bot-Username.schema201.headers.X-Bot-Username.schema
201.headers.X-Client-Slug.description"Active tenant slug, when resolved"
201.headers.X-Client-Slug.schema201.headers.X-Client-Slug.schema
201.headers.X-RateLimit-Limit.description"Effective request budget"
201.headers.X-RateLimit-Limit.schema201.headers.X-RateLimit-Limit.schema
201.headers.X-RateLimit-Remaining.description"Remaining request budget"
201.headers.X-RateLimit-Remaining.schema201.headers.X-RateLimit-Remaining.schema
201.headers.X-RateLimit-Reset.description"Unix window reset in seconds"
201.headers.X-RateLimit-Reset.schema201.headers.X-RateLimit-Reset.schema

Ошибки

ПолеЗначение
400.content.application/problem+json.schemaProblemDetails
400.description"Invalid strict publish input or missing replay key"
400.x-error-codes["VALIDATION_ERROR","IDEMPOTENCY_KEY_REQUIRED"]
401.content.application/problem+json.schemaProblemDetails
401.description"Missing, invalid, revoked or conflicting credential; surface JWT is refused"
401.x-error-codes["INVALID_API_KEY"]
403.content.application/problem+json.schemaProblemDetails
403.description"Missing scope, prohibited publishable credential or absent active bot"
403.x-error-codes["INSUFFICIENT_SCOPE","PUBLISHABLE_KEY_NOT_ALLOWED","NO_ACTIVE_BOT"]
404.content.application/problem+json.schemaProblemDetails
404.description"No tenant-owned staged bundle or connected host"
404.x-error-codes["NOT_FOUND"]
409.content.application/problem+json.schemaProblemDetails
409.description"Stale ticket base or access policy; request a new upload ticket. Other typed domain conflict or request in flight"
409.x-error-codes["CONFLICT","SITE_BUNDLE_STALE"]
413.content.application/problem+json.schemaProblemDetails
413.description"Resource policy size or item-count limit exceeded"
413.x-error-codes["PAYLOAD_TOO_LARGE","ITEM_COUNT_EXCEEDED"]
422.content.application/problem+json.schemaProblemDetails
422.description"Replay mismatch; a path outside the permitted publication prefix or reserved on a tenant site host; an HTML tag over the parser bound (details.path, details.limitBytes, details.tag, details.attr); a video over the per-video size of the plan (details.path, details.limitBytes); a bundle over the site size of the plan (details.limitBytes) or the file count of a site, the same on every plan (details.limitFiles)"
422.x-error-codes["IDEMPOTENCY_KEY_MISMATCH","SITE_PATH_OUTSIDE_PUBLISHABLE_PREFIX","SITE_PATH_RESERVED","SITE_HTML_TAG_TOO_LARGE","SITE_VIDEO_TOO_LARGE","SITE_BUNDLE_TOO_LARGE","SITE_TOO_MANY_FILES"]
429.content.application/problem+json.schemaProblemDetails
429.description"Resource rate budget exceeded or unavailable"
429.headers.Retry-After.description"Retry delay in seconds, when supplied by the limiter"
429.headers.Retry-After.schema429.headers.Retry-After.schema
429.x-error-codes["RATE_LIMIT_EXCEEDED","RATE_LIMIT_UNAVAILABLE"]
500.content.application/problem+json.schemaProblemDetails
500.description"Unexpected internal failure"
500.x-error-codes["INTERNAL_ERROR"]

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

ПолеЗначение
description"Owner-only site:write. host plus UUID uploadId; no action_id. Staging is scoped to credential tenant. Server-side object sizes govern the live cap before download; staged declaration must match. Ticket host/mode/base cannot be rebound or reinterpreted. Merge preserves omitted files and access rules; replace is a complete snapshot. A changed base or access policy yields SITE_BUNDLE_STALE 409: request a new ticket, PUT its files and publish again. Delta Sync returns uploaded, deleted and unchanged paths plus manifestDigest, attributionSnippet and pageUrls for only ticket HTML paths actually finished published. Use the exact returned URLs. The full effective site quota and the per-video size are checked again on server sizes. An HTML tag longer than the publisher reads (details.limitBytes; usually an image, video or font inlined as a data: URL) is SITE_HTML_TAG_TOO_LARGE naming the page, element and attribute; move that data into its own bundle file. Every refusal leaves the live site unchanged. Successful publication clears staging; failed staging remains retryable. No secret approval gate."
operationId"publishSite"
summary"Publish a staged site bundle"
tags["site"]
x-idempotency.conflictStatus422
x-idempotency.implementation"global-cache"
x-idempotency.replayStatus201
x-idempotency.requiredtrue
x-idempotency.scope["client","credential","controller-handler","key"]
x-idempotency.ttlSeconds86400
x-pagination.queryParameters[]
x-pagination.supportedfalse
x-scope-semantics"ALL"