{
    "openapi": "3.0.3",
    "info": {
        "title": "VKit Platform API",
        "version": "1.0.0",
        "description": "The public VKit Platform API. One creator workspace per credential, OAuth 2.1 + PKCE or a workspace API key, and scopes that map to the words a creator reads on the consent screen.\n\nAuthenticate with `Authorization: Bearer <token>` where the token is an OAuth access token (`vkp_...`) or an API key (`vka_...`). Writes honour an `Idempotency-Key` header for 24 hours. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.",
        "contact": {
            "name": "VKit developers",
            "email": "developers@vkit.app"
        },
        "license": {
            "name": "Proprietary"
        }
    },
    "paths": {
        "/analytics/summary": {
            "get": {
                "operationId": "analytics_summary_retrieve",
                "description": "``GET /v1/analytics/summary``.",
                "summary": "Page, Instagram and community in one read",
                "parameters": [
                    {
                        "in": "query",
                        "name": "range",
                        "schema": {
                            "type": "string"
                        },
                        "description": "`7d`, `30d` (default) or `90d`."
                    }
                ],
                "tags": [
                    "Analytics"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AnalyticsSummary"
                                },
                                "examples": {
                                    "ACreatorWithAPageAndACommunity,NoInstagramYet": {
                                        "value": {
                                            "range": "30d",
                                            "page": {
                                                "views": 1840,
                                                "clicks": 412,
                                                "click_through_rate": 0.224
                                            },
                                            "instagram": null,
                                            "community": {
                                                "members": 63,
                                                "active": 58,
                                                "updates": 4,
                                                "events": 1
                                            },
                                            "available": {
                                                "page": true,
                                                "instagram": false,
                                                "community": true
                                            }
                                        },
                                        "summary": "A creator with a page and a community, no Instagram yet"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/automations": {
            "get": {
                "operationId": "automations_retrieve",
                "description": "``GET``/``POST /v1/automations``.",
                "summary": "List the workspace’s automations",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Filter: `draft`, `live`, `paused` or `stopped`."
                    }
                ],
                "tags": [
                    "Automations"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutomationList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "post": {
                "operationId": "automations_create",
                "description": "``GET``/``POST /v1/automations``.",
                "summary": "Create a guided comment-to-DM automation",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Automations"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AutomationCreateRequest"
                            },
                            "examples": {
                                "Comment\"RECIPE\"GetsTheLink": {
                                    "value": {
                                        "keyword": "RECIPE",
                                        "reply": "Here it is! Everything you need is at the link below 🧁",
                                        "link": "https://vkit.app/ava/sourdough"
                                    },
                                    "summary": "Comment \"RECIPE\" gets the link"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/AutomationCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/AutomationCreateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutomationEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error`."
                    },
                    "402": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`plan_required` — the chosen template uses a Pro feature (a follow gate, an email ask, a DM trigger) and the workspace is on Free. Nothing was created; `details.upgrade_url` is where the creator upgrades."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/automations/{automation_id}": {
            "get": {
                "operationId": "automations_retrieve_2",
                "description": "``GET /v1/automations/{automation_id}``.",
                "summary": "One automation",
                "parameters": [
                    {
                        "in": "path",
                        "name": "automation_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Automations"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutomationEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/automations/{automation_id}/pause": {
            "post": {
                "operationId": "automations_pause_create",
                "description": "``POST /v1/automations/{id}/pause`` — stop it sending, keep the graph.",
                "summary": "Pause a live automation",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "automation_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Automations"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutomationEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`lifecycle_invalid` — it was not live."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/automations/{automation_id}/resume": {
            "post": {
                "operationId": "automations_resume_create",
                "description": "``POST /v1/automations/{id}/resume`` — put it back on the air.\n\nRe-runs every gate the creator app runs: the Instagram connection must\nstill be there, the entitlement must still hold, the graph must still\nvalidate. A resume that skipped those would be a send we could not honour.",
                "summary": "Resume a paused automation",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "automation_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Automations"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutomationEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "402": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`plan_required` — the workspace is on Free and this automation uses a Pro feature. `details.upgrade_url` is where the creator upgrades."
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`lifecycle_conflict` — it was not paused, or it can no longer send. `permission_missing` — the creator declined an Instagram permission this automation needs; `details.missing_scopes` names it and `details.next_step.href` is where they reconnect."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/bookings": {
            "post": {
                "operationId": "bookings_create",
                "description": "``POST /v1/bookings`` — hold the slot, charge the token, confirm.\n\nThe order of operations is the whole design and it is not negotiable:\n\n0. **refuse in the documented order**: the body's shape (400\n   ``validation_error`` naming the fields), then the creator's agent\n   opt-out (403 ``agent_bookings_disabled``), and only then whether the\n   service exists (404 ``service_not_found``). ``agentic-commerce.md``\n   promises \"off means invisible\", and this route used to resolve the\n   service FIRST — so a closed shop answered \"no such service\", which an\n   agent reads as *retry with a different id*, and a body missing both of\n   its required fields answered 404 rather than naming them;\n1. resolve the slot;\n2. **hold** the slot as a ``pending_payment`` booking — two agents racing\n   for the same 3pm must not both be told yes, and the database's partial\n   unique index is what decides, not a check;\n3. charge the SPT, confirmed inline;\n4. on success confirm the booking through ``confirm_paid_booking`` — the\n   identical function Stripe's webhook calls, so the later\n   ``payment_intent.succeeded`` is a no-op rather than a second confirm;\n5. on decline **release the hold in the same request** and answer 402.\n\nA free service skips 3–5 and confirms immediately, exactly as the public\npage does.",
                "summary": "Book a slot, paying with a Shared Payment Token",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BookingCreateRequest"
                            },
                            "examples": {
                                "PaidBooking": {
                                    "value": {
                                        "service_id": "6f1c…",
                                        "slot_id": "slot_1789430400",
                                        "customer": {
                                            "name": "Grace Hopper",
                                            "email": "grace@example.com"
                                        },
                                        "payment_data": {
                                            "token": "spt_123",
                                            "provider": "stripe"
                                        }
                                    },
                                    "summary": "Paid booking"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/BookingCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/BookingCreateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/bookings/{booking_id}": {
            "get": {
                "operationId": "bookings_retrieve",
                "description": "``GET|PATCH|DELETE /v1/bookings/{booking_id}``.\n\nOwnership is enforced by :meth:`owned_checkout`: a partner reaches only the\nbookings it created. Another agent's booking 404s — the same answer as a\nbooking that never existed, because telling an agent \"that exists, but not\nfor you\" turns a booking id into an oracle.",
                "summary": "One booking",
                "parameters": [
                    {
                        "in": "path",
                        "name": "booking_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            },
            "patch": {
                "operationId": "bookings_partial_update",
                "description": "The same reschedule the customer’s own manage page performs: one appointment moved, payment and calendar invite intact.",
                "summary": "Move a booking to another slot",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "booking_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedBookingRescheduleRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedBookingRescheduleRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedBookingRescheduleRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            },
            "delete": {
                "operationId": "bookings_destroy",
                "description": "Runs the creator’s own cancellation policy. Inside the cancellation window the time goes back on the calendar but the money does not come back — `refund` says which happened, so the agent can tell the customer the truth.",
                "summary": "Cancel a booking",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "booking_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingCancel"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/broadcasts": {
            "get": {
                "operationId": "broadcasts_retrieve",
                "description": "``GET``/``POST /v1/broadcasts``.",
                "summary": "Every announcement, with each channel’s outcome",
                "parameters": [
                    {
                        "in": "query",
                        "name": "update",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Only announcements written from this update id."
                    }
                ],
                "tags": [
                    "Broadcasts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BroadcastListEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "post": {
                "operationId": "broadcasts_create",
                "description": "``GET``/``POST /v1/broadcasts``.",
                "summary": "Announce to the community and the connected channels",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Broadcasts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BroadcastCreateRequest"
                            },
                            "examples": {
                                "WriteItAndShowTheCreatorThePlan": {
                                    "value": {
                                        "update": {
                                            "title": "October dates are up",
                                            "body": "Six new walks. One of them starts before sunrise."
                                        },
                                        "channels": [
                                            "feed",
                                            "community_email"
                                        ]
                                    },
                                    "summary": "Write it and show the creator the plan"
                                },
                                "AnnounceAnUpdateTheCreatorAlreadyWrote,AndApproveIt": {
                                    "value": {
                                        "update_id": "4f1c…",
                                        "channels": [
                                            "feed",
                                            "community_email",
                                            "linkedin"
                                        ],
                                        "approve": true
                                    },
                                    "summary": "Announce an update the creator already wrote, and approve it"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/BroadcastCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/BroadcastCreateRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Broadcast"
                                },
                                "examples": {
                                    "ThreeChannels,ThreeDifferentTruths": {
                                        "value": {
                                            "id": "9a2e…",
                                            "status": "draft",
                                            "update_title": "October dates are up",
                                            "children": [
                                                {
                                                    "channel": "feed",
                                                    "label": "Community feed",
                                                    "status": "sent",
                                                    "error": ""
                                                },
                                                {
                                                    "channel": "linkedin",
                                                    "label": "LinkedIn",
                                                    "status": "needs_connection",
                                                    "error": "Connect your LinkedIn account and retry this channel to send it."
                                                },
                                                {
                                                    "channel": "instagram",
                                                    "label": "Instagram",
                                                    "status": "not_available",
                                                    "error": "Instagram publishing awaits Meta approval; the approved post is saved to Studio for the creator to post"
                                                }
                                            ]
                                        },
                                        "summary": "Three channels, three different truths"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error`."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/broadcasts/{broadcast_id}": {
            "get": {
                "operationId": "broadcasts_retrieve_2",
                "description": "``GET /v1/broadcasts/{broadcast_id}``.",
                "summary": "One announcement and every channel’s state",
                "parameters": [
                    {
                        "in": "path",
                        "name": "broadcast_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Broadcasts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Broadcast"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/broadcasts/{broadcast_id}/approve": {
            "post": {
                "operationId": "broadcasts_approve_create",
                "description": "``POST /v1/broadcasts/{broadcast_id}/approve``.\n\nThe one act that reaches real inboxes and real calendars. It cannot be\ntaken back, and approving twice is a 400 rather than a second send.",
                "summary": "Approve it — this is the send",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "broadcast_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Broadcasts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Broadcast"
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error` — already approved, or cancelled."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/broadcasts/{broadcast_id}/cancel": {
            "post": {
                "operationId": "broadcasts_cancel_create",
                "description": "``POST /v1/broadcasts/{broadcast_id}/cancel``.\n\nThe counterpart to approve, and the answer to an agent that drafted the\nwrong announcement. Until this existed a draft an agent created by mistake\ncould never be cleared — ``DELETE``, ``PATCH`` and ``POST`` on the\nbroadcast were all ``405`` — and the only way one disappeared was by\ndeleting the update it was written from, which took the update with it.\n\nIt is the creator app's own cancel (``apps.community.broadcasts``), so a\nscheduled Studio post comes off the calendar through the same unschedule\nroute the calendar's own cancel uses rather than being orphaned behind a\nrow that merely says \"cancelled\". **What has gone stays gone**: a child\nalready ``sent`` is left alone and reported as ``sent``, because an email\nin somebody's inbox is not something an API can retract. When nothing at\nall is left to stop, that is a ``409 not_cancellable`` rather than a\ncheerful 200 over a no-op.",
                "summary": "Withdraw it — stop every channel that has not gone",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "broadcast_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Broadcasts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Broadcast"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`not_cancellable` — nothing is left to stop. The announcement has already been withdrawn, or every channel has already gone and a send cannot be taken back."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/capabilities": {
            "get": {
                "operationId": "capabilities_retrieve",
                "description": "``GET /v1/capabilities`` — the agent's map of what works right now.\n\nThe exact manifest ``GET /api/workspace/capabilities/`` returns, from the\nsame builder, so an agent and the creator's own dashboard can never disagree\nabout whether Instagram is connected or publishing is available.",
                "summary": "What this workspace can do right now",
                "tags": [
                    "Identity"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CapabilityManifest"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/community": {
            "get": {
                "operationId": "community_retrieve",
                "description": "``GET /v1/community``.",
                "summary": "The community, its numbers and its next moves",
                "tags": [
                    "Community"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CommunityOverview"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/community/events": {
            "get": {
                "operationId": "community_events_retrieve",
                "description": "``GET``/``POST /v1/community/events``.",
                "summary": "The event calendar",
                "tags": [
                    "Community"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CommunityList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "post": {
                "operationId": "community_events_create",
                "description": "``GET``/``POST /v1/community/events``.",
                "summary": "Add an event",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Community"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CommunityEventCreateRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/CommunityEventCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/CommunityEventCreateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CommunityEventEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/community/members": {
            "get": {
                "operationId": "community_members_retrieve",
                "description": "``GET /v1/community/members``.\n\nSummary-first on purpose. \"How many members do I have\" is the common\nquestion and needs no personal data; handing an agent every member's email\nby default, so it can count them, would be the wrong trade every time.",
                "summary": "Members — counts by default, the roll only if you ask",
                "parameters": [
                    {
                        "in": "query",
                        "name": "summary",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Default `true`: counts only. Pass `false` for the member rows, which carry personal data and should only be read when the creator asked for them specifically."
                    }
                ],
                "tags": [
                    "Community"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CommunityList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/community/updates": {
            "get": {
                "operationId": "community_updates_retrieve",
                "description": "``GET``/``POST /v1/community/updates``.",
                "summary": "The update feed",
                "tags": [
                    "Community"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CommunityList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "post": {
                "operationId": "community_updates_create",
                "description": "``GET``/``POST /v1/community/updates``.",
                "summary": "Post an update",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Community"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CommunityUpdateCreateRequest"
                            },
                            "examples": {
                                "PostItAndEmailIt": {
                                    "value": {
                                        "title": "New class dates",
                                        "body": "October dates are up.",
                                        "email": true
                                    },
                                    "summary": "Post it and email it"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/CommunityUpdateCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/CommunityUpdateCreateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CommunityUpdateEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/creators/{handle}/availability": {
            "get": {
                "operationId": "creators_availability_retrieve",
                "description": "Slot ids are stable for the whole lifecycle: pass the `slot_id` from here straight to `POST /bookings`. `date` is read in the creator’s own timezone, because that is the frame their working hours are written in.",
                "summary": "Open slots for one service",
                "parameters": [
                    {
                        "in": "query",
                        "name": "date",
                        "schema": {
                            "type": "string"
                        },
                        "description": "YYYY-MM-DD, creator-local. Defaults to today."
                    },
                    {
                        "in": "query",
                        "name": "days",
                        "schema": {
                            "type": "integer"
                        },
                        "description": "How many days from `date`. 1–31, default 1."
                    },
                    {
                        "in": "path",
                        "name": "handle",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "in": "query",
                        "name": "party_size",
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Only 1 is bookable."
                    },
                    {
                        "in": "query",
                        "name": "service_id",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Required."
                    },
                    {
                        "in": "query",
                        "name": "timezone",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Echoed back for the agent’s own display."
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Availability"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/creators/{handle}/products": {
            "get": {
                "operationId": "creators_products_retrieve",
                "description": "``GET /v1/creators/{handle}/products``.\n\nThe same projection the creator's public storefront renders\n(``apps.api.grow_views._published_products_with_offers``), so an agent can\nnever be shown something a visitor could not buy — including the ``system``\nproducts VKit mints for its own money plumbing, which that helper's\n``creator_visible()`` already hides.",
                "summary": "A creator’s products",
                "parameters": [
                    {
                        "in": "path",
                        "name": "handle",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/creators/{handle}/services": {
            "get": {
                "operationId": "creators_services_retrieve",
                "description": "Everything an agent needs before it can offer this creator to a customer: the services, their prices, and the `payment.network_id` it must name when it issues the Shared Payment Token. A creator who has not opted in answers `403 agent_bookings_disabled`.",
                "summary": "A creator’s bookable services",
                "parameters": [
                    {
                        "in": "path",
                        "name": "handle",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ServiceList"
                                },
                                "examples": {
                                    "ACoachWithOneService": {
                                        "value": {
                                            "creator": {
                                                "handle": "ada",
                                                "name": "Ada Lovelace"
                                            },
                                            "services": [
                                                {
                                                    "id": "6f1c…",
                                                    "name": "Strategy call",
                                                    "description": "30 minutes, video.",
                                                    "duration_minutes": 30,
                                                    "price": {
                                                        "amount": 4500,
                                                        "currency": "usd"
                                                    },
                                                    "free": false,
                                                    "location": {
                                                        "kind": "video",
                                                        "online": true
                                                    },
                                                    "buffer": {
                                                        "before_minutes": 0,
                                                        "after_minutes": 10
                                                    }
                                                }
                                            ],
                                            "payment": {
                                                "provider": "stripe",
                                                "status": "available",
                                                "network_id": "profile_123",
                                                "currency": "USD",
                                                "country": "US"
                                            }
                                        },
                                        "summary": "A coach with one service"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/instagram": {
            "get": {
                "operationId": "instagram_retrieve",
                "description": "``GET /v1/instagram`` — the connection, as the creator app sees it.",
                "summary": "Is Instagram connected, and what may it do",
                "tags": [
                    "Instagram"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InstagramStatus"
                                },
                                "examples": {
                                    "Connected,MessagingAndCommentsOnly": {
                                        "value": {
                                            "connected": true,
                                            "connect_available": true,
                                            "publish_available_here": false,
                                            "connections": [
                                                {
                                                    "id": "9f2c1b40-0000-4000-8000-000000000000",
                                                    "handle": "avabakes",
                                                    "profile_picture_url": "",
                                                    "account_type": "BUSINESS",
                                                    "status": "connected",
                                                    "paused": false,
                                                    "permissions": [
                                                        "instagram_business_basic",
                                                        "instagram_business_manage_messages",
                                                        "instagram_business_manage_comments"
                                                    ],
                                                    "can_publish_content": false,
                                                    "token_expires_at": null,
                                                    "permission_state": "complete",
                                                    "needs_reconnect": null
                                                }
                                            ]
                                        },
                                        "summary": "Connected, messaging and comments only"
                                    },
                                    "Connected,ButAPermissionWasDeclined": {
                                        "value": {
                                            "connected": true,
                                            "connect_available": true,
                                            "publish_available_here": false,
                                            "connections": [
                                                {
                                                    "id": "9f2c1b40-0000-4000-8000-000000000001",
                                                    "handle": "iammohitkanda",
                                                    "profile_picture_url": "",
                                                    "account_type": "MEDIA_CREATOR",
                                                    "status": "connected",
                                                    "paused": false,
                                                    "permissions": [
                                                        "instagram_business_basic"
                                                    ],
                                                    "can_publish_content": false,
                                                    "token_expires_at": null,
                                                    "permission_state": "partial",
                                                    "needs_reconnect": {
                                                        "reason": "permission_missing",
                                                        "message": "Instagram was connected without permission to send messages or to read and reply to comments. Reconnect and keep every permission ticked.",
                                                        "missing_permissions": [
                                                            "instagram_business_manage_messages",
                                                            "instagram_business_manage_comments"
                                                        ],
                                                        "reconnect_url": "/my/automations#instagram"
                                                    }
                                                }
                                            ]
                                        },
                                        "summary": "Connected, but a permission was declined"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/instagram/analytics": {
            "get": {
                "operationId": "instagram_analytics_retrieve",
                "description": "``GET /v1/instagram/analytics?range=7d|30d|90d``.\n\nThe same projection ``GET /api/analytics/automation-performance/`` serves\nthe creator's own dashboard, from the same function. A metric we do not\nmeasure comes back with ``tracked: false`` rather than a zero — an agent\nreading \"0 followers gained\" and telling a creator their week went badly\nwould be worse than saying nothing.",
                "summary": "Instagram and automation performance",
                "tags": [
                    "Instagram"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InstagramAnalytics"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/instagram/connect": {
            "post": {
                "operationId": "instagram_connect_create",
                "description": "``POST /v1/instagram/connect`` — mint the Meta consent URL for a human.\n\nThe creator opens it, signs in to Instagram and approves; Meta redirects\nback to VKit, which completes the exchange. Nothing an agent can do\nshortcuts that, and the returned URL is single-use — its ``state`` is signed\nand consumed on the callback, so a cached URL will fail rather than quietly\nconnect the wrong account.",
                "summary": "Start connecting Instagram",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Instagram"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InstagramConnectResult"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`not_configured` — Instagram is not set up on this deployment."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/links": {
            "get": {
                "operationId": "links_retrieve",
                "description": "``GET``/``POST /v1/links``.\n\nThe create response is re-read through the analytics projection so a create\nand a list have the same shape, which is the contract\n``CreatorShortLinkViewSet`` already established.",
                "summary": "List short links with their click counts",
                "tags": [
                    "Links"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LinkList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "post": {
                "operationId": "links_create",
                "description": "``GET``/``POST /v1/links``.\n\nThe create response is re-read through the analytics projection so a create\nand a list have the same shape, which is the contract\n``CreatorShortLinkViewSet`` already established.",
                "summary": "Create a short link",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Links"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LinkCreateRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/LinkCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/LinkCreateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LinkEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error`."
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`idempotency_key_reused`."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/links/{link_id}": {
            "get": {
                "operationId": "links_retrieve_2",
                "description": "``GET``/``DELETE /v1/links/{link_id}``.\n\nA foreign id 404s rather than 403s, because it reaches this view through\n``for_workspace`` and therefore genuinely does not exist here — the same\nposture every scoped viewset in the codebase takes.",
                "summary": "One link",
                "parameters": [
                    {
                        "in": "path",
                        "name": "link_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Links"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LinkEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "delete": {
                "operationId": "links_destroy",
                "description": "``GET``/``DELETE /v1/links/{link_id}``.\n\nA foreign id 404s rather than 403s, because it reaches this view through\n``for_workspace`` and therefore genuinely does not exist here — the same\nposture every scoped viewset in the codebase takes.",
                "summary": "Delete a link",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "link_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Links"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No response body"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/links/{link_id}/stats": {
            "get": {
                "operationId": "links_stats_retrieve",
                "description": "``GET /v1/links/{link_id}/stats``.",
                "summary": "One link’s redirect counts",
                "parameters": [
                    {
                        "in": "path",
                        "name": "link_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Links"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Link"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/me": {
            "get": {
                "operationId": "me_retrieve",
                "description": "``GET /v1/me`` — the userinfo-shaped identity of this credential.\n\nNamed ``me`` rather than ``userinfo`` because it answers a wider question\nthan OIDC's: not just *who* but *where* and *what may I do* — the user, the\none workspace this credential is bound to, and the granted scopes. An agent\ncalling a multi-tenant API needs all three before it can do anything, and\nmaking it three calls is three chances to act on the wrong tenant.",
                "summary": "Who am I, and where",
                "tags": [
                    "Identity"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Me"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/orders": {
            "post": {
                "operationId": "orders_create",
                "description": "``POST /v1/orders`` — buy a creator's product with a Shared Payment Token.\n\nA product sale has no slot to hold, so the sequence is simply charge, then\nsettle through ``apps.payments.services.settle_agent_charge`` — the same\n``_settle`` every Stripe and PayPal sale has always gone through, which\nwrites the ``commerce.Order``, its price-snapshot ``OrderItem``, the balanced\njournal and the buyer's entitlement. Agentic commerce gets no second order\npipeline; it gets a different way of collecting the money.",
                "summary": "Buy a product",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/OrderCreateRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/OrderCreateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/OrderCreateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OrderEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/orders/{order_id}": {
            "get": {
                "operationId": "orders_retrieve",
                "description": "``GET /v1/orders/{order_id}`` — the agent's own receipt, by a stable id.",
                "summary": "One order",
                "parameters": [
                    {
                        "in": "path",
                        "name": "order_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Agentic commerce"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OrderEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "description": "`agent_bookings_disabled` — this creator has not switched on bookings from AI assistants. Not retryable."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    },
                    "402": {
                        "description": "`payment_declined` — the Shared Payment Token was refused. `details.decline_code` carries Stripe’s own code; nothing was booked and no hold remains."
                    },
                    "409": {
                        "description": "`slot_unavailable` — that time was taken. Search again."
                    },
                    "422": {
                        "description": "`unsupported_country` — the creator’s Stripe account is outside the countries Shared Payment Tokens support (`details.countries_ok`)."
                    }
                }
            }
        },
        "/page": {
            "get": {
                "operationId": "page_retrieve",
                "description": "``GET``/``PUT``/``PATCH /v1/page``.",
                "summary": "Read the page, its publish state and its public URL",
                "tags": [
                    "Link in Bio"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageEnvelope"
                                },
                                "examples": {
                                    "ADraftPageWithTwoLinks": {
                                        "value": {
                                            "page": {
                                                "document": {
                                                    "theme": {
                                                        "key": "midnight",
                                                        "tokens": {}
                                                    },
                                                    "page": {
                                                        "slug": "home",
                                                        "title": "Ava Reyes",
                                                        "seo": {
                                                            "title": "",
                                                            "description": ""
                                                        },
                                                        "blocks": [
                                                            {
                                                                "type": "hero",
                                                                "stable_key": "hero-1",
                                                                "config": {
                                                                    "headline": "Ava Reyes",
                                                                    "description": "Baker, Lisbon"
                                                                }
                                                            },
                                                            {
                                                                "type": "external_link",
                                                                "stable_key": "link-1",
                                                                "config": {
                                                                    "title": "My Substack",
                                                                    "url": "https://ava.substack.com"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                },
                                                "state": {
                                                    "status": "draft",
                                                    "revision": 12,
                                                    "etag": "W/\"storefront:0f1e:12\"",
                                                    "published_revision_no": 3,
                                                    "published_at": "2026-09-01T10:00:00Z",
                                                    "draft_matches_published": false,
                                                    "public_address_live": true
                                                },
                                                "public_url": "https://vkit.app/ava",
                                                "public_path": "/ava",
                                                "validation": {
                                                    "issues": [],
                                                    "notices": []
                                                }
                                            }
                                        },
                                        "summary": "A draft page with two links"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "put": {
                "operationId": "page_update",
                "description": "``GET``/``PUT``/``PATCH /v1/page``.",
                "summary": "Replace the whole page document",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Link in Bio"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PagePutRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PagePutRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PagePutRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error` — `details.issues` names each bad path."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "patch": {
                "operationId": "page_partial_update",
                "description": "``GET``/``PUT``/``PATCH /v1/page``.",
                "summary": "Change part of the page (theme, blocks, title, SEO)",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Link in Bio"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedPagePatchRequest"
                            },
                            "examples": {
                                "AddOneLinkAndMoveItToTheTop": {
                                    "value": {
                                        "blocks": {
                                            "add": [
                                                {
                                                    "type": "external_link",
                                                    "stable_key": "substack",
                                                    "config": {
                                                        "title": "My Substack",
                                                        "url": "https://ava.substack.com"
                                                    }
                                                }
                                            ],
                                            "reorder": [
                                                "substack"
                                            ]
                                        }
                                    },
                                    "summary": "Add one link and move it to the top"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedPagePatchRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedPagePatchRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error`."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/page/build-from-profile": {
            "post": {
                "operationId": "page_build_from_profile_create",
                "description": "``POST /v1/page/build-from-profile`` — read a public profile, compose a draft.\n\nReplaces the DRAFT only. The creator's live page is untouched until someone\ncalls ``POST /v1/page/publish``, which is the whole reason this is safe to\nhand an agent.\n\nAnswers ``202`` with a job. Poll ``GET /v1/page/jobs/{id}`` until ``status``\nis ``succeeded`` or ``failed``; ``result.report`` then says what was read and\nwhat was left out. Today's builder finishes inside this request, so the\nfirst poll is usually already terminal — do not depend on that.\n\nA source that is not a Linktree profile is refused at the door with ``422\nunsupported_source`` rather than accepted and failed asynchronously. The\ndoc says a non-Linktree source \"is refused rather than guessed at\", and a\nrefusal an agent has to poll for is one it will act on a beat too late —\nhaving already told the creator their page is being rebuilt.",
                "summary": "Build a page from a public profile",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Link in Bio"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PageBuildRequestRequest"
                            },
                            "examples": {
                                "ReadALinktreeAndRebuildTheDraftFromIt": {
                                    "value": {
                                        "source": "linktr.ee/avareyes"
                                    },
                                    "summary": "Read a Linktree and rebuild the draft from it"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PageBuildRequestRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PageBuildRequestRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "202": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageJobEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error`."
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`unsupported_source` — not a profile this route can read. `details.supported` names what it can."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/page/jobs/{job_id}": {
            "get": {
                "operationId": "page_jobs_retrieve",
                "description": "``GET /v1/page/jobs/{job_id}`` — poll a build.",
                "summary": "One build job",
                "parameters": [
                    {
                        "in": "path",
                        "name": "job_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Link in Bio"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageJobEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/page/publish": {
            "post": {
                "operationId": "page_publish_create",
                "description": "``POST /v1/page/publish`` — put the current draft online.\n\nAdmin-only, because ``CreatorStorefrontPublishView`` is: publishing is the\naction that makes a change public, and the role gate on it is the creator's,\nnot ours to relax for an agent.",
                "summary": "Publish the page",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Link in Bio"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`publish_validation_failed` — `details.issues` says what to fix first."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/page/unpublish": {
            "post": {
                "operationId": "page_unpublish_create",
                "description": "``POST /v1/page/unpublish`` — stop serving the public address.\n\nReversible: the published revision pointer stays, so a later publish puts\nthe same page back.",
                "summary": "Take the page offline",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Link in Bio"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PageEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts": {
            "get": {
                "operationId": "posts_retrieve",
                "description": "``GET``/``POST /v1/posts``.",
                "summary": "The calendar — posts between two dates",
                "parameters": [
                    {
                        "in": "query",
                        "name": "from",
                        "schema": {
                            "type": "string"
                        },
                        "description": "ISO date or datetime, inclusive."
                    },
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "type": "string"
                        },
                        "description": "1–100, default 24."
                    },
                    {
                        "in": "query",
                        "name": "offset",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "in": "query",
                        "name": "to",
                        "schema": {
                            "type": "string"
                        },
                        "description": "ISO date or datetime, inclusive."
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostList"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "post": {
                "operationId": "posts_create",
                "description": "Two modes under one route, told apart by `mode`.\n\n`generate` (the default): an idea in, a brand-true post out — the art-direction pass, caption options and imagery. Spends credits.\n\n`compose`: the post is already written. `body` (text or HTML plus media), an optional `thread` (replies on X and Threads, a first comment on LinkedIn, Instagram and Facebook), and one `targets[]` row per platform, each with its own optional `override` and `options`. `publish_mode` is `draft` (saved, nothing validated), `schedule` (needs `scheduled_for`) or `now`; the last two also need the `posts.schedule` scope. A target that cannot take the post answers `422 validation_failed`, whose `details.targets` is the same per-target verdict `POST /v1/posts/validate` gives — call that first and nothing is saved.",
                "summary": "Generate a brand-true post, or compose one the creator wrote",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostCreateRequestRequest"
                            },
                            "examples": {
                                "AThree-slideCarousel": {
                                    "value": {
                                        "idea": "three mistakes people make with sourdough starter",
                                        "format": "carousel",
                                        "slides": 3
                                    },
                                    "summary": "A three-slide carousel"
                                },
                                "ComposeToXAndLinkedIn,LinkedInCustomised,Scheduled": {
                                    "value": {
                                        "mode": "compose",
                                        "publish_mode": "schedule",
                                        "scheduled_for": "2026-10-06T13:00:00Z",
                                        "timezone": "America/Toronto",
                                        "body": {
                                            "text": "Three mistakes people make with sourdough starter."
                                        },
                                        "thread": [
                                            {
                                                "text": "Full write-up: https://vkit.app/ava",
                                                "delay_minutes": 0
                                            }
                                        ],
                                        "targets": [
                                            {
                                                "platform": "x",
                                                "options": {
                                                    "who_can_reply": "everyone"
                                                }
                                            },
                                            {
                                                "platform": "linkedin",
                                                "override": {
                                                    "text": "Three mistakes people make with sourdough starter — and what I do instead."
                                                }
                                            }
                                        ]
                                    },
                                    "summary": "Compose to X and LinkedIn, LinkedIn customised, scheduled"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PostCreateRequestRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PostCreateRequestRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostCreateResponse"
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error`."
                    },
                    "402": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`credits_exhausted` — not enough credits for this generation."
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`brand_not_analyzed` — this workspace has no Brand Studio analysis, so there is no brand to generate against. Nothing was charged; `details.next_step` says how to get one. Read `content.generate` on `GET /v1/capabilities` before calling, and you will never see this."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/{post_id}": {
            "get": {
                "operationId": "posts_retrieve_2",
                "description": "A composed post carries `targets[]` with, per platform, `status`, `permalink` once live, `error_code`/`error_message` when it failed, and `thread_state` for its replies or first comment. A Studio post carries its slides and captions.",
                "summary": "One saved post",
                "parameters": [
                    {
                        "in": "path",
                        "name": "post_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/{post_id}/publish-now": {
            "post": {
                "operationId": "posts_publish_now_create",
                "description": "Every target is validated, then handed to the publisher at once; the answer is the post with each target in `publishing`, and the `post.published` webhook (or the target's `error_code`) says how it went. A post that already went out answers `409 already_published` unless `republish` is true. A Studio post is scheduled through `POST /v1/posts/{id}/schedule` instead.",
                "summary": "Send a composed post now",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "post_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostPublishNowRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PostPublishNowRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PostPublishNowRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`already_published`."
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_failed` — `details.targets` is the per-target verdict."
                    },
                    "503": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`temporarily_unavailable` — composing is not on this deployment."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/{post_id}/schedule": {
            "post": {
                "operationId": "posts_schedule_create",
                "description": "``POST``/``DELETE /v1/posts/{post_id}/schedule``.",
                "summary": "Put a post on the calendar",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "post_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostScheduleRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PostScheduleRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PostScheduleRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`already_published` (a composed post that has gone out; pass `republish: true` to send it again) / `instagram_connection_required` / `instagram_publish_scope_missing` / `studio_post_locked`."
                    },
                    "422": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_failed` — a composed post's target cannot take it. `details.targets` is the per-target verdict."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "delete": {
                "operationId": "posts_schedule_destroy",
                "description": "``POST``/``DELETE /v1/posts/{post_id}/schedule``.",
                "summary": "Take a post off the calendar",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "post_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/{post_id}/targets/{platform}": {
            "patch": {
                "operationId": "posts_targets_partial_update",
                "description": "``PATCH``/``DELETE /v1/posts/{post_id}/targets/{platform}``.\n\nManaging ONE published target after the fact. Only a platform whose\nadapter can edit and delete a live post takes these — Facebook Pages today;\nthe post's own ``targets[].can_edit`` / ``can_delete`` say which. Every\nother platform answers ``target_not_supported``, and nothing here ever\nchanges the post's other targets.",
                "summary": "Edit the text of a live post on one platform",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "platform",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "in": "path",
                        "name": "post_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedPostTargetEditRequest"
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedPostTargetEditRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchedPostTargetEditRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`target_not_supported` (the platform cannot edit a live post from here) / `target_not_live` (nothing published on that platform) / `target_command_failed`."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            },
            "delete": {
                "operationId": "posts_targets_destroy",
                "description": "``PATCH``/``DELETE /v1/posts/{post_id}/targets/{platform}``.\n\nManaging ONE published target after the fact. Only a platform whose\nadapter can edit and delete a live post takes these — Facebook Pages today;\nthe post's own ``targets[].can_edit`` / ``can_delete`` say which. Every\nother platform answers ``target_not_supported``, and nothing here ever\nchanges the post's other targets.",
                "summary": "Remove a live post from one platform",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    },
                    {
                        "in": "path",
                        "name": "platform",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "in": "path",
                        "name": "post_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostEnvelope"
                                }
                            }
                        },
                        "description": ""
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`target_not_supported` / `target_not_live` / `target_command_failed`."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/models": {
            "get": {
                "operationId": "posts_models_retrieve",
                "description": "``GET /v1/posts/models`` — the server's catalog, not a copy of it.",
                "summary": "The image models, their credit costs, and your balance",
                "tags": [
                    "Posts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostModelCatalog"
                                },
                                "examples": {
                                    "TwoEngines,FourCreditsAnImage": {
                                        "value": {
                                            "models": [
                                                {
                                                    "id": "openai/gpt-image-2.5-sunburst",
                                                    "name": "Premium 1",
                                                    "credits": 4,
                                                    "default": true,
                                                    "tier": "premium",
                                                    "speed_label": "Highest fidelity"
                                                },
                                                {
                                                    "id": "openai/gpt-image-2.5-flare",
                                                    "name": "Premium 2",
                                                    "credits": 4,
                                                    "default": false,
                                                    "tier": "premium",
                                                    "speed_label": "Fastest"
                                                }
                                            ],
                                            "default_model": "openai/gpt-image-2.5-sunburst",
                                            "costs": {
                                                "plan": 2,
                                                "captions": 1
                                            },
                                            "balance": 96,
                                            "catalog_version": 5
                                        },
                                        "summary": "Two engines, four credits an image"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/targets": {
            "get": {
                "operationId": "posts_targets_retrieve",
                "description": "``GET /v1/posts/targets`` — the publish-platform truth, projected.\n\nRead from ``GET /api/integrations/connections/``, which the creator app's\nown calendar target picker is fed by and nothing else. Two surfaces\ndisagreeing about whether a creator can post to TikTok is how an agent ends\nup promising something that will not happen.",
                "summary": "Where a post can actually go",
                "tags": [
                    "Posts"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTargetList"
                                },
                                "examples": {
                                    "InstagramLinkedButReminder-only;XNotConfiguredHere": {
                                        "value": {
                                            "targets": [
                                                {
                                                    "platform": "instagram",
                                                    "label": "Instagram",
                                                    "state": "connected",
                                                    "can_publish": false,
                                                    "reason": "publish_permission_missing",
                                                    "note": "",
                                                    "handles": [
                                                        "avabakes"
                                                    ]
                                                },
                                                {
                                                    "platform": "threads",
                                                    "label": "Threads",
                                                    "state": "needs_connection",
                                                    "can_publish": false,
                                                    "reason": "",
                                                    "note": "",
                                                    "handles": []
                                                },
                                                {
                                                    "platform": "x",
                                                    "label": "X",
                                                    "state": "not_available",
                                                    "can_publish": false,
                                                    "reason": "not_configured",
                                                    "note": "",
                                                    "handles": []
                                                },
                                                {
                                                    "platform": "facebook",
                                                    "label": "Facebook",
                                                    "state": "not_available",
                                                    "can_publish": false,
                                                    "reason": "awaiting_approval",
                                                    "note": "Awaiting Meta approval for Facebook publishing.",
                                                    "handles": []
                                                }
                                            ]
                                        },
                                        "summary": "Instagram linked but reminder-only; X not configured here"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/posts/validate": {
            "post": {
                "operationId": "posts_validate_create",
                "description": "The same body as `POST /v1/posts` with `mode: compose`. Answers the per-platform verdict — text length against the platform limit, media kind and count, the connection's state, the thread mode, the daily quota — and for every error a `fix` the caller can act on: `shorten` by `n`, `add_media`, `remove_video`, `connect` at `href`, `pick_page`, `fix_options`. Nothing is saved, nothing is charged. Drafts never need this; `schedule` and `now` refuse with the same shape when it fails.",
                "summary": "Would this post go? Per target, before saving anything",
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Replay-safe write key, 8–128 characters. The first response for a key is stored for 24 hours and replayed (with `Idempotency-Replayed: true`) for an identical repeat; a different body under the same key is a 409 `idempotency_key_reused`."
                    }
                ],
                "tags": [
                    "Posts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostValidateRequest"
                            },
                            "examples": {
                                "XAt281Characters,InstagramWithNoPicture": {
                                    "value": {
                                        "body": {
                                            "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                                        },
                                        "targets": [
                                            {
                                                "platform": "x"
                                            },
                                            {
                                                "platform": "instagram"
                                            }
                                        ]
                                    },
                                    "summary": "X at 281 characters, Instagram with no picture"
                                }
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PostValidateRequest"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/PostValidateRequest"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationResult"
                                },
                                "examples": {
                                    "BothRefused,EachWithItsFix": {
                                        "value": {
                                            "ok": false,
                                            "targets": [
                                                {
                                                    "platform": "x",
                                                    "ok": false,
                                                    "limit": 280,
                                                    "used": 281,
                                                    "errors": [
                                                        {
                                                            "code": "too_long",
                                                            "message": "1 character over X's 280.",
                                                            "fix": {
                                                                "action": "shorten",
                                                                "n": 1
                                                            }
                                                        }
                                                    ]
                                                },
                                                {
                                                    "platform": "instagram",
                                                    "ok": false,
                                                    "limit": 2200,
                                                    "used": 281,
                                                    "errors": [
                                                        {
                                                            "code": "requires_media",
                                                            "message": "Instagram needs a picture or a video.",
                                                            "fix": {
                                                                "action": "add_media"
                                                            }
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "summary": "Both refused, each with its fix"
                                    }
                                }
                            }
                        },
                        "description": ""
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`validation_error` — the body itself is malformed."
                    },
                    "503": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`temporarily_unavailable` — composing is not on this deployment."
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/upgrade": {
            "get": {
                "operationId": "upgrade_retrieve",
                "description": "``GET /v1/upgrade`` — offer the upgrade before a gate is hit.\n\nEverything a `402 plan_required` carries, readable ahead of time: the\nworkspace's plan, the link to the plan chooser (``null`` once paid), the\nprice from the plan catalog, and every gated feature with its entitlement\nfor THIS workspace. An agent that reads it can say \"that one is part of\nPro — here is the link\" before trying, rather than after failing.\n\n``profile.read`` because it discloses nothing the plan block of\n``/v1/capabilities`` does not already.",
                "summary": "The upgrade link, the price, and which features are Pro",
                "tags": [
                    "Identity"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpgradeLink"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/workspace": {
            "get": {
                "operationId": "workspace_retrieve",
                "description": "``GET /v1/workspace`` — the tenant this credential is bound to.",
                "summary": "The workspace this credential is bound to",
                "tags": [
                    "Identity"
                ],
                "security": [
                    {
                        "PlatformToken": []
                    },
                    {
                        "jwtAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Workspace"
                                }
                            }
                        },
                        "description": ""
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Missing or invalid credential."
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "`insufficient_scope` — the credential lacks the required scope."
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "No such resource in this workspace."
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "description": "Rate limited. See `X-RateLimit-Reset` and `Retry-After`."
                    }
                }
            }
        },
        "/oauth/register": {
            "post": {
                "operationId": "oauth_register",
                "tags": [
                    "OAuth"
                ],
                "summary": "Register a client (RFC 7591)",
                "description": "Anonymous. An MCP client reads `registration_endpoint` from `/.well-known/oauth-authorization-server`, registers itself here, stores the `client_id`, and starts the authorization-code + PKCE flow — no human types a client id. Every client registered this way is public (`token_endpoint_auth_method: none`). A repeat of the same registration from the same address within 24 hours answers `200` with the existing client rather than minting another. Clients that never complete a grant are deleted after 7 days.",
                "security": [],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/OAuthClientMetadata"
                            },
                            "example": {
                                "client_name": "Muse",
                                "redirect_uris": [
                                    "https://agent.meta.ai/api/hatch/oauth/callback"
                                ],
                                "token_endpoint_auth_method": "none",
                                "grant_types": [
                                    "authorization_code",
                                    "refresh_token"
                                ],
                                "response_types": [
                                    "code"
                                ],
                                "scope": "profile.read page.write"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Registered.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthClientRegistration"
                                },
                                "example": {
                                    "client_id": "vkc_W2QPaNLlrm_LLiH6KooxZ_SB",
                                    "client_id_issued_at": 1789938000,
                                    "client_name": "Muse",
                                    "redirect_uris": [
                                        "https://agent.meta.ai/api/hatch/oauth/callback"
                                    ],
                                    "grant_types": [
                                        "authorization_code",
                                        "refresh_token"
                                    ],
                                    "response_types": [
                                        "code"
                                    ],
                                    "token_endpoint_auth_method": "none",
                                    "scope": "profile.read links.write page.write instagram.connect automations.write posts.write posts.schedule analytics.read community.manage broadcasts.write commerce.book",
                                    "registration_access_token": "vkg_…",
                                    "registration_client_uri": "https://api.vkit.app/v1/oauth/register/vkc_W2QPaNLlrm_LLiH6KooxZ_SB"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "The client this address already registered (deduplicated).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthClientRegistration"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "`invalid_redirect_uri` or `invalid_client_metadata`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                },
                                "example": {
                                    "error": "invalid_redirect_uri",
                                    "error_description": "http:// is only accepted for the loopback interface …"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited: 10/hour and 50/day per address. See `X-RateLimit-Reset`."
                    },
                    "503": {
                        "description": "`temporarily_unavailable`: the registry of unused clients is full.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/oauth/register/{client_id}": {
            "get": {
                "security": [
                    {
                        "RegistrationToken": []
                    }
                ],
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The `vkc_…` client id."
                    }
                ],
                "tags": [
                    "OAuth"
                ],
                "operationId": "oauth_registration_read",
                "summary": "Read a registration (RFC 7592)",
                "responses": {
                    "200": {
                        "description": "The registration.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthClientRegistration"
                                },
                                "example": {
                                    "client_id": "vkc_W2QPaNLlrm_LLiH6KooxZ_SB",
                                    "client_id_issued_at": 1789938000,
                                    "client_name": "Muse",
                                    "redirect_uris": [
                                        "https://agent.meta.ai/api/hatch/oauth/callback"
                                    ],
                                    "grant_types": [
                                        "authorization_code",
                                        "refresh_token"
                                    ],
                                    "response_types": [
                                        "code"
                                    ],
                                    "token_endpoint_auth_method": "none",
                                    "scope": "profile.read links.write page.write instagram.connect automations.write posts.write posts.schedule analytics.read community.manage broadcasts.write commerce.book",
                                    "registration_access_token": "vkg_…",
                                    "registration_client_uri": "https://api.vkit.app/v1/oauth/register/vkc_W2QPaNLlrm_LLiH6KooxZ_SB"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or wrong registration access token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No dynamically registered client with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited: 10/hour and 50/day per address. See `X-RateLimit-Reset`."
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "RegistrationToken": []
                    }
                ],
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The `vkc_…` client id."
                    }
                ],
                "tags": [
                    "OAuth"
                ],
                "operationId": "oauth_registration_replace",
                "summary": "Replace a registration (RFC 7592)",
                "description": "The whole metadata set is replaced under the same rules as registration; omitted optional fields become empty. `client_id` in the body, if present, must match the URL. The client id and the registration access token are unchanged.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/OAuthClientMetadata"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The replaced registration.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthClientRegistration"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "`invalid_redirect_uri` or `invalid_client_metadata`; nothing changed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or wrong registration access token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No dynamically registered client with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited: 10/hour and 50/day per address. See `X-RateLimit-Reset`."
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "RegistrationToken": []
                    }
                ],
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The `vkc_…` client id."
                    }
                ],
                "tags": [
                    "OAuth"
                ],
                "operationId": "oauth_registration_delete",
                "summary": "Delete a registration (RFC 7592)",
                "description": "Forgets the client and revokes every token and authorization code issued to it. The `client_id` stops authorizing immediately.",
                "responses": {
                    "204": {
                        "description": "Gone."
                    },
                    "401": {
                        "description": "Missing or wrong registration access token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No dynamically registered client with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OAuthRegistrationError"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited: 10/hour and 50/day per address. See `X-RateLimit-Reset`."
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ActionEnum": {
                "enum": [
                    "connect",
                    "add_media",
                    "remove_video",
                    "shorten",
                    "pick_page",
                    "fix_options"
                ],
                "type": "string",
                "description": "* `connect` - connect\n* `add_media` - add_media\n* `remove_video` - remove_video\n* `shorten` - shorten\n* `pick_page` - pick_page\n* `fix_options` - fix_options"
            },
            "AnalyticsSummary": {
                "type": "object",
                "properties": {
                    "range": {
                        "type": "string"
                    },
                    "page": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true,
                        "description": "`{views, clicks, click_through_rate}` for the Link in Bio page."
                    },
                    "instagram": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true,
                        "description": "Automation and reach metrics. Null when Instagram has never been connected."
                    },
                    "community": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true,
                        "description": "`{members, active, updates, events}`. Null when there is no community."
                    },
                    "available": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "boolean"
                        },
                        "description": "Which sections carry real data, so you do not report a zero as a fact."
                    }
                },
                "required": [
                    "available",
                    "community",
                    "instagram",
                    "page",
                    "range"
                ]
            },
            "AutomationCreateRequest": {
                "type": "object",
                "properties": {
                    "keyword": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The comment word that triggers the DM, e.g. \"RECIPE\"."
                    },
                    "reply": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The DM text sent to whoever commented."
                    },
                    "link": {
                        "type": "string",
                        "format": "uri",
                        "description": "Optional link included in the DM."
                    },
                    "name": {
                        "type": "string",
                        "description": "Defaults to \"Auto-DM · <keyword>\"."
                    },
                    "template": {
                        "type": "string",
                        "minLength": 1,
                        "description": "A guided template id. Defaults to `auto-dm-links-from-comments`. Only wizard-ready templates are accepted here."
                    }
                },
                "required": [
                    "keyword",
                    "reply"
                ]
            },
            "AutomationEnvelope": {
                "type": "object",
                "properties": {
                    "automation": {
                        "$ref": "#/components/schemas/AutomationSummary"
                    }
                },
                "required": [
                    "automation"
                ]
            },
            "AutomationList": {
                "type": "object",
                "properties": {
                    "automations": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AutomationSummary"
                        }
                    }
                },
                "required": [
                    "automations"
                ]
            },
            "AutomationNeedsReconnect": {
                "type": "object",
                "properties": {
                    "reason": {
                        "$ref": "#/components/schemas/ReasonEnum"
                    },
                    "message": {
                        "type": "string"
                    },
                    "missing_permissions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "reconnect_url": {
                        "type": "string"
                    }
                },
                "required": [
                    "message",
                    "missing_permissions",
                    "reason",
                    "reconnect_url"
                ]
            },
            "AutomationSummary": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "channel": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/AutomationSummaryStatusEnum"
                    },
                    "paused_reason": {
                        "type": "string",
                        "nullable": true
                    },
                    "needs_reconnect": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/AutomationNeedsReconnect"
                            }
                        ],
                        "nullable": true,
                        "description": "Null unless the Instagram account this automation runs on has to be reconnected. `permission_missing`: the creator declined a permission on the consent screen, so this automation cannot be published or resumed until they reconnect and keep every permission ticked."
                    },
                    "source_template": {
                        "type": "string",
                        "nullable": true
                    },
                    "trigger_summary": {
                        "type": "string"
                    },
                    "runs": {
                        "type": "integer"
                    },
                    "sends": {
                        "type": "integer"
                    },
                    "published_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "channel",
                    "created_at",
                    "id",
                    "name",
                    "needs_reconnect",
                    "paused_reason",
                    "published_at",
                    "source_template",
                    "status"
                ]
            },
            "AutomationSummaryStatusEnum": {
                "enum": [
                    "draft",
                    "live",
                    "paused",
                    "stopped"
                ],
                "type": "string",
                "description": "* `draft` - draft\n* `live` - live\n* `paused` - paused\n* `stopped` - stopped"
            },
            "Availability": {
                "type": "object",
                "properties": {
                    "service_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "date": {
                        "type": "string",
                        "description": "The creator-local date searched."
                    },
                    "timezone": {
                        "type": "string",
                        "description": "The creator’s own IANA zone."
                    },
                    "requested_timezone": {
                        "type": "string",
                        "description": "Echoed back from the query, for the agent’s own display."
                    },
                    "slots": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Slot"
                        }
                    }
                },
                "required": [
                    "date",
                    "requested_timezone",
                    "service_id",
                    "slots",
                    "timezone"
                ]
            },
            "BlockOpsRequest": {
                "type": "object",
                "properties": {
                    "add": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        },
                        "description": "Blocks to append: `{type, config, stable_key?, position?}`."
                    },
                    "remove": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        },
                        "description": "`stable_key`s to delete."
                    },
                    "update": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        },
                        "description": "`{stable_key, config}` — merged into the existing config."
                    },
                    "reorder": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        },
                        "description": "The full `stable_key` order. Keys you omit keep their relative order at the end."
                    }
                }
            },
            "Booking": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "type": "string"
                    },
                    "start": {
                        "type": "string"
                    },
                    "end": {
                        "type": "string"
                    },
                    "slot_id": {
                        "type": "string"
                    },
                    "service": {
                        "$ref": "#/components/schemas/Service"
                    },
                    "price": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "payment": {
                        "$ref": "#/components/schemas/BookingPayment"
                    },
                    "manage_url": {
                        "type": "string"
                    },
                    "checkout_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "The agent purchase record this booking came from."
                    }
                },
                "required": [
                    "checkout_id",
                    "end",
                    "id",
                    "manage_url",
                    "payment",
                    "price",
                    "service",
                    "slot_id",
                    "start",
                    "status"
                ]
            },
            "BookingCancel": {
                "type": "object",
                "description": "Cancel answers with the booking AND what happened to the money.\n\n``refund`` is the news: the creator's own policy decides it, and an agent\nthat ignores this field will tell a customer they were refunded when they\nwere not.",
                "properties": {
                    "booking": {
                        "$ref": "#/components/schemas/Booking"
                    },
                    "refund": {
                        "$ref": "#/components/schemas/RefundEnum"
                    }
                },
                "required": [
                    "booking",
                    "refund"
                ]
            },
            "BookingCreateRequest": {
                "type": "object",
                "properties": {
                    "service_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "slot_id": {
                        "type": "string",
                        "minLength": 1
                    },
                    "customer": {
                        "$ref": "#/components/schemas/CustomerRequest"
                    },
                    "notes": {
                        "type": "string"
                    },
                    "party_size": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Accepted for parity with Stripe’s services guide. A VKit booking is one appointment, so anything above 1 is refused rather than silently sold as one seat."
                    },
                    "payment_data": {
                        "$ref": "#/components/schemas/PaymentDataRequest"
                    }
                },
                "required": [
                    "customer",
                    "service_id",
                    "slot_id"
                ]
            },
            "BookingEnvelope": {
                "type": "object",
                "properties": {
                    "booking": {
                        "$ref": "#/components/schemas/Booking"
                    }
                },
                "required": [
                    "booking"
                ]
            },
            "BookingPayment": {
                "type": "object",
                "properties": {
                    "status": {
                        "$ref": "#/components/schemas/BookingPaymentStatusEnum"
                    },
                    "receipt_url": {
                        "type": "string",
                        "nullable": true
                    },
                    "decline_code": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "required": [
                    "status"
                ]
            },
            "BookingPaymentStatusEnum": {
                "enum": [
                    "free",
                    "paid",
                    "declined",
                    "pending"
                ],
                "type": "string",
                "description": "* `free` - free\n* `paid` - paid\n* `declined` - declined\n* `pending` - pending"
            },
            "Broadcast": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "$ref": "#/components/schemas/BroadcastStatusEnum"
                    },
                    "source": {
                        "type": "string",
                        "format": "uuid",
                        "description": "The community update it was written as."
                    },
                    "update_title": {
                        "type": "string"
                    },
                    "approved_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "children": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BroadcastChild"
                        }
                    }
                },
                "required": [
                    "approved_at",
                    "children",
                    "created_at",
                    "id",
                    "source",
                    "status",
                    "update_title"
                ]
            },
            "BroadcastChild": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "channel": {
                        "$ref": "#/components/schemas/ChannelEnum"
                    },
                    "label": {
                        "type": "string"
                    },
                    "status": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/BroadcastChildStatusEnum"
                            }
                        ],
                        "description": "`draft` waits on the approval. `needs_connection` means the platform works here and the creator has not linked an account. `not_available` means it cannot take this announcement at all right now — read `error` for which. `failed` was attempted; retry it. Nothing is ever `sent` that was not sent.\n\n* `draft` - draft\n* `needs_connection` - needs_connection\n* `not_available` - not_available\n* `scheduled` - scheduled\n* `sent` - sent\n* `failed` - failed\n* `canceled` - canceled"
                    },
                    "adapted_body": {
                        "type": "string",
                        "description": "The announcement, already inside this channel’s limits."
                    },
                    "adapted_media": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "segments": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "More than one only on X, where a long post is a thread."
                    },
                    "notes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Every cut, dropped hashtag and left-behind image, in words."
                    },
                    "settings_notes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Which announcement setting produced this child’s state."
                    },
                    "text_limit": {
                        "type": "integer"
                    },
                    "sent_count": {
                        "type": "integer",
                        "nullable": true,
                        "description": "Recipients reached, where we know — the email child only. `null` elsewhere, because a zero would read as \"nobody saw it\"."
                    },
                    "email_quota": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true,
                        "description": "Set only on a `community_email` child refused for want of email allowance: `{code, remaining, needed, buy_url}`. Nobody was mailed and no units were spent, and the other channels still went. Buy a top-up pack, then retry this child. `null` everywhere else."
                    },
                    "scheduled_for": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "external_ref": {
                        "type": "string",
                        "description": "The Update, EmailCampaign or Studio post this channel made."
                    },
                    "error": {
                        "type": "string"
                    },
                    "reason_code": {
                        "type": "string",
                        "description": "The machine-readable key behind `error`, so a client can offer the one action that would fix this channel without matching the sentence: `needs_connection`, `no_media`, `no_subscribers`, `disabled`, `instagram_awaiting_review`, `not_configured`, `no_community_email`. `\"\"` on a channel that is not blocked."
                    },
                    "sent_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "can_retry": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "adapted_body",
                    "adapted_media",
                    "can_retry",
                    "channel",
                    "created_at",
                    "email_quota",
                    "error",
                    "external_ref",
                    "id",
                    "label",
                    "notes",
                    "reason_code",
                    "scheduled_for",
                    "segments",
                    "sent_at",
                    "sent_count",
                    "settings_notes",
                    "status",
                    "text_limit"
                ]
            },
            "BroadcastChildStatusEnum": {
                "enum": [
                    "draft",
                    "needs_connection",
                    "not_available",
                    "scheduled",
                    "sent",
                    "failed",
                    "canceled"
                ],
                "type": "string",
                "description": "* `draft` - draft\n* `needs_connection` - needs_connection\n* `not_available` - not_available\n* `scheduled` - scheduled\n* `sent` - sent\n* `failed` - failed\n* `canceled` - canceled"
            },
            "BroadcastCreateRequest": {
                "type": "object",
                "properties": {
                    "update_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Announce an existing community update. Omit to write a new one."
                    },
                    "update": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/BroadcastInlineUpdateRequest"
                            }
                        ],
                        "description": "Write the update and announce it in one call."
                    },
                    "channels": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ChannelsEnum"
                        },
                        "description": "Omit to use the creator’s own default channels from their announcement settings. `feed` is always included unless they have switched it off, and a channel they have switched off is dropped even when you name it."
                    },
                    "scheduled_for": {
                        "type": "string",
                        "format": "date-time",
                        "description": "ISO 8601. Omit to use their default send hour, or to go on approval."
                    },
                    "hashtags": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "approve": {
                        "type": "boolean",
                        "default": false,
                        "description": "Approve it in the same call. This is the act that emails real people and puts real posts on a calendar; only pass it when the creator has seen the plan."
                    }
                }
            },
            "BroadcastInlineUpdateRequest": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                    },
                    "body": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Plain text."
                    },
                    "media": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        },
                        "description": "Images for the social channels, each exactly one of `{data_url}`, `{asset_id}` or `{generation_id}`. A social channel with no image comes back `not_available` — a post carries a picture and this API will not invent one."
                    }
                },
                "required": [
                    "body",
                    "title"
                ]
            },
            "BroadcastListEnvelope": {
                "type": "object",
                "properties": {
                    "broadcasts": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Broadcast"
                        }
                    }
                },
                "required": [
                    "broadcasts"
                ]
            },
            "BroadcastStatusEnum": {
                "enum": [
                    "draft",
                    "approved",
                    "sent",
                    "partial",
                    "canceled"
                ],
                "type": "string",
                "description": "* `draft` - draft\n* `approved` - approved\n* `sent` - sent\n* `partial` - partial\n* `canceled` - canceled"
            },
            "CapabilityManifest": {
                "type": "object",
                "description": "The workspace capability manifest.\n\nPassed through verbatim from ``apps.workspaces.capabilities``; its containers\nare frozen by ``apps.api.tests_capability_manifest``. Declared as free-form\nhere rather than mirrored, because a second hand-written copy of a 1,000-line\nread model is a copy that will be wrong within a month.",
                "properties": {
                    "data": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "view_version": {
                        "type": "integer"
                    },
                    "generated_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "freshness": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "permissions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "availability": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "sources": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    }
                },
                "required": [
                    "availability",
                    "data",
                    "freshness",
                    "generated_at",
                    "permissions",
                    "sources",
                    "view_version"
                ]
            },
            "ChannelEnum": {
                "enum": [
                    "feed",
                    "community_email",
                    "instagram",
                    "x",
                    "linkedin",
                    "tiktok",
                    "threads"
                ],
                "type": "string",
                "description": "* `feed` - feed\n* `community_email` - community_email\n* `instagram` - instagram\n* `x` - x\n* `linkedin` - linkedin\n* `tiktok` - tiktok\n* `threads` - threads"
            },
            "ChannelsEnum": {
                "enum": [
                    "feed",
                    "community_email",
                    "instagram",
                    "x",
                    "linkedin",
                    "tiktok",
                    "threads"
                ],
                "type": "string",
                "description": "* `feed` - feed\n* `community_email` - community_email\n* `instagram` - instagram\n* `x` - x\n* `linkedin` - linkedin\n* `tiktok` - tiktok\n* `threads` - threads"
            },
            "CodeEnum": {
                "enum": [
                    "empty",
                    "too_long",
                    "needs_connection",
                    "awaiting_approval",
                    "permission_missing",
                    "requires_media",
                    "too_many_media",
                    "video_not_supported",
                    "mixed_media",
                    "image_too_large",
                    "video_too_long",
                    "video_too_short",
                    "bad_aspect",
                    "carousel_out_of_range",
                    "options_invalid",
                    "thread_not_supported",
                    "thread_media_not_supported",
                    "quota_exceeded"
                ],
                "type": "string",
                "description": "* `empty` - empty\n* `too_long` - too_long\n* `needs_connection` - needs_connection\n* `awaiting_approval` - awaiting_approval\n* `permission_missing` - permission_missing\n* `requires_media` - requires_media\n* `too_many_media` - too_many_media\n* `video_not_supported` - video_not_supported\n* `mixed_media` - mixed_media\n* `image_too_large` - image_too_large\n* `video_too_long` - video_too_long\n* `video_too_short` - video_too_short\n* `bad_aspect` - bad_aspect\n* `carousel_out_of_range` - carousel_out_of_range\n* `options_invalid` - options_invalid\n* `thread_not_supported` - thread_not_supported\n* `thread_media_not_supported` - thread_media_not_supported\n* `quota_exceeded` - quota_exceeded"
            },
            "CommunityEventCreateRequest": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                    },
                    "description": {
                        "type": "string"
                    },
                    "date": {
                        "type": "string",
                        "format": "date"
                    },
                    "time": {
                        "type": "string",
                        "format": "time",
                        "nullable": true
                    },
                    "location": {
                        "type": "string"
                    },
                    "capacity": {
                        "type": "integer",
                        "nullable": true
                    }
                },
                "required": [
                    "date",
                    "title"
                ]
            },
            "CommunityEventEnvelope": {
                "type": "object",
                "properties": {
                    "event": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                },
                "required": [
                    "event"
                ]
            },
            "CommunityList": {
                "type": "object",
                "properties": {
                    "updates": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "members": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "summary": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                }
            },
            "CommunityOverview": {
                "type": "object",
                "properties": {
                    "community": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "metrics": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "Members, RSVPs, updates, email opens."
                    },
                    "checklist": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "next_event": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true
                    },
                    "latest_update": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true
                    },
                    "public_url": {
                        "type": "string",
                        "format": "uri"
                    }
                },
                "required": [
                    "checklist",
                    "community",
                    "latest_update",
                    "metrics",
                    "next_event",
                    "public_url"
                ]
            },
            "CommunityUpdateCreateRequest": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                    },
                    "body": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Plain text. Rendered into the feed and, if emailed, the email."
                    },
                    "pinned": {
                        "type": "boolean",
                        "default": false
                    },
                    "email": {
                        "type": "boolean",
                        "default": false,
                        "description": "Send it to every subscribed member. A real send; not reversible."
                    }
                },
                "required": [
                    "body",
                    "title"
                ]
            },
            "CommunityUpdateEnvelope": {
                "type": "object",
                "properties": {
                    "update": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                },
                "required": [
                    "update"
                ]
            },
            "ComposeTargetRequest": {
                "type": "object",
                "properties": {
                    "platform": {
                        "type": "string",
                        "minLength": 1,
                        "description": "A platform from `GET /v1/posts/targets`.",
                        "maxLength": 32
                    },
                    "connection": {
                        "type": "string",
                        "nullable": true,
                        "description": "A connection id, when the creator has more than one account on that platform."
                    },
                    "override": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/TargetOverrideRequest"
                            }
                        ],
                        "nullable": true,
                        "description": "Null (or omitted) means this target uses the shared body."
                    },
                    "options": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "Per-platform settings, validated by that platform: X `who_can_reply`, LinkedIn `as_carousel`, Instagram `post_type`/`collaborators`, Facebook `link`/`post_type`, TikTok `privacy_level` and the toggles."
                    }
                },
                "required": [
                    "platform"
                ]
            },
            "CustomerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "minLength": 1
                    },
                    "phone": {
                        "type": "string"
                    }
                },
                "required": [
                    "email"
                ]
            },
            "EntitlementEnum": {
                "enum": [
                    "included",
                    "upgrade_required"
                ],
                "type": "string",
                "description": "* `included` - included\n* `upgrade_required` - upgrade_required"
            },
            "Error": {
                "type": "object",
                "description": "The canonical ``/api/v1`` error envelope.",
                "properties": {
                    "error": {
                        "$ref": "#/components/schemas/ErrorDetail"
                    },
                    "code": {
                        "type": "string",
                        "description": "Same as error.code (flat alias)."
                    },
                    "detail": {
                        "type": "string",
                        "description": "Same as error.message (flat alias)."
                    }
                },
                "required": [
                    "code",
                    "detail",
                    "error"
                ]
            },
            "ErrorDetail": {
                "type": "object",
                "properties": {
                    "code": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ErrorCode"
                            }
                        ],
                        "description": "Stable machine-readable error code."
                    },
                    "message": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "request_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "retryable": {
                        "type": "boolean"
                    },
                    "field_errors": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true
                    },
                    "details": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "docs_url": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "required": [
                    "code",
                    "docs_url",
                    "message",
                    "request_id",
                    "retryable",
                    "status"
                ]
            },
            "FormatEnum": {
                "enum": [
                    "single",
                    "carousel"
                ],
                "type": "string",
                "description": "* `single` - single\n* `carousel` - carousel"
            },
            "InstagramAnalytics": {
                "type": "object",
                "properties": {
                    "range": {
                        "type": "string"
                    },
                    "start": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "end": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "metrics": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "`{metric: {value, source, tracked}}` — `tracked: false` means we do not measure it yet."
                    },
                    "series": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "automations": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "has_data": {
                        "type": "boolean"
                    },
                    "definitions": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                },
                "required": [
                    "automations",
                    "definitions",
                    "end",
                    "has_data",
                    "metrics",
                    "range",
                    "series",
                    "start"
                ]
            },
            "InstagramConnectResult": {
                "type": "object",
                "properties": {
                    "authorize_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Open this in a browser. Single-use; mint a new one per attempt."
                    },
                    "state": {
                        "type": "string",
                        "description": "The signed CSRF value inside the URL."
                    }
                },
                "required": [
                    "authorize_url",
                    "state"
                ]
            },
            "InstagramConnection": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "handle": {
                        "type": "string"
                    },
                    "profile_picture_url": {
                        "type": "string"
                    },
                    "account_type": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/InstagramConnectionStatusEnum"
                    },
                    "paused": {
                        "type": "boolean"
                    },
                    "permissions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "The permissions Meta actually granted. Never what we asked for."
                    },
                    "can_publish_content": {
                        "type": "boolean",
                        "description": "Whether this connection may publish to Instagram. False until Meta approves content publishing for this account."
                    },
                    "token_expires_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "permission_state": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PermissionStateEnum"
                            }
                        ],
                        "description": "`complete`: every permission an automation needs was granted. `partial`: the creator declined one — see `needs_reconnect`. `unknown`: connected before the grant was recorded.\n\n* `complete` - complete\n* `partial` - partial\n* `unknown` - unknown"
                    },
                    "needs_reconnect": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/NeedsReconnect"
                            }
                        ],
                        "nullable": true,
                        "description": "Null unless the creator has to reconnect. Never invent a reason."
                    }
                },
                "required": [
                    "account_type",
                    "can_publish_content",
                    "handle",
                    "id",
                    "needs_reconnect",
                    "paused",
                    "permission_state",
                    "permissions",
                    "profile_picture_url",
                    "status",
                    "token_expires_at"
                ]
            },
            "InstagramConnectionStatusEnum": {
                "enum": [
                    "connected",
                    "degraded",
                    "revoked",
                    "disconnected"
                ],
                "type": "string",
                "description": "* `connected` - connected\n* `degraded` - degraded\n* `revoked` - revoked\n* `disconnected` - disconnected"
            },
            "InstagramStatus": {
                "type": "object",
                "properties": {
                    "connected": {
                        "type": "boolean"
                    },
                    "connect_available": {
                        "type": "boolean",
                        "description": "False when this deployment has no Instagram app configured."
                    },
                    "publish_available_here": {
                        "type": "boolean"
                    },
                    "connections": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/InstagramConnection"
                        }
                    }
                },
                "required": [
                    "connect_available",
                    "connected",
                    "connections",
                    "publish_available_here"
                ]
            },
            "Link": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "code": {
                        "type": "string"
                    },
                    "target_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "short_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "click_count": {
                        "type": "integer"
                    },
                    "unique_visitor_count": {
                        "type": "integer"
                    },
                    "last_clicked_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "click_count",
                    "code",
                    "created_at",
                    "id",
                    "last_clicked_at",
                    "short_url",
                    "target_url",
                    "unique_visitor_count"
                ]
            },
            "LinkCreateRequest": {
                "type": "object",
                "properties": {
                    "target_url": {
                        "type": "string",
                        "format": "uri",
                        "minLength": 1,
                        "description": "The https:// destination the short link redirects to."
                    }
                },
                "required": [
                    "target_url"
                ]
            },
            "LinkEnvelope": {
                "type": "object",
                "properties": {
                    "link": {
                        "$ref": "#/components/schemas/Link"
                    }
                },
                "required": [
                    "link"
                ]
            },
            "LinkList": {
                "type": "object",
                "properties": {
                    "links": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Link"
                        }
                    }
                },
                "required": [
                    "links"
                ]
            },
            "Me": {
                "type": "object",
                "description": "Who this credential is, where it acts, and what it may do.",
                "properties": {
                    "user": {
                        "$ref": "#/components/schemas/MeUser"
                    },
                    "workspace": {
                        "$ref": "#/components/schemas/Workspace"
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ScopesEnum"
                        },
                        "description": "Granted scopes. Empty for a first-party JWT caller."
                    },
                    "credential": {
                        "$ref": "#/components/schemas/MeCredential"
                    }
                },
                "required": [
                    "credential",
                    "scopes",
                    "user",
                    "workspace"
                ]
            },
            "MeApp": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "client_id": {
                        "type": "string"
                    }
                },
                "required": [
                    "client_id",
                    "name"
                ]
            },
            "MeCredential": {
                "type": "object",
                "properties": {
                    "kind": {
                        "$ref": "#/components/schemas/MeCredentialKindEnum"
                    },
                    "app": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/MeApp"
                            }
                        ],
                        "nullable": true
                    }
                },
                "required": [
                    "app",
                    "kind"
                ]
            },
            "MeCredentialKindEnum": {
                "enum": [
                    "oauth",
                    "api_key",
                    "jwt"
                ],
                "type": "string",
                "description": "* `oauth` - oauth\n* `api_key` - api_key\n* `jwt` - jwt"
            },
            "MeUser": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "required": [
                    "email",
                    "id",
                    "name"
                ]
            },
            "MediaRefKindEnum": {
                "enum": [
                    "image",
                    "video"
                ],
                "type": "string",
                "description": "* `image` - image\n* `video` - video"
            },
            "MediaRefRequest": {
                "type": "object",
                "properties": {
                    "asset_id": {
                        "type": "string",
                        "minLength": 1,
                        "description": "From the media library (`POST /api/media/uploads/{id}/finalize/`)."
                    },
                    "kind": {
                        "$ref": "#/components/schemas/MediaRefKindEnum"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "storage_key": {
                        "type": "string"
                    },
                    "cover_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true
                    },
                    "alt_text": {
                        "type": "string",
                        "maxLength": 1000
                    },
                    "width": {
                        "type": "integer",
                        "nullable": true
                    },
                    "height": {
                        "type": "integer",
                        "nullable": true
                    },
                    "duration": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    }
                },
                "required": [
                    "asset_id",
                    "kind"
                ]
            },
            "Mode46aEnum": {
                "enum": [
                    "compose"
                ],
                "type": "string",
                "description": "* `compose` - compose"
            },
            "Money": {
                "type": "object",
                "description": "Minor units and a lowercase ISO currency, as Stripe's guide shows it.",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "description": "Minor units, e.g. 4500 = $45.00."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Lowercase ISO 4217, e.g. \"usd\"."
                    }
                },
                "required": [
                    "amount",
                    "currency"
                ]
            },
            "NeedsReconnect": {
                "type": "object",
                "properties": {
                    "reason": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ReasonEnum"
                            }
                        ],
                        "description": "Why the creator has to reconnect. `permission_missing`: they completed Instagram login having declined a permission every automation needs; the token works for basic reads only.\n\n* `permission_missing` - permission_missing"
                    },
                    "message": {
                        "type": "string",
                        "description": "The sentence to show the creator, verbatim."
                    },
                    "missing_permissions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "reconnect_url": {
                        "type": "string",
                        "description": "Where the creator reconnects, inside the VKit app."
                    }
                },
                "required": [
                    "message",
                    "missing_permissions",
                    "reason",
                    "reconnect_url"
                ]
            },
            "Offer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "price_type": {
                        "type": "string"
                    },
                    "price": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "interval": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "interval",
                    "price",
                    "price_type"
                ]
            },
            "Order": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/OrderStatusEnum"
                            }
                        ],
                        "description": "`processing` means the charge succeeded and the order record is still settling; poll `GET /orders/{id}`.\n\n* `paid` - paid\n* `processing` - processing\n* `declined` - declined\n* `pending` - pending"
                    },
                    "product": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "total": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "payment": {
                        "$ref": "#/components/schemas/BookingPayment"
                    },
                    "offer_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "order_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "The settled commerce order, once it exists."
                    }
                },
                "required": [
                    "id",
                    "offer_id",
                    "order_id",
                    "payment",
                    "product",
                    "quantity",
                    "status",
                    "total"
                ]
            },
            "OrderCreateRequest": {
                "type": "object",
                "properties": {
                    "product_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "offer_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "default": 1
                    },
                    "customer": {
                        "$ref": "#/components/schemas/CustomerRequest"
                    },
                    "payment_data": {
                        "$ref": "#/components/schemas/PaymentDataRequest"
                    }
                },
                "required": [
                    "customer",
                    "payment_data",
                    "product_id"
                ]
            },
            "OrderEnvelope": {
                "type": "object",
                "properties": {
                    "order": {
                        "$ref": "#/components/schemas/Order"
                    }
                },
                "required": [
                    "order"
                ]
            },
            "OrderStatusEnum": {
                "enum": [
                    "paid",
                    "processing",
                    "declined",
                    "pending"
                ],
                "type": "string",
                "description": "* `paid` - paid\n* `processing` - processing\n* `declined` - declined\n* `pending` - pending"
            },
            "Page": {
                "type": "object",
                "properties": {
                    "document": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "The canonical page document: `{theme: {key, tokens}, page: {slug, title, seo, blocks: [{type, stable_key, config}]}}`."
                    },
                    "state": {
                        "$ref": "#/components/schemas/PagePublishState"
                    },
                    "public_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Where the published page lives."
                    },
                    "public_path": {
                        "type": "string"
                    },
                    "validation": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "Blocking issues and notices. `issues` must be empty to publish."
                    }
                },
                "required": [
                    "document",
                    "public_path",
                    "public_url",
                    "state",
                    "validation"
                ]
            },
            "PageBuildRequestRequest": {
                "type": "object",
                "properties": {
                    "source": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The public profile to read. Today that is a Linktree handle or `https://linktr.ee/<handle>` URL — the one profile source this deployment can actually read. Anything else is refused rather than guessed at."
                    }
                },
                "required": [
                    "source"
                ]
            },
            "PageEnvelope": {
                "type": "object",
                "properties": {
                    "page": {
                        "$ref": "#/components/schemas/Page"
                    }
                },
                "required": [
                    "page"
                ]
            },
            "PageJob": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "$ref": "#/components/schemas/PageJobStatusEnum"
                    },
                    "source": {
                        "type": "string"
                    },
                    "error_code": {
                        "type": "string"
                    },
                    "error_detail": {
                        "type": "string"
                    },
                    "result": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "The builder's report: what it read and what it left out."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "finished_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    }
                },
                "required": [
                    "created_at",
                    "error_code",
                    "error_detail",
                    "finished_at",
                    "id",
                    "result",
                    "source",
                    "status"
                ]
            },
            "PageJobEnvelope": {
                "type": "object",
                "properties": {
                    "job": {
                        "$ref": "#/components/schemas/PageJob"
                    }
                },
                "required": [
                    "job"
                ]
            },
            "PageJobStatusEnum": {
                "enum": [
                    "queued",
                    "running",
                    "succeeded",
                    "failed"
                ],
                "type": "string",
                "description": "* `queued` - queued\n* `running` - running\n* `succeeded` - succeeded\n* `failed` - failed"
            },
            "PagePublishState": {
                "type": "object",
                "properties": {
                    "status": {
                        "$ref": "#/components/schemas/PagePublishStateStatusEnum"
                    },
                    "revision": {
                        "type": "integer",
                        "description": "Optimistic-concurrency counter."
                    },
                    "etag": {
                        "type": "string",
                        "description": "Pass back as `If-Match` to make a write conditional."
                    },
                    "published_revision_no": {
                        "type": "integer",
                        "nullable": true
                    },
                    "published_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "draft_matches_published": {
                        "type": "boolean"
                    },
                    "public_address_live": {
                        "type": "boolean",
                        "description": "Whether the public URL is serving a visitor RIGHT NOW."
                    }
                },
                "required": [
                    "draft_matches_published",
                    "etag",
                    "public_address_live",
                    "published_at",
                    "published_revision_no",
                    "revision",
                    "status"
                ]
            },
            "PagePublishStateStatusEnum": {
                "enum": [
                    "draft",
                    "live"
                ],
                "type": "string",
                "description": "* `draft` - draft\n* `live` - live"
            },
            "PagePutRequest": {
                "type": "object",
                "properties": {
                    "document": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "The complete replacement document."
                    },
                    "if_match": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Optional. The `etag` from a previous read; refuses on conflict."
                    }
                },
                "required": [
                    "document"
                ]
            },
            "PatchedBookingRescheduleRequest": {
                "type": "object",
                "properties": {
                    "slot_id": {
                        "type": "string",
                        "minLength": 1
                    }
                }
            },
            "PatchedPagePatchRequest": {
                "type": "object",
                "properties": {
                    "theme": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "`{key, tokens}` — replaces the theme."
                    },
                    "title": {
                        "type": "string",
                        "minLength": 1
                    },
                    "seo": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "`{title, description}`."
                    },
                    "blocks": {
                        "$ref": "#/components/schemas/BlockOpsRequest"
                    },
                    "if_match": {
                        "type": "string",
                        "minLength": 1
                    }
                }
            },
            "PatchedPostTargetEditRequest": {
                "type": "object",
                "properties": {
                    "text": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The new text for the live post on that platform.",
                        "maxLength": 63206
                    }
                }
            },
            "PaymentDataRequest": {
                "type": "object",
                "description": "The agent's Shared Payment Token. Input only, and never persisted.",
                "properties": {
                    "token": {
                        "type": "string",
                        "minLength": 1,
                        "description": "A Stripe SPT, `spt_…`."
                    },
                    "provider": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ProviderEnum"
                            }
                        ],
                        "default": "stripe"
                    }
                },
                "required": [
                    "token"
                ]
            },
            "PermissionStateEnum": {
                "enum": [
                    "complete",
                    "partial",
                    "unknown"
                ],
                "type": "string",
                "description": "* `complete` - complete\n* `partial` - partial\n* `unknown` - unknown"
            },
            "PostBodyRequest": {
                "type": "object",
                "description": "The editor document. Give `text` (plain prose) or `html` (Tiptap).",
                "properties": {
                    "text": {
                        "type": "string",
                        "description": "Plain text. Paragraphs are blank-line separated. Escaped into `html` for you.",
                        "maxLength": 63206
                    },
                    "html": {
                        "type": "string",
                        "description": "The editor HTML, when you have it. Wins over `text`.",
                        "maxLength": 200000
                    },
                    "media": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MediaRefRequest"
                        }
                    }
                }
            },
            "PostComposeRequest": {
                "type": "object",
                "description": "``POST /v1/posts`` with ``mode: 'compose'`` — a post the creator wrote.",
                "properties": {
                    "mode": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Mode46aEnum"
                            }
                        ],
                        "description": "`compose`. Omit it (or send `generate`) for the brand-true generator.\n\n* `compose` - compose"
                    },
                    "publish_mode": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PublishModeEnum"
                            }
                        ],
                        "default": "draft",
                        "description": "`draft` saves without validating the targets (the default). `schedule` needs `scheduled_for`; `now` sends at once. Both need the `posts.schedule` scope as well as `posts.write`.\n\n* `draft` - draft\n* `schedule` - schedule\n* `now` - now"
                    },
                    "scheduled_for": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "ISO 8601, in the future. Required when `publish_mode` is `schedule`."
                    },
                    "timezone": {
                        "type": "string",
                        "default": "UTC",
                        "description": "IANA zone the time was chosen in. Snapshotted on the post.",
                        "maxLength": 64
                    },
                    "body": {
                        "$ref": "#/components/schemas/PostBodyRequest"
                    },
                    "thread": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ThreadItemRequest"
                        }
                    },
                    "targets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ComposeTargetRequest"
                        },
                        "description": "One entry per platform the post goes to. May be empty for a draft."
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                        }
                    }
                },
                "required": [
                    "body",
                    "mode",
                    "targets"
                ]
            },
            "PostCreateModeEnum": {
                "enum": [
                    "generate"
                ],
                "type": "string",
                "description": "* `generate` - generate"
            },
            "PostCreateRequest": {
                "type": "object",
                "properties": {
                    "mode": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PostCreateModeEnum"
                            }
                        ],
                        "default": "generate",
                        "description": "`generate` (the default). Send `compose` for a post the creator wrote.\n\n* `generate` - generate"
                    },
                    "idea": {
                        "type": "string",
                        "minLength": 1,
                        "description": "What the post is about, in the creator’s words.",
                        "maxLength": 2000
                    },
                    "format": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/FormatEnum"
                            }
                        ],
                        "default": "single"
                    },
                    "slides": {
                        "type": "integer",
                        "maximum": 8,
                        "minimum": 1,
                        "description": "Carousel length, 1–8. Ignored for `single`."
                    },
                    "image": {
                        "type": "boolean",
                        "default": true,
                        "description": "False generates the caption only and saves nothing — a Studio post always carries imagery, so there is no post to save."
                    },
                    "model": {
                        "type": "string",
                        "description": "An id from `GET /v1/posts/models`. Defaults to the catalog default."
                    },
                    "size": {
                        "type": "string"
                    },
                    "caption": {
                        "type": "string",
                        "description": "Supply your own and the caption step is skipped (and not charged).",
                        "maxLength": 2200
                    }
                },
                "required": [
                    "idea"
                ]
            },
            "PostCreateRequestRequest": {
                "oneOf": [
                    {
                        "$ref": "#/components/schemas/PostCreateRequest"
                    },
                    {
                        "$ref": "#/components/schemas/PostComposeRequest"
                    }
                ],
                "discriminator": {
                    "propertyName": "mode",
                    "mapping": {
                        "generate": "#/components/schemas/PostCreateRequest",
                        "compose": "#/components/schemas/PostComposeRequest"
                    }
                }
            },
            "PostCreateResponse": {
                "oneOf": [
                    {
                        "$ref": "#/components/schemas/PostCreateResult"
                    },
                    {
                        "$ref": "#/components/schemas/PostEnvelope"
                    }
                ]
            },
            "PostCreateResult": {
                "type": "object",
                "properties": {
                    "post": {
                        "type": "object",
                        "additionalProperties": {},
                        "nullable": true,
                        "description": "The saved Studio post. Null when `image` was false."
                    },
                    "captions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Every caption option generated, best first."
                    },
                    "plan": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "The art-director pass: concept, visual system, slides."
                    },
                    "credits": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "`{spent, balance}` for this call."
                    }
                },
                "required": [
                    "captions",
                    "credits",
                    "plan",
                    "post"
                ]
            },
            "PostEnvelope": {
                "type": "object",
                "properties": {
                    "post": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                },
                "required": [
                    "post"
                ]
            },
            "PostList": {
                "type": "object",
                "properties": {
                    "posts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        }
                    },
                    "count": {
                        "type": "integer"
                    },
                    "limit": {
                        "type": "integer"
                    },
                    "offset": {
                        "type": "integer"
                    },
                    "has_more": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "count",
                    "has_more",
                    "limit",
                    "offset",
                    "posts"
                ]
            },
            "PostModel": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Opaque engine token — pass it back as `model` when creating a post. Treat it as a cursor, not a name: it is not stable across catalog changes and is not the engine a creator is shown."
                    },
                    "name": {
                        "type": "string",
                        "description": "Product label for the engine, safe to show a creator."
                    },
                    "credits": {
                        "type": "integer",
                        "description": "Credits one image costs."
                    },
                    "reference_credits": {
                        "type": "integer"
                    },
                    "max_reference_images": {
                        "type": "integer"
                    },
                    "default": {
                        "type": "boolean"
                    },
                    "label": {
                        "type": "string"
                    },
                    "speed_label": {
                        "type": "string"
                    },
                    "best_for": {
                        "type": "string"
                    },
                    "tier": {
                        "type": "string"
                    }
                },
                "required": [
                    "credits",
                    "default",
                    "id",
                    "name"
                ]
            },
            "PostModelCatalog": {
                "type": "object",
                "properties": {
                    "models": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PostModel"
                        }
                    },
                    "default_model": {
                        "type": "string"
                    },
                    "costs": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer"
                        },
                        "description": "Credits for the non-image steps: `plan`, `captions`."
                    },
                    "balance": {
                        "type": "integer",
                        "description": "Credits left this period."
                    },
                    "catalog_version": {
                        "type": "integer"
                    }
                },
                "required": [
                    "balance",
                    "catalog_version",
                    "costs",
                    "default_model",
                    "models"
                ]
            },
            "PostPublishNowRequest": {
                "type": "object",
                "properties": {
                    "republish": {
                        "type": "boolean",
                        "default": false,
                        "description": "Send a post that has already gone out, again, on purpose."
                    }
                }
            },
            "PostScheduleRequest": {
                "type": "object",
                "properties": {
                    "scheduled_for": {
                        "type": "string",
                        "format": "date-time",
                        "description": "ISO 8601. Must be in the future."
                    },
                    "timezone": {
                        "type": "string",
                        "description": "IANA zone the time was chosen in, e.g. `America/Toronto`. Composed posts only.",
                        "maxLength": 64
                    },
                    "republish": {
                        "type": "boolean",
                        "default": false,
                        "description": "A composed post that has already gone out answers `409 already_published`; pass true to schedule it again on purpose."
                    },
                    "targets": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {}
                        },
                        "description": "Studio posts only — one entry per platform: `{platform, connection?}`. Each is routed to publish or to a reminder depending on what that account can actually do — see `GET /v1/posts/targets`. A composed post already carries its targets."
                    }
                },
                "required": [
                    "scheduled_for"
                ]
            },
            "PostTarget": {
                "type": "object",
                "properties": {
                    "platform": {
                        "type": "string"
                    },
                    "label": {
                        "type": "string"
                    },
                    "state": {
                        "$ref": "#/components/schemas/StateEnum"
                    },
                    "can_publish": {
                        "type": "boolean",
                        "description": "False means VKit can only remind the creator to post it by hand."
                    },
                    "reason": {
                        "type": "string",
                        "description": "Why `can_publish` is false, when it is: `not_configured`, `awaiting_approval` (the platform is awaiting its posting review here) or `publish_permission_missing`."
                    },
                    "note": {
                        "type": "string",
                        "description": "A sentence to show beside the state, when the platform has one: \"Awaiting Meta approval for Facebook publishing.\", or what TikTok posts look like before its audit. Empty otherwise."
                    },
                    "handles": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "can_publish",
                    "handles",
                    "label",
                    "note",
                    "platform",
                    "reason",
                    "state"
                ]
            },
            "PostTargetList": {
                "type": "object",
                "properties": {
                    "targets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PostTarget"
                        }
                    }
                },
                "required": [
                    "targets"
                ]
            },
            "PostValidateRequest": {
                "type": "object",
                "description": "``POST /v1/posts/validate`` — the same body; nothing is saved.",
                "properties": {
                    "mode": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Mode46aEnum"
                            }
                        ],
                        "default": "compose"
                    },
                    "publish_mode": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PublishModeEnum"
                            }
                        ],
                        "default": "draft",
                        "description": "`draft` saves without validating the targets (the default). `schedule` needs `scheduled_for`; `now` sends at once. Both need the `posts.schedule` scope as well as `posts.write`.\n\n* `draft` - draft\n* `schedule` - schedule\n* `now` - now"
                    },
                    "scheduled_for": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "ISO 8601, in the future. Required when `publish_mode` is `schedule`."
                    },
                    "timezone": {
                        "type": "string",
                        "default": "UTC",
                        "description": "IANA zone the time was chosen in. Snapshotted on the post.",
                        "maxLength": 64
                    },
                    "body": {
                        "$ref": "#/components/schemas/PostBodyRequest"
                    },
                    "thread": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ThreadItemRequest"
                        }
                    },
                    "targets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ComposeTargetRequest"
                        },
                        "description": "One entry per platform the post goes to. May be empty for a draft."
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                        }
                    }
                },
                "required": [
                    "body",
                    "targets"
                ]
            },
            "Product": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "published_at": {
                        "type": "string",
                        "nullable": true
                    },
                    "offers": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Offer"
                        }
                    }
                },
                "required": [
                    "id",
                    "offers",
                    "published_at",
                    "slug",
                    "title",
                    "type"
                ]
            },
            "ProductList": {
                "type": "object",
                "properties": {
                    "creator": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "products": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Product"
                        }
                    },
                    "payment": {
                        "$ref": "#/components/schemas/ServicePayment"
                    }
                },
                "required": [
                    "creator",
                    "payment",
                    "products"
                ]
            },
            "ProviderEnum": {
                "enum": [
                    "stripe"
                ],
                "type": "string",
                "description": "* `stripe` - stripe"
            },
            "PublishModeEnum": {
                "enum": [
                    "draft",
                    "schedule",
                    "now"
                ],
                "type": "string",
                "description": "* `draft` - draft\n* `schedule` - schedule\n* `now` - now"
            },
            "ReasonEnum": {
                "enum": [
                    "permission_missing"
                ],
                "type": "string",
                "description": "* `permission_missing` - permission_missing"
            },
            "RefundEnum": {
                "enum": [
                    "refunded",
                    "not_refunded",
                    "no_payment",
                    "refund_failed"
                ],
                "type": "string",
                "description": "* `refunded` - refunded\n* `not_refunded` - not_refunded\n* `no_payment` - no_payment\n* `refund_failed` - refund_failed"
            },
            "ScopesEnum": {
                "enum": [
                    "profile.read",
                    "links.write",
                    "page.write",
                    "instagram.connect",
                    "automations.write",
                    "posts.write",
                    "posts.schedule",
                    "analytics.read",
                    "community.manage",
                    "broadcasts.write",
                    "commerce.book"
                ],
                "type": "string",
                "description": "* `profile.read` - profile.read\n* `links.write` - links.write\n* `page.write` - page.write\n* `instagram.connect` - instagram.connect\n* `automations.write` - automations.write\n* `posts.write` - posts.write\n* `posts.schedule` - posts.schedule\n* `analytics.read` - analytics.read\n* `community.manage` - community.manage\n* `broadcasts.write` - broadcasts.write\n* `commerce.book` - commerce.book"
            },
            "Service": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "duration_minutes": {
                        "type": "integer"
                    },
                    "price": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "free": {
                        "type": "boolean"
                    },
                    "location": {
                        "$ref": "#/components/schemas/ServiceLocation"
                    },
                    "buffer": {
                        "$ref": "#/components/schemas/ServiceBuffer"
                    },
                    "timezone": {
                        "type": "string"
                    },
                    "min_notice_minutes": {
                        "type": "integer"
                    },
                    "max_days_ahead": {
                        "type": "integer"
                    },
                    "requires_approval": {
                        "type": "boolean"
                    },
                    "cancellation_hours": {
                        "type": "integer"
                    }
                },
                "required": [
                    "buffer",
                    "cancellation_hours",
                    "description",
                    "duration_minutes",
                    "free",
                    "id",
                    "location",
                    "max_days_ahead",
                    "min_notice_minutes",
                    "name",
                    "price",
                    "requires_approval",
                    "timezone"
                ]
            },
            "ServiceBuffer": {
                "type": "object",
                "properties": {
                    "before_minutes": {
                        "type": "integer"
                    },
                    "after_minutes": {
                        "type": "integer"
                    }
                },
                "required": [
                    "after_minutes",
                    "before_minutes"
                ]
            },
            "ServiceList": {
                "type": "object",
                "properties": {
                    "creator": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "services": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Service"
                        }
                    },
                    "payment": {
                        "$ref": "#/components/schemas/ServicePayment"
                    }
                },
                "required": [
                    "creator",
                    "payment",
                    "services"
                ]
            },
            "ServiceLocation": {
                "type": "object",
                "properties": {
                    "kind": {
                        "$ref": "#/components/schemas/ServiceLocationKindEnum"
                    },
                    "online": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "kind",
                    "online"
                ]
            },
            "ServiceLocationKindEnum": {
                "enum": [
                    "video",
                    "phone",
                    "in_person"
                ],
                "type": "string",
                "description": "* `video` - video\n* `phone` - phone\n* `in_person` - in_person"
            },
            "ServicePayment": {
                "type": "object",
                "description": "How — and whether — an agent can pay this creator.",
                "properties": {
                    "provider": {
                        "type": "string",
                        "default": "stripe"
                    },
                    "status": {
                        "$ref": "#/components/schemas/ServicePaymentStatusEnum"
                    },
                    "reason": {
                        "type": "string",
                        "nullable": true,
                        "description": "`creator_payments_not_ready`, `unsupported_country` or `network_profile_unavailable` when status is `unavailable`."
                    },
                    "network_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "The creator’s Stripe profile id. Pass it as `seller_details[network_business_profile]` when issuing the SPT."
                    },
                    "currency": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "countries_ok": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "countries_ok",
                    "currency",
                    "network_id",
                    "reason",
                    "status"
                ]
            },
            "ServicePaymentStatusEnum": {
                "enum": [
                    "available",
                    "unavailable"
                ],
                "type": "string",
                "description": "* `available` - available\n* `unavailable` - unavailable"
            },
            "Slot": {
                "type": "object",
                "properties": {
                    "slot_id": {
                        "type": "string",
                        "description": "Stable for the whole lifecycle."
                    },
                    "start_time": {
                        "type": "string"
                    },
                    "end_time": {
                        "type": "string"
                    },
                    "price": {
                        "$ref": "#/components/schemas/Money"
                    }
                },
                "required": [
                    "end_time",
                    "price",
                    "slot_id",
                    "start_time"
                ]
            },
            "StateEnum": {
                "enum": [
                    "connected",
                    "needs_connection",
                    "not_available"
                ],
                "type": "string",
                "description": "* `connected` - connected\n* `needs_connection` - needs_connection\n* `not_available` - not_available"
            },
            "TargetOverrideRequest": {
                "type": "object",
                "description": "Per-platform text/media/thread that replaces the shared body on that target only.",
                "properties": {
                    "text": {
                        "type": "string",
                        "maxLength": 63206
                    },
                    "html": {
                        "type": "string",
                        "maxLength": 200000
                    },
                    "media": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MediaRefRequest"
                        }
                    },
                    "thread": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ThreadItemRequest"
                        }
                    }
                }
            },
            "TargetValidation": {
                "type": "object",
                "properties": {
                    "platform": {
                        "type": "string"
                    },
                    "connection": {
                        "type": "string",
                        "nullable": true
                    },
                    "ok": {
                        "type": "boolean"
                    },
                    "errors": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ValidationError"
                        }
                    },
                    "limit": {
                        "type": "integer",
                        "nullable": true,
                        "description": "The platform's character limit."
                    },
                    "used": {
                        "type": "integer",
                        "nullable": true,
                        "description": "Characters this target would send."
                    }
                },
                "required": [
                    "errors",
                    "ok",
                    "platform"
                ]
            },
            "ThreadItemRequest": {
                "type": "object",
                "description": "One follow-up: a reply on X/Threads, a first comment on LinkedIn/Instagram/Facebook.",
                "properties": {
                    "text": {
                        "type": "string",
                        "maxLength": 63206
                    },
                    "html": {
                        "type": "string",
                        "maxLength": 200000
                    },
                    "media": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MediaRefRequest"
                        }
                    },
                    "delay_minutes": {
                        "type": "integer",
                        "maximum": 1440,
                        "minimum": 0,
                        "default": 0,
                        "description": "Minutes after the root (or the previous item) before this one goes."
                    }
                }
            },
            "UpgradeFeature": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string"
                    },
                    "label": {
                        "type": "string"
                    },
                    "entitlement": {
                        "$ref": "#/components/schemas/EntitlementEnum"
                    }
                },
                "required": [
                    "entitlement",
                    "key",
                    "label"
                ]
            },
            "UpgradeLink": {
                "type": "object",
                "description": "`GET /v1/upgrade` — the plan, the link, the price, the gates.",
                "properties": {
                    "plan": {
                        "type": "string",
                        "description": "The workspace’s current plan key."
                    },
                    "paid": {
                        "type": "boolean",
                        "description": "True on any paid plan."
                    },
                    "upgrade_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "The plan chooser; `null` when already paid."
                    },
                    "price": {
                        "$ref": "#/components/schemas/UpgradePrice"
                    },
                    "features": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UpgradeFeature"
                        }
                    }
                },
                "required": [
                    "features",
                    "paid",
                    "plan",
                    "price",
                    "upgrade_url"
                ]
            },
            "UpgradePrice": {
                "type": "object",
                "properties": {
                    "monthly": {
                        "type": "string",
                        "description": "e.g. `$19`."
                    },
                    "annual": {
                        "type": "string",
                        "description": "e.g. `$190`."
                    },
                    "first_month": {
                        "type": "string",
                        "description": "The intro price of the first month, e.g. `$4.99`."
                    }
                },
                "required": [
                    "annual",
                    "first_month",
                    "monthly"
                ]
            },
            "ValidationError": {
                "type": "object",
                "properties": {
                    "code": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ValidationCode"
                            }
                        ]
                    },
                    "message": {
                        "type": "string"
                    },
                    "fix": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ValidationFix"
                            }
                        ],
                        "nullable": true
                    }
                },
                "required": [
                    "code",
                    "message"
                ]
            },
            "ValidationFix": {
                "type": "object",
                "properties": {
                    "action": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/FixAction"
                            }
                        ]
                    },
                    "n": {
                        "type": "integer",
                        "description": "For `shorten`: characters over."
                    },
                    "href": {
                        "type": "string",
                        "format": "uri",
                        "description": "For `connect`: where the creator reconnects."
                    }
                },
                "required": [
                    "action"
                ]
            },
            "ValidationResult": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "description": "True when every target passed."
                    },
                    "targets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TargetValidation"
                        }
                    }
                },
                "required": [
                    "ok",
                    "targets"
                ]
            },
            "Workspace": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "handle": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "string",
                        "description": "`free`, `pro`, or a grandfathered paid key. Every non-`free` plan is paid."
                    },
                    "status": {
                        "type": "string"
                    },
                    "upgrade_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "Where the creator upgrades to Pro — set while the workspace is on Free, `null` once it is paid. Re-read `/v1/me` after a `402 plan_required` to learn the creator upgraded."
                    }
                },
                "required": [
                    "handle",
                    "id",
                    "name",
                    "plan",
                    "status",
                    "upgrade_url"
                ]
            },
            "ErrorCode": {
                "type": "string",
                "title": "ErrorCode",
                "description": "Every `error.code` this API emits on purpose. Branch on this, never on the English in `error.message`. A code you do not recognise came from a layer behind the API and should be treated as its HTTP status says.",
                "enum": [
                    "validation_error",
                    "idempotency_key_invalid",
                    "invalid_token",
                    "insufficient_scope",
                    "forbidden",
                    "not_found",
                    "method_not_allowed",
                    "not_acceptable",
                    "conflict",
                    "idempotency_key_reused",
                    "idempotency_in_progress",
                    "unsupported_media_type",
                    "rate_limited",
                    "upstream_error",
                    "temporarily_unavailable",
                    "unsupported_source",
                    "brand_not_analyzed",
                    "credits_exhausted",
                    "plan_required",
                    "lifecycle_conflict",
                    "permission_missing",
                    "not_cancellable",
                    "target_not_supported",
                    "target_not_live",
                    "target_command_failed",
                    "validation_failed",
                    "already_published",
                    "agent_bookings_disabled",
                    "creator_not_found",
                    "service_not_found",
                    "product_not_found",
                    "booking_not_found",
                    "order_not_found",
                    "payment_required",
                    "payment_declined",
                    "slot_unavailable",
                    "booking_closed",
                    "unsupported_country",
                    "unsupported_offer",
                    "payment_unavailable",
                    "payment_provider_unavailable"
                ]
            },
            "ValidationCode": {
                "type": "string",
                "title": "ValidationCode",
                "description": "Why one target cannot take a post. Closed list; every error carries a `fix` the caller can act on. The limits behind `too_long`, `image_too_large`, `video_too_long` and friends are the platform adapters' own, never hardcoded here.",
                "enum": [
                    "empty",
                    "too_long",
                    "needs_connection",
                    "awaiting_approval",
                    "permission_missing",
                    "requires_media",
                    "too_many_media",
                    "video_not_supported",
                    "mixed_media",
                    "image_too_large",
                    "video_too_long",
                    "video_too_short",
                    "bad_aspect",
                    "carousel_out_of_range",
                    "options_invalid",
                    "thread_not_supported",
                    "thread_media_not_supported",
                    "quota_exceeded"
                ]
            },
            "FixAction": {
                "type": "string",
                "title": "FixAction",
                "description": "What would fix a validation error: `shorten` (by `n` characters), `add_media`, `remove_video`, `connect` (at `href`), `pick_page`, `fix_options`.",
                "enum": [
                    "connect",
                    "add_media",
                    "remove_video",
                    "shorten",
                    "pick_page",
                    "fix_options"
                ]
            },
            "OAuthClientMetadata": {
                "type": "object",
                "title": "OAuthClientMetadata",
                "description": "RFC 7591 client metadata as VKit accepts it. Every dynamically registered client is a PUBLIC PKCE client: `token_endpoint_auth_method` is `none` and no secret is ever issued.",
                "required": [
                    "client_name",
                    "redirect_uris"
                ],
                "properties": {
                    "client_name": {
                        "type": "string",
                        "maxLength": 80,
                        "description": "Shown to the creator on the consent screen. No URLs or domain names."
                    },
                    "redirect_uris": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 10,
                        "items": {
                            "type": "string",
                            "format": "uri"
                        },
                        "description": "Absolute `https://` URIs to a named host: no IP, no localhost, no fragment, no wildcard. The one exception is the RFC 8252 loopback for native apps, `http://127.0.0.1:<port>/…` or `http://localhost:<port>/…`, matched with any port at authorize time."
                    },
                    "grant_types": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "authorization_code",
                                "refresh_token"
                            ]
                        },
                        "default": [
                            "authorization_code",
                            "refresh_token"
                        ]
                    },
                    "response_types": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "code"
                            ]
                        },
                        "default": [
                            "code"
                        ]
                    },
                    "token_endpoint_auth_method": {
                        "type": "string",
                        "enum": [
                            "none"
                        ],
                        "default": "none"
                    },
                    "scope": {
                        "type": "string",
                        "description": "Space-separated subset of the eleven scopes. Default: all eleven."
                    },
                    "client_uri": {
                        "type": "string",
                        "format": "uri",
                        "description": "https only."
                    },
                    "logo_uri": {
                        "type": "string",
                        "format": "uri",
                        "description": "https only; shown on the consent screen if it loads."
                    },
                    "policy_uri": {
                        "type": "string",
                        "format": "uri",
                        "description": "https only."
                    },
                    "tos_uri": {
                        "type": "string",
                        "format": "uri",
                        "description": "https only."
                    },
                    "contacts": {
                        "type": "array",
                        "maxItems": 10,
                        "items": {
                            "type": "string"
                        }
                    },
                    "software_id": {
                        "type": "string",
                        "maxLength": 128
                    },
                    "software_version": {
                        "type": "string",
                        "maxLength": 64
                    }
                }
            },
            "OAuthClientRegistration": {
                "title": "OAuthClientRegistration",
                "description": "RFC 7591 §3.2.1 / RFC 7592 §3: the accepted metadata plus the issued identifiers.",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/OAuthClientMetadata"
                    },
                    {
                        "type": "object",
                        "required": [
                            "client_id",
                            "client_id_issued_at",
                            "registration_client_uri"
                        ],
                        "properties": {
                            "client_id": {
                                "type": "string",
                                "description": "`vkc_…`. Public; goes in every authorize URL."
                            },
                            "client_id_issued_at": {
                                "type": "integer",
                                "description": "Unix seconds."
                            },
                            "registration_access_token": {
                                "type": "string",
                                "description": "`vkg_…`. Bearer for the management endpoint ONLY — it never authenticates a `/v1` call. Store it; it is shown at registration and echoed on management reads, never recoverable otherwise."
                            },
                            "registration_client_uri": {
                                "type": "string",
                                "format": "uri"
                            }
                        }
                    }
                ]
            },
            "OAuthRegistrationError": {
                "type": "object",
                "title": "OAuthRegistrationError",
                "description": "RFC 7591 §3.2.2. NOT the `/v1` envelope: `error` is a string here, as on every OAuth endpoint.",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "string",
                        "enum": [
                            "invalid_redirect_uri",
                            "invalid_client_metadata",
                            "invalid_client",
                            "temporarily_unavailable"
                        ]
                    },
                    "error_description": {
                        "type": "string"
                    }
                }
            }
        },
        "securitySchemes": {
            "PlatformToken": {
                "type": "http",
                "scheme": "bearer",
                "description": "An OAuth 2.1 access token (`vkp_…`) or a workspace API key (`vka_…`), sent as `Authorization: Bearer <token>`."
            },
            "OAuth2": {
                "type": "oauth2",
                "flows": {
                    "authorizationCode": {
                        "authorizationUrl": "https://api.vkit.app/oauth/authorize",
                        "tokenUrl": "https://api.vkit.app/v1/oauth/token",
                        "refreshUrl": "https://api.vkit.app/v1/oauth/token",
                        "scopes": {
                            "profile.read": "Read your VKit account and workspace basics — your name, handle, plan and what your workspace can do.",
                            "links.write": "Create and list short links for your workspace, and read how many people clicked them.",
                            "page.write": "Read and change your Link in Bio page — its theme, blocks, links and socials — and publish it.",
                            "instagram.connect": "See whether your Instagram account is connected and start a connection for you. It can never post to Instagram with this alone.",
                            "automations.write": "Create, list, enable and disable your Instagram comment-to-DM automations.",
                            "posts.write": "Draft posts in your Studio — captions, carousels and cover images — using your workspace credits.",
                            "posts.schedule": "Put your posts on the calendar, move them and take them off again.",
                            "analytics.read": "Read your follower, reach and engagement summaries. Never your followers’ personal details.",
                            "community.manage": "Read and manage your community — members, updates, events and tiers.",
                            "broadcasts.write": "Announce an update to your community and your connected channels on your behalf.",
                            "commerce.book": "Look up your bookable services and products, hold a time, and take payment for it. Money settles to your own Stripe account, exactly as it does when somebody books you from your page."
                        }
                    }
                }
            },
            "RegistrationToken": {
                "type": "http",
                "scheme": "bearer",
                "description": "The `vkg_…` registration access token from `POST /oauth/register`."
            }
        }
    },
    "servers": [
        {
            "url": "https://api.vkit.app/v1",
            "description": "Production"
        }
    ],
    "externalDocs": {
        "url": "https://api.vkit.app/docs"
    },
    "security": [
        {
            "PlatformToken": []
        },
        {
            "OAuth2": [
                "profile.read",
                "links.write",
                "page.write",
                "instagram.connect",
                "automations.write",
                "posts.write",
                "posts.schedule",
                "analytics.read",
                "community.manage",
                "broadcasts.write",
                "commerce.book"
            ]
        }
    ],
    "tags": [
        {
            "name": "OAuth",
            "description": "Dynamic client registration (RFC 7591/7592). The rest of the authorization server — authorize, token, revoke, introspect — is described by `/.well-known/oauth-authorization-server` (RFC 8414) and in the guide."
        }
    ]
}