{
    "openapi": "3.1.0",
    "info": {
        "title": "castbase API",
        "description": "REST API \u0430\u0432\u0442\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Instagram. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u2014 Bearer API-\u043a\u043b\u044e\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (`Authorization: Bearer cb_live_\u2026`).\n\n\u0412\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u2014 `application/problem+json` (RFC 9457) \u0441 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c `code`; \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u043e\u0434\u043e\u0432 \u2014 https://docs.castbase.ru/errors.\n\u041a\u0430\u0436\u0434\u044b\u0439 `POST` \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a `Idempotency-Key` (\u043f\u043e\u0432\u0442\u043e\u0440 \u0441 \u0442\u0435\u043c \u0436\u0435 \u043a\u043b\u044e\u0447\u043e\u043c \u0438 \u0442\u0435\u043b\u043e\u043c \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0443\u0431\u043b\u044f, \u043a\u043b\u044e\u0447 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 72 \u0447\u0430\u0441\u0430).\n\u041b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 \u043d\u0430 API-\u043a\u043b\u044e\u0447, \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 `429` \u0441 `Retry-After`.\n\n\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 curl, Python, JavaScript, PHP \u0438 Go \u2014 https://docs.castbase.ru.\n",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://castbase.ru",
            "description": "\u041f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d"
        }
    ],
    "paths": {
        "/v1/events": {
            "get": {
                "tags": [
                    "\u0421\u043e\u0431\u044b\u0442\u0438\u044f"
                ],
                "summary": "\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430",
                "description": "\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u0434\u0443\u0442 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443. \u0425\u0440\u0430\u043d\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 seq \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u043a\u0430\u043a after: \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0435.",
                "operationId": "get_api_events",
                "parameters": [
                    {
                        "name": "after",
                        "in": "query",
                        "description": "seq \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f (0 \u2014 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430)",
                        "schema": {
                            "type": "integer",
                            "default": 0,
                            "minimum": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100,
                            "maximum": 500,
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430; next_after \u2014 \u043a\u0443\u0440\u0441\u043e\u0440 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u0440\u0430\u0432\u0435\u043d after, \u0435\u0441\u043b\u0438 \u043d\u043e\u0432\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0435\u0442)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "data",
                                        "next_after"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Event"
                                            }
                                        },
                                        "next_after": {
                                            "type": "integer",
                                            "example": 12
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/v1/platforms/instagram": {
            "get": {
                "tags": [
                    "\u041f\u043b\u043e\u0449\u0430\u0434\u043a\u0438"
                ],
                "summary": "\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f Instagram \u043a \u043f\u043e\u0441\u0442\u0430\u043c \u0438 \u043c\u0435\u0434\u0438\u0430",
                "description": "\u0422\u0435 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u043e\u0441\u0442\u044b: \u043d\u0435 \u0437\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.",
                "operationId": "get_api_platform_instagram",
                "responses": {
                    "200": {
                        "description": "\u041b\u0438\u043c\u0438\u0442\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u0438, \u043c\u0435\u0434\u0438\u0430 \u0438 \u043e\u043a\u043d\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "platform",
                                        "kinds",
                                        "caption_max",
                                        "hashtags_max",
                                        "carousel",
                                        "image",
                                        "video",
                                        "options",
                                        "publish_at"
                                    ],
                                    "properties": {
                                        "platform": {
                                            "type": "string",
                                            "example": "instagram"
                                        },
                                        "kinds": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "enum": [
                                                    "image",
                                                    "carousel",
                                                    "reels"
                                                ]
                                            }
                                        },
                                        "caption_max": {
                                            "type": "integer",
                                            "example": 2200
                                        },
                                        "hashtags_max": {
                                            "type": "integer",
                                            "example": 30
                                        },
                                        "carousel": {
                                            "properties": {
                                                "min": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "max": {
                                                    "type": "integer",
                                                    "example": 20
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "image": {
                                            "properties": {
                                                "mime": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "example": [
                                                        "image/jpeg",
                                                        "image/png",
                                                        "image/webp"
                                                    ]
                                                },
                                                "max_bytes": {
                                                    "type": "integer",
                                                    "example": 8388608
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "video": {
                                            "properties": {
                                                "mime": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "example": [
                                                        "video/mp4",
                                                        "video/quicktime"
                                                    ]
                                                },
                                                "max_bytes": {
                                                    "type": "integer",
                                                    "example": 314572800
                                                },
                                                "min_ms": {
                                                    "type": "integer",
                                                    "example": 3000
                                                },
                                                "max_ms": {
                                                    "type": "integer",
                                                    "example": 900000
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "options": {
                                            "description": "\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 options \u043f\u043e\u0441\u0442\u0430 \u0438 \u0438\u0445 \u0442\u0438\u043f\u044b",
                                            "type": "object",
                                            "example": {
                                                "share_to_feed": "boolean",
                                                "audio_name": "string"
                                            }
                                        },
                                        "publish_at": {
                                            "properties": {
                                                "max_days_ahead": {
                                                    "type": "integer",
                                                    "example": 75
                                                },
                                                "next_slot": {
                                                    "type": "boolean"
                                                },
                                                "expires_after_hours": {
                                                    "type": "integer",
                                                    "example": 24
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    }
                }
            }
        },
        "/v1/posts": {
            "get": {
                "tags": [
                    "\u041f\u043e\u0441\u0442\u044b"
                ],
                "summary": "\u041f\u043e\u0441\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e\u0432\u044b\u0435 \u0441\u0432\u0435\u0440\u0445\u0443",
                "operationId": "get_api_posts_list",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "scheduled",
                                "processing",
                                "published",
                                "partially_published",
                                "failed",
                                "cancelled"
                            ]
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "next_cursor \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "maximum": 100,
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u0441\u0442\u043e\u0432; next_cursor = null \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "data",
                                        "next_cursor"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Post"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    }
                }
            },
            "post": {
                "tags": [
                    "\u041f\u043e\u0441\u0442\u044b"
                ],
                "summary": "\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0441\u0442 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
                "description": "\u041f\u043e\u0441\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c Instagram \u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435; \u0432 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 GET /v1/posts/{id} \u0438\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f post.published / post.failed \u0432 GET /v1/events.",
                "operationId": "post_api_posts_create",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostRequest"
                            },
                            "example": {
                                "channel_ids": [
                                    "01a1ab14-9628-798c-b1d0-77dbd5211c06"
                                ],
                                "caption": "\u041f\u0440\u0438\u0432\u0435\u0442 \u0438\u0437 castbase! #api",
                                "media": [
                                    {
                                        "media_id": "01a1ab14-96b9-74f1-bd17-9602e8f39b02"
                                    }
                                ],
                                "publish_at": "2026-12-01T10:00:00+03:00",
                                "external_ref": "social_post:42"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "\u041f\u043e\u0441\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Post"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "409": {
                        "description": "\u041f\u043e\u0441\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c external_ref \u0443\u0436\u0435 \u0435\u0441\u0442\u044c (`external_ref_taken`), id \u2014 \u0432 detail",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/v1/posts:validate": {
            "post": {
                "tags": [
                    "\u041f\u043e\u0441\u0442\u044b"
                ],
                "summary": "\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0440\u0435\u0430\u0442\u0438\u0432 \u0431\u0435\u0437 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
                "description": "\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e \u0436\u0435 \u0442\u0435\u043b\u043e, \u0447\u0442\u043e POST /v1/posts, \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0438 \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442 \u043b\u0438\u043c\u0438\u0442.",
                "operationId": "post_api_posts_validate",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "\u041a\u0440\u0435\u0430\u0442\u0438\u0432 \u0433\u043e\u0434\u0438\u0442\u0441\u044f: \u0432\u0438\u0434 \u043f\u043e\u0441\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "valid",
                                        "kind",
                                        "publish_at",
                                        "expires_at"
                                    ],
                                    "properties": {
                                        "valid": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "kind": {
                                            "type": "string",
                                            "enum": [
                                                "image",
                                                "carousel",
                                                "reels"
                                            ]
                                        },
                                        "publish_at": {
                                            "type": "string",
                                            "format": "date-time"
                                        },
                                        "expires_at": {
                                            "type": "string",
                                            "format": "date-time"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    }
                }
            }
        },
        "/v1/posts/{id}": {
            "get": {
                "tags": [
                    "\u041f\u043e\u0441\u0442\u044b"
                ],
                "summary": "\u041f\u043e\u0441\u0442: \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043b\u0438, external_id, permalink, \u043e\u0448\u0438\u0431\u043a\u0430",
                "operationId": "get_api_posts_show",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041f\u043e\u0441\u0442",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Post"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "delete": {
                "tags": [
                    "\u041f\u043e\u0441\u0442\u044b"
                ],
                "summary": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u0442 \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438",
                "description": "\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u0430, \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0446\u0435\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 scheduled. external_ref \u043e\u0442\u043c\u0435\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f.",
                "operationId": "delete_api_posts_cancel",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "\u041f\u043e\u0441\u0442 \u043e\u0442\u043c\u0435\u043d\u0451\u043d"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "description": "\u041f\u043e\u0441\u0442 \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0432 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e (`post_not_cancellable`)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/post-targets/{id}:retry": {
            "post": {
                "tags": [
                    "\u041f\u043e\u0441\u0442\u044b"
                ],
                "summary": "\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0443\u043f\u0430\u0432\u0448\u0443\u044e \u0446\u0435\u043b\u044c",
                "description": "\u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0446\u0435\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 failed. \u0426\u0435\u043b\u044c \u0432 outcome_unknown \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f: \u043f\u043e\u0441\u0442 \u043c\u043e\u0433 \u0432\u044b\u0439\u0442\u0438 (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0434\u0443\u0431\u043b\u044c) \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044c.",
                "operationId": "post_api_post_targets_retry",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041f\u043e\u0441\u0442 \u0441 \u0446\u0435\u043b\u044c\u044e, \u0432\u0435\u0440\u043d\u0443\u0432\u0448\u0435\u0439\u0441\u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Post"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "description": "\u0426\u0435\u043b\u044c \u043d\u0435 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 failed (`target_not_failed`) \u0438\u043b\u0438 \u043a\u0430\u043d\u0430\u043b \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u0435\u043d (`channel_not_active`)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/project": {
            "get": {
                "tags": [
                    "\u041f\u0440\u043e\u0435\u043a\u0442"
                ],
                "summary": "\u041f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u044e\u0447",
                "description": "\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u043a\u043b\u044e\u0447 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f.",
                "operationId": "get_api_project_show",
                "responses": {
                    "200": {
                        "description": "\u041f\u0440\u043e\u0435\u043a\u0442 \u043a\u043b\u044e\u0447\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Project"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    }
                }
            }
        },
        "/v1/schedule": {
            "get": {
                "tags": [
                    "\u0420\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435"
                ],
                "summary": "\u0421\u0435\u0442\u043a\u0430 \u0441\u043b\u043e\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430",
                "operationId": "get_api_schedule_show",
                "responses": {
                    "200": {
                        "description": "\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043b\u043e\u0442\u044b",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Schedule"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    }
                }
            },
            "put": {
                "tags": [
                    "\u0420\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435"
                ],
                "summary": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0435\u0442\u043a\u0443 \u0441\u043b\u043e\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430",
                "description": "\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0435\u0442\u043a\u0443 \u0446\u0435\u043b\u0438\u043a\u043e\u043c. \u041f\u0443\u0441\u0442\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u0435\u0451. \u041f\u043e\u0441\u0442\u044b \u0441 publish_at=\"next_slot\" \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0441\u043b\u043e\u0442.",
                "operationId": "put_api_schedule_replace",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "slots"
                                ],
                                "properties": {
                                    "slots": {
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/components/schemas/ScheduleSlot"
                                        }
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "slots": [
                                    {
                                        "weekday": 1,
                                        "time": "09:00"
                                    },
                                    {
                                        "weekday": 3,
                                        "time": "18:30"
                                    },
                                    {
                                        "weekday": 5,
                                        "time": "12:00"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "\u0421\u0435\u0442\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Schedule"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    }
                }
            }
        },
        "/v1/usage": {
            "get": {
                "tags": [
                    "\u041f\u0440\u043e\u0435\u043a\u0442"
                ],
                "summary": "\u041b\u0438\u043c\u0438\u0442\u044b \u0442\u0430\u0440\u0438\u0444\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446",
                "operationId": "get_api_usage",
                "responses": {
                    "200": {
                        "description": "\u0422\u0430\u0440\u0438\u0444, \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434, \u0440\u0430\u0441\u0445\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u0432 \u0438 \u043a\u0430\u043d\u0430\u043b\u043e\u0432",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Usage"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    }
                }
            }
        },
        "/v1/channels": {
            "get": {
                "tags": [
                    "\u041a\u0430\u043d\u0430\u043b\u044b"
                ],
                "summary": "\u041a\u0430\u043d\u0430\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430",
                "operationId": "get_api_channels_list",
                "responses": {
                    "200": {
                        "description": "\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u043d\u0430\u043b\u043e\u0432",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Channel"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    }
                }
            },
            "post": {
                "tags": [
                    "\u041a\u0430\u043d\u0430\u043b\u044b"
                ],
                "summary": "\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0443 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438",
                "description": "\u0422\u043e\u043a\u0435\u043d \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0451\u043c\u0430 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041a\u0430\u043d\u0430\u043b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 pending, \u0438\u0442\u043e\u0433 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u2014 \u0447\u0435\u0440\u0435\u0437 GET /v1/channels/{id} \u0438\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f channel.connected / channel.reauth_required. \u041f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0442\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u2014 \u0432 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.",
                "operationId": "post_api_channels_create",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "platform",
                                    "access_token"
                                ],
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "enum": [
                                            "instagram"
                                        ]
                                    },
                                    "access_token": {
                                        "description": "\u0422\u043e\u043a\u0435\u043d \u0438\u0437 Meta (Generate token). \u0425\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0437\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435.",
                                        "type": "string",
                                        "example": "IGAA\u2026"
                                    },
                                    "label": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "\u041a\u0430\u043d\u0430\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 pending",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Channel"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "402": {
                        "description": "\u041b\u0438\u043c\u0438\u0442 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0442\u0430\u0440\u0438\u0444\u0430 (`channels_limit_exceeded`, \u043f\u043e\u043b\u044f `limit` \u0438 `plan`)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LimitProblem"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/v1/channels/{id}": {
            "get": {
                "tags": [
                    "\u041a\u0430\u043d\u0430\u043b\u044b"
                ],
                "summary": "\u041a\u0430\u043d\u0430\u043b \u0438 \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441",
                "operationId": "get_api_channels_show",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041a\u0430\u043d\u0430\u043b",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Channel"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "delete": {
                "tags": [
                    "\u041a\u0430\u043d\u0430\u043b\u044b"
                ],
                "summary": "\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b",
                "operationId": "delete_api_channels_delete",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "\u041a\u0430\u043d\u0430\u043b \u043e\u0442\u043a\u043b\u044e\u0447\u0451\u043d (\u043c\u044f\u0433\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435), \u0442\u043e\u043a\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u044b\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            }
        },
        "/v1/media": {
            "post": {
                "tags": [
                    "\u041c\u0435\u0434\u0438\u0430"
                ],
                "summary": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b (multipart, \u043f\u043e\u043b\u0435 file)",
                "description": "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 JPEG/PNG/WebP \u0434\u043e 8 \u041c\u0411, \u0432\u0438\u0434\u0435\u043e MP4/MOV \u043e\u0442 3 \u0441 \u0434\u043e 15 \u043c\u0438\u043d \u0438 \u0434\u043e 300 \u041c\u0411. \u0424\u0430\u0439\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443: \u043d\u0435\u0433\u043e\u0434\u043d\u044b\u0439 \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0441 422 \u0438 errors[].",
                "operationId": "post_api_media_upload",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "\u0424\u0430\u0439\u043b \u043f\u0440\u0438\u043d\u044f\u0442",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Media"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/v1/media:import": {
            "post": {
                "tags": [
                    "\u041c\u0435\u0434\u0438\u0430"
                ],
                "summary": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 http(s)",
                "description": "\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u0430\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u0445 80/443, \u0442\u0430\u0439\u043c\u0430\u0443\u0442 60 \u0441; \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u044e\u0442\u0441\u044f.",
                "operationId": "post_api_media_import",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "url"
                                ],
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "example": "https://example.com/photo.jpg"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "\u0424\u0430\u0439\u043b \u0441\u043a\u0430\u0447\u0430\u043d \u0438 \u043f\u0440\u0438\u043d\u044f\u0442",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Media"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "422": {
                        "$ref": "#/components/responses/Unprocessable"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/v1/media/{id}": {
            "get": {
                "tags": [
                    "\u041c\u0435\u0434\u0438\u0430"
                ],
                "summary": "\u041a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 \u043c\u0435\u0434\u0438\u0430",
                "operationId": "get_api_media_show",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041c\u0435\u0434\u0438\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Media"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Project": {
                "required": [
                    "id",
                    "name",
                    "slug",
                    "timezone",
                    "created_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string",
                        "example": "\u041c\u043e\u0439 \u0431\u0440\u0435\u043d\u0434"
                    },
                    "slug": {
                        "type": "string",
                        "example": "moy-brend"
                    },
                    "timezone": {
                        "description": "\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u0432 \u043d\u0451\u043c \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0442\u044b \u0441\u0435\u0442\u043a\u0438 \u0438 publish_at \u0431\u0435\u0437 \u0437\u043e\u043d\u044b",
                        "type": "string",
                        "example": "Europe/Moscow"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Usage": {
                "required": [
                    "plan",
                    "period",
                    "posts",
                    "channels",
                    "managed_connect",
                    "placeholder"
                ],
                "properties": {
                    "plan": {
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "free"
                            },
                            "title": {
                                "type": "string",
                                "example": "\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439"
                            },
                            "period_end": {
                                "description": "\u041a\u043e\u043d\u0435\u0446 \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430; null \u0443 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u0430",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        },
                        "type": "object"
                    },
                    "period": {
                        "description": "\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u044b\u0439 \u043c\u0435\u0441\u044f\u0446",
                        "properties": {
                            "start": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "resets_at": {
                                "description": "\u041a\u043e\u0433\u0434\u0430 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043f\u043e\u0441\u0442\u043e\u0432 \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u0441\u044f",
                                "type": "string",
                                "format": "date-time"
                            }
                        },
                        "type": "object"
                    },
                    "posts": {
                        "description": "\u041f\u043e\u0441\u0442\u044b \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434; limit = null \u2014 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439",
                        "properties": {
                            "limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 100
                            },
                            "used": {
                                "type": "integer",
                                "example": 12
                            },
                            "remaining": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 88
                            }
                        },
                        "type": "object"
                    },
                    "channels": {
                        "description": "\u041a\u0430\u043d\u0430\u043b\u044b; used = null \u2014 \u0440\u0430\u0441\u0445\u043e\u0434 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f",
                        "properties": {
                            "limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 3
                            },
                            "used": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    },
                    "managed_connect": {
                        "description": "\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 castbase (\u00ab\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Instagram\u00bb)",
                        "type": "boolean"
                    },
                    "placeholder": {
                        "description": "true \u2014 \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0442\u0430\u0440\u0438\u0444\u0430 \u0435\u0449\u0451 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430: \u043d\u0435\u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a null",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "Event": {
                "required": [
                    "seq",
                    "type",
                    "created_at",
                    "data"
                ],
                "properties": {
                    "seq": {
                        "description": "\u041f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435",
                        "type": "integer",
                        "example": 12
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "post.published",
                            "post.failed",
                            "post.deferred",
                            "post.outcome_unknown",
                            "channel.connected",
                            "channel.reauth_required"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "data": {
                        "description": "post.*: post_id, target_id, channel_id, external_ref, post_status, target_status, external_id, permalink, retry_at, error_code, error_message. channel.*: channel_id, username, external_account_id, reason_code, message.",
                        "type": "object",
                        "example": {
                            "post_id": "01a1ab14-b9ae-7504-b304-8e6602f58395",
                            "target_id": "01a1ab14-b9af-7ab3-8e2b-4bb0ff2a1c03",
                            "channel_id": "01a1ab14-9628-798c-b1d0-77dbd5211c06",
                            "external_ref": "social_post:42",
                            "post_status": "published",
                            "target_status": "published",
                            "external_id": "17900000000000000",
                            "permalink": "https://www.instagram.com/p/XXXXXXXXXXX/",
                            "retry_at": null,
                            "error_code": null,
                            "error_message": null
                        }
                    }
                },
                "type": "object"
            },
            "ScheduleSlot": {
                "required": [
                    "weekday",
                    "time"
                ],
                "properties": {
                    "weekday": {
                        "description": "1 \u2014 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u2026 7 \u2014 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
                        "type": "integer",
                        "example": 1,
                        "maximum": 7,
                        "minimum": 1
                    },
                    "time": {
                        "description": "\u0412\u0440\u0435\u043c\u044f HH:MM \u0432 \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430",
                        "type": "string",
                        "pattern": "^\\d{2}:\\d{2}$",
                        "example": "09:00"
                    }
                },
                "type": "object"
            },
            "Schedule": {
                "required": [
                    "timezone",
                    "slots"
                ],
                "properties": {
                    "timezone": {
                        "type": "string",
                        "example": "Europe/Moscow"
                    },
                    "slots": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ScheduleSlot"
                        }
                    }
                },
                "type": "object"
            },
            "Channel": {
                "required": [
                    "id",
                    "platform",
                    "status",
                    "created_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "platform": {
                        "type": "string",
                        "example": "instagram"
                    },
                    "status": {
                        "description": "pending \u2014 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u043e\u043a\u0435\u043d\u0430; active \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c; reauth_required \u2014 \u043d\u0443\u0436\u0435\u043d \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d; failed \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c",
                        "type": "string",
                        "enum": [
                            "pending",
                            "active",
                            "reauth_required",
                            "failed",
                            "disabled"
                        ]
                    },
                    "status_reason": {
                        "description": "\u041a\u043e\u0434 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0434\u043b\u044f failed \u0438 reauth_required (\u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043e\u0448\u0438\u0431\u043e\u043a, \u0433\u0440\u0443\u043f\u043f\u0430 \u00ab\u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u043a\u0430\u043d\u0430\u043b\u0430\u00bb)",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": null
                    },
                    "status_message": {
                        "description": "\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "username": {
                        "description": "\u0418\u043c\u044f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "mybrand"
                    },
                    "external_account_id": {
                        "description": "id \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043d\u0430 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0435",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439"
                    },
                    "kind": {
                        "description": "byo \u2014 \u0441\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043d; managed \u2014 \u0432\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 castbase",
                        "type": "string",
                        "enum": [
                            "byo",
                            "managed"
                        ]
                    },
                    "reauth_due_at": {
                        "description": "\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Media": {
                "required": [
                    "media_id",
                    "kind",
                    "mime",
                    "size",
                    "sha256",
                    "status",
                    "retain_until",
                    "created_at"
                ],
                "properties": {
                    "media_id": {
                        "description": "\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u043e\u043b\u044f media[].media_id \u043f\u043e\u0441\u0442\u0430",
                        "type": "string",
                        "format": "uuid"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "image",
                            "video"
                        ]
                    },
                    "mime": {
                        "type": "string",
                        "example": "image/jpeg"
                    },
                    "size": {
                        "description": "\u0420\u0430\u0437\u043c\u0435\u0440, \u0431\u0430\u0439\u0442",
                        "type": "integer",
                        "example": 31087
                    },
                    "sha256": {
                        "type": "string"
                    },
                    "width": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 1080
                    },
                    "height": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 1080
                    },
                    "duration_ms": {
                        "description": "\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e, \u043c\u0441",
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "status": {
                        "description": "expired \u2014 \u0441\u0440\u043e\u043a \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u0451\u043a, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0437\u0430\u043d\u043e\u0432\u043e",
                        "type": "string",
                        "enum": [
                            "uploaded",
                            "ready",
                            "expired"
                        ]
                    },
                    "retain_until": {
                        "description": "\u0414\u043e \u043a\u0430\u043a\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b (30 \u0434\u043d\u0435\u0439 \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438)",
                        "type": "string",
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "PostTarget": {
                "description": "\u0426\u0435\u043b\u044c \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438: \u043e\u0434\u0438\u043d \u043a\u0430\u043d\u0430\u043b \u043f\u043e\u0441\u0442\u0430.",
                "required": [
                    "id",
                    "channel_id",
                    "status",
                    "attempts"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "channel_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "description": "deferred \u2014 \u0443\u043f\u0451\u0440\u043b\u0438\u0441\u044c \u0432 \u043a\u0432\u043e\u0442\u0443 Instagram, \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442 \u0441\u0430\u043c (retry_at). outcome_unknown \u2014 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0432\u044b\u0448\u0435\u043b \u043b\u0438 \u043f\u043e\u0441\u0442: \u041d\u0415 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044c. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 :retry \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e failed.",
                        "type": "string",
                        "enum": [
                            "scheduled",
                            "dispatched",
                            "deferred",
                            "published",
                            "failed",
                            "outcome_unknown",
                            "cancelled"
                        ]
                    },
                    "external_id": {
                        "description": "id \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Instagram (\u0443 published)",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "permalink": {
                        "description": "\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e (\u0443 published)",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri"
                    },
                    "retry_at": {
                        "description": "\u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0446\u0435\u043b\u044c",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "error": {
                        "description": "\u041f\u0440\u0438\u0447\u0438\u043d\u0430 failed / deferred / outcome_unknown",
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "quota_exhausted"
                            },
                            "message": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "attempts": {
                        "description": "\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "Post": {
                "required": [
                    "id",
                    "status",
                    "kind",
                    "caption",
                    "publish_at",
                    "expires_at",
                    "media",
                    "targets",
                    "created_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "description": "\u0421\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0446\u0435\u043b\u044f\u043c: published \u2014 \u0432\u0441\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b; partially_published \u2014 \u0447\u0430\u0441\u0442\u044c; failed \u2014 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439; processing \u2014 \u0438\u0434\u0451\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f",
                        "type": "string",
                        "enum": [
                            "scheduled",
                            "processing",
                            "published",
                            "partially_published",
                            "failed",
                            "cancelled"
                        ]
                    },
                    "kind": {
                        "description": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u0435\u0434\u0438\u0430: \u043e\u0434\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, 2\u201320 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a, \u043e\u0434\u043d\u043e \u0432\u0438\u0434\u0435\u043e",
                        "type": "string",
                        "enum": [
                            "image",
                            "carousel",
                            "reels"
                        ]
                    },
                    "external_ref": {
                        "description": "\u0412\u0430\u0448 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u0441\u0442\u0430, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "social_post:42"
                    },
                    "caption": {
                        "type": "string",
                        "example": "\u041f\u0440\u0438\u0432\u0435\u0442 \u0438\u0437 castbase! #api"
                    },
                    "publish_at": {
                        "description": "\u0412\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, UTC",
                        "type": "string",
                        "format": "date-time"
                    },
                    "expires_at": {
                        "description": "publish_at + 24 \u0447: \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f (error expired)",
                        "type": "string",
                        "format": "date-time"
                    },
                    "options": {
                        "type": "object",
                        "example": {
                            "share_to_feed": true
                        }
                    },
                    "media": {
                        "type": "array",
                        "items": {
                            "properties": {
                                "media_id": {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                "role": {
                                    "type": "string",
                                    "enum": [
                                        "item",
                                        "cover"
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    },
                    "targets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PostTarget"
                        }
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "PostRequest": {
                "required": [
                    "channel_ids",
                    "media"
                ],
                "properties": {
                    "channel_ids": {
                        "description": "\u041a\u0430\u043d\u0430\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0446\u0435\u043b\u044c \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "minItems": 1
                    },
                    "caption": {
                        "description": "\u041f\u043e\u0434\u043f\u0438\u0441\u044c: \u0434\u043e 2200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 30 \u0445\u044d\u0448\u0442\u0435\u0433\u043e\u0432",
                        "type": "string",
                        "maxLength": 2200
                    },
                    "media": {
                        "description": "\u041e\u0434\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u2014 \u0444\u043e\u0442\u043e, 2\u201320 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u2014 \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u044c, \u043e\u0434\u043d\u043e \u0432\u0438\u0434\u0435\u043e \u2014 Reels (+ \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u043b\u043e\u0436\u043a\u0430 role=cover)",
                        "type": "array",
                        "items": {
                            "required": [
                                "media_id"
                            ],
                            "properties": {
                                "media_id": {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                "role": {
                                    "type": "string",
                                    "default": "item",
                                    "enum": [
                                        "item",
                                        "cover"
                                    ]
                                }
                            },
                            "type": "object"
                        },
                        "minItems": 1
                    },
                    "publish_at": {
                        "description": "ISO-8601 \u0441 \u0437\u043e\u043d\u043e\u0439 \u0438\u043b\u0438 \u0431\u0435\u0437 (\u0442\u043e\u0433\u0434\u0430 \u2014 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430) \u043b\u0438\u0431\u043e \"next_slot\" \u2014 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0441\u043b\u043e\u0442 \u0441\u0435\u0442\u043a\u0438. \u041f\u0443\u0441\u0442\u043e \u0438\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u2014 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0442\u0438\u043a. \u041d\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 75 \u0434\u043d\u0435\u0439 \u0432\u043f\u0435\u0440\u0451\u0434.",
                        "type": "string",
                        "example": "2026-12-01T10:00:00+03:00"
                    },
                    "external_ref": {
                        "description": "\u0412\u0430\u0448 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440: \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043f\u043e\u0432\u0442\u043e\u0440 \u2014 409 external_ref_taken",
                        "type": "string",
                        "maxLength": 128
                    },
                    "options": {
                        "description": "\u041e\u043f\u0446\u0438\u0438 Reels",
                        "properties": {
                            "share_to_feed": {
                                "type": "boolean"
                            },
                            "audio_name": {
                                "type": "string",
                                "maxLength": 200
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "FieldError": {
                "required": [
                    "field",
                    "code",
                    "message"
                ],
                "properties": {
                    "field": {
                        "description": "\u041a\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 `media[1].media_id`.",
                        "type": "string",
                        "example": "caption"
                    },
                    "code": {
                        "description": "\u041a\u043e\u0434 \u043f\u0440\u0438\u0447\u0438\u043d\u044b, \u0441\u043c. \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043e\u0448\u0438\u0431\u043e\u043a.",
                        "type": "string",
                        "example": "too_long"
                    },
                    "message": {
                        "type": "string",
                        "example": "\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 2200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e 2301)."
                    }
                },
                "type": "object"
            },
            "Problem": {
                "description": "\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e RFC 9457 (`application/problem+json`).",
                "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "code"
                ],
                "properties": {
                    "type": {
                        "description": "\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.",
                        "type": "string",
                        "format": "uri",
                        "example": "https://castbase.ru/docs/errors#validation_failed"
                    },
                    "title": {
                        "type": "string",
                        "example": "\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443"
                    },
                    "status": {
                        "type": "integer",
                        "example": 422
                    },
                    "detail": {
                        "description": "\u0422\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430",
                        "type": "string",
                        "example": "\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 2200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e 2301)."
                    },
                    "code": {
                        "description": "\u041c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u043f\u043e \u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0439\u0442\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.",
                        "type": "string",
                        "example": "validation_failed"
                    },
                    "errors": {
                        "description": "\u0414\u043b\u044f `422`: \u043f\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u043e\u043b\u0435.",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/FieldError"
                        }
                    }
                },
                "type": "object"
            },
            "LimitProblem": {
                "description": "\u041e\u0448\u0438\u0431\u043a\u0430 \u043b\u0438\u043c\u0438\u0442\u0430 \u0442\u0430\u0440\u0438\u0444\u0430 (`posts_limit_exceeded` \u2014 429, `channels_limit_exceeded` \u2014 402).",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Problem"
                    },
                    {
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "example": 100
                            },
                            "plan": {
                                "type": "string",
                                "example": "free"
                            },
                            "resets_at": {
                                "description": "\u041a\u043e\u0433\u0434\u0430 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u0441\u044f (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f 429).",
                                "type": "string",
                                "format": "date-time"
                            }
                        },
                        "type": "object"
                    }
                ]
            }
        },
        "responses": {
            "BadRequest": {
                "description": "\u0422\u0435\u043b\u043e \u043d\u0435 JSON-\u043e\u0431\u044a\u0435\u043a\u0442 (`bad_request`), \u043d\u0435\u0442 Idempotency-Key (`idempotency_key_required`) \u0438\u043b\u0438 \u043e\u043d \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d (`invalid_idempotency_key`).",
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        },
                        "example": {
                            "type": "https://docs.castbase.ru/errors#idempotency_key_required",
                            "title": "\u041d\u0443\u0436\u0435\u043d Idempotency-Key",
                            "status": 400,
                            "detail": "\u041f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a Idempotency-Key (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043e 255 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432) \u2014 \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c.",
                            "code": "idempotency_key_required"
                        }
                    }
                }
            },
            "Unauthorized": {
                "description": "\u041a\u043b\u044e\u0447 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d, \u043d\u0435\u0432\u0435\u0440\u0435\u043d \u0438\u043b\u0438 \u043e\u0442\u043e\u0437\u0432\u0430\u043d.",
                "headers": {
                    "WWW-Authenticate": {
                        "schema": {
                            "type": "string",
                            "example": "Bearer"
                        }
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        },
                        "example": {
                            "type": "https://docs.castbase.ru/errors#unauthorized",
                            "title": "\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f",
                            "status": 401,
                            "detail": "\u041f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 API-\u043a\u043b\u044e\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: Authorization: Bearer cb_live_\u2026",
                            "code": "unauthorized"
                        }
                    }
                }
            },
            "NotFound": {
                "description": "\u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043a\u043b\u044e\u0447\u0430 (\u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0447\u0443\u0436\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a \u0436\u0435).",
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        },
                        "example": {
                            "type": "https://docs.castbase.ru/errors#not_found",
                            "title": "\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e",
                            "status": 404,
                            "detail": "\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e",
                            "code": "not_found"
                        }
                    }
                }
            },
            "Unprocessable": {
                "description": "\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 (`validation_failed`, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 `errors[]`) \u043b\u0438\u0431\u043e Idempotency-Key \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0442\u0435\u043b\u043e\u043c (`idempotency_key_reused`).",
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        },
                        "example": {
                            "type": "https://castbase.ru/docs/errors#validation_failed",
                            "title": "\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443",
                            "status": 422,
                            "detail": "\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 2200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e 2301).",
                            "code": "validation_failed",
                            "errors": [
                                {
                                    "field": "caption",
                                    "code": "too_long",
                                    "message": "\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 2200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e 2301)."
                                }
                            ]
                        }
                    }
                }
            },
            "TooManyRequests": {
                "description": "\u041b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043a\u043b\u044e\u0447 (`rate_limited`) \u0438\u043b\u0438 \u043b\u0438\u043c\u0438\u0442 \u043f\u043e\u0441\u0442\u043e\u0432 \u0442\u0430\u0440\u0438\u0444\u0430 (`posts_limit_exceeded`). \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a `Retry-After` \u2014 \u0447\u0435\u0440\u0435\u0437 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c.",
                "headers": {
                    "Retry-After": {
                        "description": "\u0421\u0435\u043a\u0443\u043d\u0434\u044b \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0438",
                        "schema": {
                            "type": "integer",
                            "example": 12
                        }
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/LimitProblem"
                        },
                        "example": {
                            "type": "https://docs.castbase.ru/errors#rate_limited",
                            "title": "\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432",
                            "status": 429,
                            "detail": "\u041b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043a\u043b\u044e\u0447 \u2014 600 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 12 \u0441.",
                            "code": "rate_limited"
                        }
                    }
                }
            }
        },
        "parameters": {
            "IdempotencyKey": {
                "name": "Idempotency-Key",
                "in": "header",
                "description": "\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 (\u0443\u0434\u043e\u0431\u043d\u0435\u0435 UUID) \u043e\u0442 1 \u0434\u043e 255 \u043f\u0435\u0447\u0430\u0442\u043d\u044b\u0445 ASCII-\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432. \u0422\u043e\u0442 \u0436\u0435 \u043a\u043b\u044e\u0447 \u0438 \u0442\u043e \u0436\u0435 \u0442\u0435\u043b\u043e \u0432\u0435\u0440\u043d\u0443\u0442 \u043f\u0440\u0435\u0436\u043d\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 (\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a `Idempotent-Replayed`), \u0434\u0440\u0443\u0433\u043e\u0435 \u0442\u0435\u043b\u043e \u2014 `422 idempotency_key_reused`. \u0421\u0440\u043e\u043a \u2014 72 \u0447\u0430\u0441\u0430.",
                "required": true,
                "schema": {
                    "type": "string",
                    "example": "6f1d3c0e-8a2b-4c5d-9e7f-1a2b3c4d5e6f",
                    "maxLength": 255,
                    "minLength": 1
                }
            }
        },
        "securitySchemes": {
            "ApiKey": {
                "type": "http",
                "description": "API-\u043a\u043b\u044e\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 (\u0440\u0430\u0437\u0434\u0435\u043b \u00abAPI-\u043a\u043b\u044e\u0447\u0438\u00bb).",
                "bearerFormat": "cb_live_<\u043f\u0440\u0435\u0444\u0438\u043a\u0441>_<\u0441\u0435\u043a\u0440\u0435\u0442>",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "ApiKey": []
        }
    ],
    "tags": [
        {
            "name": "\u041f\u0440\u043e\u0435\u043a\u0442",
            "description": "\u041f\u0440\u043e\u0435\u043a\u0442 \u043a\u043b\u044e\u0447\u0430 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u0442\u0430\u0440\u0438\u0444\u0430"
        },
        {
            "name": "\u041a\u0430\u043d\u0430\u043b\u044b",
            "description": "\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b Instagram"
        },
        {
            "name": "\u041c\u0435\u0434\u0438\u0430",
            "description": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0445 \u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c Instagram"
        },
        {
            "name": "\u041f\u043e\u0441\u0442\u044b",
            "description": "\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0441\u0442\u0430\u0442\u0443\u0441, \u043e\u0442\u043c\u0435\u043d\u0430 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439"
        },
        {
            "name": "\u0420\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
            "description": "\u041d\u0435\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u043a\u0430 \u0441\u043b\u043e\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430"
        },
        {
            "name": "\u0421\u043e\u0431\u044b\u0442\u0438\u044f",
            "description": "\u041b\u0435\u043d\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u043a\u0443\u0440\u0441\u043e\u0440\u0443)"
        },
        {
            "name": "\u041f\u043b\u043e\u0449\u0430\u0434\u043a\u0438",
            "description": "\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u043e\u043a \u043a \u043a\u0440\u0435\u0430\u0442\u0438\u0432\u0443"
        }
    ]
}