{"openapi":"3.1.0","info":{"title":"VPROKSMM API","description":"\nПубличный API VPROKSMM: публикация в подключённые каналы из вашей системы.\n\nАвторизация: заголовок `Authorization: Bearer vpk_…` (ключ создаётся в кабинете:\nНастройки → API). Доступно на тарифе «Маркетолог» и на индивидуальном тарифе.\n\nВсе ошибки — JSON `{\"error\": \"<код>\", \"message\": \"<текст>\"}`. Время — ISO 8601 с часовым\nпоясом. Подробная документация с примерами: https://app.vproksmm.ru/docs/api\n","version":"1.0.0"},"servers":[{"url":"https://api.vproksmm.ru/api/v1"}],"paths":{"/channels":{"get":{"summary":"List Channels","description":"Каналы тенанта. Секреты подключения не отдаются.","operationId":"list_channels_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChannelOut"},"type":"array","title":"Response List Channels Channels Get"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"brand_frozen — бренд заморожен, ключ не действует","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"ApiKey":[]}]}},"/photos":{"post":{"summary":"Upload Photo","description":"Одно фото (JPEG/PNG/WebP до 5 МБ, поле `file`). id годится 24 часа и на один пост.","operationId":"upload_photo_photos_post","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary"}},"type":"object","required":["file"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoOut"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"подписка закончилась / пробный период / brand_frozen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"400":{"description":"файл не фото / не тот формат","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"411":{"description":"нет Content-Length","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"файл больше 5 МБ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"ApiKey":[]}]}},"/videos":{"post":{"summary":"Upload Video","description":"Одно видео (MP4: H.264, звук AAC; до 10 МБ, поле `file`). Лимит частоты общий с\nфото — 40 загрузок в час на кабинет. id годится 24 часа и на один пост.","operationId":"upload_video_videos_post","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary"}},"type":"object","required":["file"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoOut"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"подписка закончилась / пробный период / brand_frozen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"400":{"description":"не MP4 (H.264/AAC) / битый файл / длиннее 10 мин","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"411":{"description":"нет Content-Length","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"файл больше 10 МБ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"ApiKey":[]}]}},"/posts":{"post":{"summary":"Create Post","description":"Создать пост. Ответ 202: пост принят в очередь (или отложен до publish_at).","operationId":"create_post_posts_post","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},{"type":"null"}],"description":"Повтор с тем же ключом и телом вернёт тот же ответ (24 часа)","title":"Idempotency-Key"},"description":"Повтор с тем же ключом и телом вернёт тот же ответ (24 часа)"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreated"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"monthly_limit_reached / subscription_expired / trial_* / brand_frozen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error / unknown_channel / invalid_photo / …","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"idempotency_key_reused — ключ с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"411":{"description":"нет Content-Length","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"тело больше 64 КБ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"text":{"anyOf":[{"maxLength":5000,"type":"string"},{"type":"null"}],"description":"Текст поста (или подпись к фото). Ровно один источник: text или url.","title":"Text"},"url":{"anyOf":[{"maxLength":2048,"minLength":4,"type":"string"},{"type":"null"}],"description":"Ссылка на материал — текст возьмём со страницы.","title":"Url"},"title":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"description":"Заголовок (необязательно)","title":"Title"},"photo_ids":{"description":"id фото из POST /photos, первое — обложка","items":{"type":"string"},"maxItems":10,"title":"Photo Ids","type":"array"},"photos_rights":{"default":false,"description":"Подтверждаю: фото мои и у меня есть права на публикацию (нужно при photo_ids)","title":"Photos Rights","type":"boolean"},"video_id":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"description":"id видео из POST /videos (вместо photo_ids). format=story — ролик истории ВК (до 15 с); обычный пост — ролик в каналы, которые публикуют видео, остальные получат пост с картинкой","title":"Video Id"},"channel_ids":{"anyOf":[{"items":{"type":"integer"},"maxItems":64,"type":"array"},{"type":"null"}],"description":"Каналы (id из GET /channels); по умолчанию — все активные","title":"Channel Ids"},"mode":{"default":"adapt","description":"adapt — ИИ пишет текст под каждую площадку; as_is — публикуем как есть","enum":["adapt","as_is"],"title":"Mode","type":"string"},"publish_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Когда опубликовать, ISO 8601 с часовым поясом; не позже 30 дней","title":"Publish At"},"format":{"default":"post","description":"post — обычный пост; story — история ВКонтакте вместо поста на стене (только каналы vk). Медиа истории: video_id (ролик до 15 с) или первое фото из photo_ids, без них — вертикальная карточка из текста","enum":["post","story"],"title":"Format","type":"string"}},"title":"PostCreate","type":"object"}}}}},"get":{"summary":"List Posts","description":"Последние посты, созданные через API (новые сверху).","operationId":"list_posts_posts_get","security":[{"ApiKey":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":9223372036854775807,"minimum":1},{"type":"null"}],"description":"next_cursor из прошлого ответа","title":"Cursor"},"description":"next_cursor из прошлого ответа"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostListOut"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"brand_frozen — бренд заморожен, ключ не действует","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/posts/{post_id}":{"get":{"summary":"Get Post","description":"Статус поста по каналам: pending → published / failed / skipped.","operationId":"get_post_posts__post_id__get","security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostStatusOut"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"brand_frozen — бренд заморожен, ключ не действует","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"not_found — нет такого поста у вас","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}},"delete":{"summary":"Cancel Post","description":"Отменить отложенный пост (status=scheduled) до publish_at: он не выйдет, место в месячном\nлимите освобождается, дальше GET /posts/{id} отвечает 404. Отправленный в публикацию пост\n(queued и дальше) не отменяется — 409 not_scheduled.","operationId":"cancel_post_posts__post_id__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCancelled"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"brand_frozen — бренд заморожен, ключ не действует","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — см. заголовок Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"not_found — нет такого поста у вас","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"not_scheduled — пост уже отправлен в публикацию, отменить нельзя","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/posts/{post_id}/retry":{"post":{"summary":"Retry Post","description":"Опубликовать повторно: тот же пост (тексты и медиа, без новой генерации) — только в каналы\nэтого поста, куда пост точно не дошёл (площадка отказала до публикации или до канала не\nдошли). Успешные каналы не трогаем; канал, где пост мог выйти (площадка не подтвердила,\nоборвался ответ), не повторяем — проверьте ленту; выключенный и отключённый канал пропускаем.\nПост старше 14 дней не повторяется. Не новая публикация по тарифу: место в лимите\nсписывается один раз на пост. Ответ 202 — статус поста (processing) и поле retry: каналы\nповтора и пропущенные.","operationId":"retry_post_posts__post_id__retry_post","security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},{"type":"null"}],"description":"Ключ — на одну попытку повтора: с тем же ключом 24 часа возвращается прежний ответ, и повтор не запускается. Следующий повтор того же поста — с новым ключом","title":"Idempotency-Key"},"description":"Ключ — на одну попытку повтора: с тем же ключом 24 часа возвращается прежний ответ, и повтор не запускается. Следующий повтор того же поста — с новым ключом"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRetryOut"}}}},"401":{"description":"invalid_api_key — ключа нет, он неверный или отозван","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"monthly_limit_reached / trial_exhausted (+ limit, used, in_progress — как у POST /posts) / subscription_expired / trial_unverified / brand_frozen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"api_not_available — тариф без API; key_author_inactive — автор ключа удалён или лишён прав редактирования; account_closed — кабинет или корень аккаунта закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"validation_error — поле `details` со списком ошибок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"rate_limited — у аккаунта уже идут 3 повтора (+ retry_after, секунды)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"not_found — нет такого поста у вас","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"nothing_to_retry — повторять некуда (поле skipped — причины по каналам); retry_in_progress — публикация поста ещё идёт; post_too_old — пост старше 14 дней; idempotency_key_reused; idempotency_in_progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"retry_unavailable — очередь недоступна","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}}},"components":{"schemas":{"ChannelOut":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type","description":"Площадка: telegram, vk, ok, tenchat, …"},"title":{"type":"string","title":"Title"},"status":{"type":"string","title":"Status","description":"connected — подключён; иначе требует внимания в кабинете"},"active":{"type":"boolean","title":"Active","description":"Канал получает публикации по умолчанию (channel_ids не задан)"}},"type":"object","required":["id","type","title","status","active"],"title":"ChannelOut"},"ErrorOut":{"properties":{"error":{"type":"string","title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["error","message"],"title":"ErrorOut"},"PhotoOut":{"properties":{"photo_id":{"type":"string","title":"Photo Id"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"}},"type":"object","required":["photo_id","width","height"],"title":"PhotoOut"},"PostCancelled":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","const":"cancelled","title":"Status"}},"type":"object","required":["id","status"],"title":"PostCancelled"},"PostChannelStatus":{"properties":{"channel_id":{"type":"integer","title":"Channel Id"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"status":{"type":"string","enum":["pending","published","failed","skipped"],"title":"Status"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"id публикации на площадке; у истории ВК — «<owner_id>_<story_id>»"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["channel_id","type","status","external_url","error"],"title":"PostChannelStatus"},"PostCreated":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","enum":["queued","scheduled"],"title":"Status"},"publish_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Publish At"},"channels":{"items":{"type":"integer"},"type":"array","title":"Channels"}},"type":"object","required":["id","status","publish_at","channels"],"title":"PostCreated"},"PostListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PostStatusOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"PostListOut"},"PostRetryOut":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","enum":["scheduled","queued","processing","published","partially_published","failed"],"title":"Status"},"publish_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Publish At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"channels":{"items":{"$ref":"#/components/schemas/PostChannelStatus"},"type":"array","title":"Channels"},"retry":{"$ref":"#/components/schemas/RetryInfo"}},"type":"object","required":["id","status","publish_at","created_at","channels","retry"],"title":"PostRetryOut"},"PostStatusOut":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","enum":["scheduled","queued","processing","published","partially_published","failed"],"title":"Status"},"publish_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Publish At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"channels":{"items":{"$ref":"#/components/schemas/PostChannelStatus"},"type":"array","title":"Channels"}},"type":"object","required":["id","status","publish_at","created_at","channels"],"title":"PostStatusOut"},"RetryChannel":{"properties":{"channel_id":{"type":"integer","title":"Channel Id"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["channel_id","type"],"title":"RetryChannel"},"RetryInfo":{"properties":{"channels":{"items":{"$ref":"#/components/schemas/RetryChannel"},"type":"array","title":"Channels","description":"Каналы, куда ушёл повтор"},"skipped":{"items":{"$ref":"#/components/schemas/RetrySkipped"},"type":"array","title":"Skipped","description":"Каналы без повтора — с причиной"}},"type":"object","required":["channels","skipped"],"title":"RetryInfo"},"RetrySkipped":{"properties":{"channel_id":{"type":"integer","title":"Channel Id"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"type":"string","title":"Code","description":"already_published, maybe_published, channel_inactive, channel_paused, channel_disconnected, channel_disabled, channel_missing, no_text, media_missing, intl_not_in_tier, vc_monthly_cap, tiktok_confirm, platform_processing"},"message":{"type":"string","title":"Message"}},"type":"object","required":["channel_id","type","code","message"],"title":"RetrySkipped"},"VideoOut":{"properties":{"video_id":{"type":"string","title":"Video Id"},"duration_sec":{"type":"number","title":"Duration Sec"}},"type":"object","required":["video_id","duration_sec"],"title":"VideoOut"}},"securitySchemes":{"ApiKey":{"type":"http","description":"Ключ API из кабинета (Настройки → API): `Authorization: Bearer vpk_…`","scheme":"bearer"}}}}