{
  "components": {
    "schemas": {
      "ActorView": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "person",
              "token"
            ],
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AppendBulkItems": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BulkItemInput"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array"
          },
          "seal": {
            "type": "boolean"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AppliedQuery": {
        "properties": {
          "query": {
            "$ref": "#/components/schemas/QueryDocument",
            "description": "the canonical document"
          },
          "query_hash": {
            "description": "`sha256:<hex>` of it",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AssetDetailView": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AssetView"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/AssetVersionView"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AssetMetadata": {
        "properties": {
          "alt": {
            "description": "absent leaves it; `null` or blank clears it",
            "maxLength": 300,
            "type": [
              "string",
              "null"
            ]
          },
          "credit": {
            "maxLength": 200,
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "description": "replaces the whole list",
            "items": {
              "pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "title": {
            "maxLength": 200,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AssetUploadView": {
        "properties": {
          "declared_type": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "state": {
            "enum": [
              "quarantined"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "AssetVersionView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "declared_type": {
            "type": "string"
          },
          "derivatives": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "detected_type": {
            "type": "string"
          },
          "height": {
            "type": "integer"
          },
          "seq": {
            "type": "integer"
          },
          "sha256": {
            "description": "the content digest the pinned URL names",
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AssetView": {
        "properties": {
          "alt": {
            "description": "the library's default alt text (D-179)",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credit": {
            "type": [
              "string",
              "null"
            ]
          },
          "declared_type": {
            "type": "string"
          },
          "derivatives": {
            "description": "the renditions the worker wrote",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "detected_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "file_name": {
            "type": "string"
          },
          "height": {
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "metadata_version": {
            "description": "a PATCH's `If-Match` names it as the `ETag` `\"v<n>\"`",
            "type": "integer"
          },
          "rejected_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "the current version's digest; `/media/v1/…/{asset}/{sha256}` pins it (D-136)",
            "type": [
              "string",
              "null"
            ]
          },
          "size_bytes": {
            "type": "integer"
          },
          "state": {
            "enum": [
              "quarantined",
              "usable",
              "rejected",
              "deleting",
              "deleted"
            ],
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AudienceOrigins": {
        "additionalProperties": false,
        "properties": {
          "origins": {
            "description": "scheme://host[:port] over http(s), no path; the only origins a magic link's `return_to` may name — none listed means no links",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "origins"
        ],
        "type": "object"
      },
      "AudienceRole": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "description": "what `role:<name>` visibility and a site user's `role` hold",
            "type": "string"
          },
          "self_assign": {
            "description": "whether public signup may choose it",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "self_assign",
          "created_at"
        ],
        "type": "object"
      },
      "AudienceRoleChange": {
        "additionalProperties": false,
        "properties": {
          "self_assign": {
            "type": "boolean"
          }
        },
        "required": [
          "self_assign"
        ],
        "type": "object"
      },
      "AudienceSession": {
        "properties": {
          "csrf": {
            "description": "the CSRF token — cookie-carried writes echo it in `X-CSRF-Token`",
            "type": "string"
          },
          "session": {
            "description": "the session token — `Authorization: Bearer` it, or let the `Set-Cookie` pair carry it",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/SiteUser"
          }
        },
        "required": [
          "user",
          "session",
          "csrf"
        ],
        "type": "object"
      },
      "AudienceSignIn": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "AudienceSignUp": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "description": "a name to show; optional",
            "type": "string"
          },
          "email": {
            "description": "the account's email — trimmed, lowered",
            "type": "string"
          },
          "password": {
            "description": "at least 8 characters",
            "type": "string"
          },
          "role": {
            "description": "an audience role open to signup; left out, the project's single open role is taken",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "AuthProviders": {
        "properties": {
          "sso": {
            "description": "an external identity provider is configured",
            "type": "boolean"
          }
        },
        "required": [
          "sso"
        ],
        "type": "object"
      },
      "BulkAppendView": {
        "properties": {
          "appended": {
            "type": "integer"
          },
          "duplicates": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "job": {
            "$ref": "#/components/schemas/BulkJobView"
          },
          "sealed": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BulkItemInput": {
        "additionalProperties": false,
        "properties": {
          "entry": {
            "format": "uuid",
            "type": "string"
          },
          "expected_revision": {
            "description": "the base revision the write is bound to",
            "format": "uuid",
            "type": "string"
          },
          "key": {
            "description": "the client's stable name for the item within the job (1–256 characters)",
            "type": "string"
          },
          "op": {
            "description": "`{\"op\": \"update\", \"content\": {…}}`, `{\"op\": \"set\", \"path\", \"value\"}`, `{\"op\": \"move\", \"from\", \"to\"}` or `{\"op\": \"delete\"}`",
            "type": "object"
          }
        },
        "required": [
          "key",
          "entry",
          "expected_revision",
          "op"
        ],
        "type": "object"
      },
      "BulkItemView": {
        "properties": {
          "applied_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "entry_id": {
            "format": "uuid",
            "type": "string"
          },
          "expected_revision_id": {
            "format": "uuid",
            "type": "string"
          },
          "input": {
            "type": "object"
          },
          "key": {
            "type": "string"
          },
          "new_revision_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "enum": [
              "pending",
              "applied",
              "conflict",
              "refused",
              "skipped"
            ],
            "type": "string"
          },
          "problem": {
            "description": "why the item didn't apply, as a refusal reports it",
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "BulkJobView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "description": "`sha256:<hex>` — the job's `ETag`",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "$ref": "#/components/schemas/ItemsCount"
          },
          "kind": {
            "enum": [
              "entries"
            ],
            "type": "string"
          },
          "operation": {
            "type": "object"
          },
          "principal": {
            "enum": [
              "member",
              "token"
            ],
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "enum": [
              "accepting",
              "running",
              "done",
              "blocked",
              "cancelled"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChangesetItemView": {
        "properties": {
          "collection": {
            "type": "string"
          },
          "content_hash": {
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "current_revision_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "edited": {
            "description": "the draft moved since it was pinned",
            "type": "boolean"
          },
          "entry_deleted": {
            "type": "boolean"
          },
          "entry_id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "published_revision_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "revision_id": {
            "format": "uuid",
            "type": "string"
          },
          "schema_version": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChangesetSummaryView": {
        "properties": {
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "type": "integer"
          },
          "rollback_generation": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/StatusView"
          },
          "submitted_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "submitted_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "unpublish": {
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChangesetView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "hash": {
            "description": "`sha256:<hex>` — its `ETag`, and what reviews bind",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ChangesetItemView"
            },
            "type": "array"
          },
          "reviews": {
            "items": {
              "$ref": "#/components/schemas/ReviewView"
            },
            "type": "array"
          },
          "rollback_generation": {
            "type": [
              "integer",
              "null"
            ]
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/StageStateView"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/StatusView"
          },
          "submitted_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "submitted_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CommentView": {
        "properties": {
          "author_id": {
            "format": "uuid",
            "type": "string"
          },
          "body": {
            "description": "verbatim; the client escapes it",
            "type": "string"
          },
          "collection": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "entry_id": {
            "format": "uuid",
            "type": "string"
          },
          "etag": {
            "description": "the `ETag` `If-Match` binds, as the header gives it",
            "type": "string"
          },
          "field": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "resolved_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "resolved_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "revision_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ComponentDefinition": {
        "description": "a shared component's definition: its `fields`, reused as `{\"type\": \"component\", \"component\": <slug>}` in content types",
        "type": "object"
      },
      "ComponentView": {
        "properties": {
          "content_types": {
            "description": "the types a change versioned along with it",
            "items": {
              "$ref": "#/components/schemas/TypeVersion"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/ComponentDefinition"
          },
          "definition_hash": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DeletedView": {
        "properties": {
          "collection": {
            "type": "string"
          },
          "deleted_at": {
            "format": "date-time",
            "type": "string"
          },
          "deleted_by": {
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "revision_id": {
            "description": "the tombstone's own revision",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeliveryQueryPage": {
        "properties": {
          "applied": {
            "$ref": "#/components/schemas/AppliedQuery"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/PublishedEntryView"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor",
          "applied"
        ],
        "type": "object"
      },
      "DeliveryView": {
        "properties": {
          "attempts": {
            "type": [
              "integer",
              "null"
            ]
          },
          "covered_by": {
            "type": [
              "integer",
              "null"
            ]
          },
          "destination_id": {
            "format": "uuid",
            "type": "string"
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "enum": [
              "webhook",
              "cdn",
              "probe"
            ],
            "type": "string"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "description": "a probe's pinned location",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "state": {
            "description": "`covered`: a later release's job succeeded, which covers this one (`covered_by`)",
            "enum": [
              "done",
              "covered",
              "pending",
              "failed"
            ],
            "type": "string"
          },
          "status": {
            "description": "its job for this very release, if it had one",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "destination_id",
          "name",
          "kind",
          "location",
          "state",
          "covered_by",
          "status",
          "attempts",
          "last_error",
          "finished_at"
        ],
        "type": "object"
      },
      "DestinationEnabled": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "DestinationView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeviceApprove": {
        "additionalProperties": false,
        "properties": {
          "user_code": {
            "type": "string"
          }
        },
        "required": [
          "user_code"
        ],
        "type": "object"
      },
      "DevicePending": {
        "properties": {
          "approved": {
            "type": "boolean"
          },
          "client_name": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DevicePoll": {
        "additionalProperties": false,
        "properties": {
          "device_secret": {
            "type": "string"
          }
        },
        "required": [
          "device_secret"
        ],
        "type": "object"
      },
      "DevicePolled": {
        "properties": {
          "access_token": {
            "description": "only once approved",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "approved"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "DeviceStart": {
        "additionalProperties": false,
        "properties": {
          "client_name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "client_name"
        ],
        "type": "object"
      },
      "DeviceStarted": {
        "properties": {
          "device_secret": {
            "description": "what `device/token` polls with",
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "interval": {
            "type": "integer"
          },
          "user_code": {
            "type": "string"
          },
          "verification_uri": {
            "type": "string"
          }
        },
        "required": [
          "device_secret",
          "user_code",
          "verification_uri",
          "interval",
          "expires_in"
        ],
        "type": "object"
      },
      "DraftView": {
        "properties": {
          "collection": {
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/EntryDocument"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "hidden_fields": {
            "description": "fields the role may not read; present only when some were hidden",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "localizations": {
            "items": {
              "$ref": "#/components/schemas/LocalizationView"
            },
            "type": "array"
          },
          "locked_fields": {
            "description": "fields the role may not write",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "published": {
            "$ref": "#/components/schemas/LiveView",
            "description": "the live revision and its generation; present when the read looked it up"
          },
          "referenced_by": {
            "description": "entries naming this one, in collections the role reads",
            "items": {
              "$ref": "#/components/schemas/ReferrerView"
            },
            "type": "array"
          },
          "revision": {
            "$ref": "#/components/schemas/RevisionView"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "EntryDocument": {
        "description": "the entry's content document, keyed by field name and validated against the collection's current definition; left-out fields get the type's defaults",
        "type": "object"
      },
      "EntryInTheWay": {
        "properties": {
          "entry": {
            "format": "uuid",
            "type": "string"
          },
          "problem": {
            "$ref": "#/components/schemas/Problem"
          },
          "state": {
            "enum": [
              "draft",
              "published"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "EntrySummaryView": {
        "properties": {
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "published": {
            "$comment": "LiveView",
            "properties": {
              "generation": {
                "type": "integer"
              },
              "revision_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "revision": {
            "$ref": "#/components/schemas/RevisionView"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Error": {
        "description": "the one error envelope every failure answers in, middleware-made or handler-made",
        "properties": {
          "error": {
            "properties": {
              "code": {
                "description": "stable, machine-readable; branch on this, never on `message`",
                "enum": [
                  "bad_request",
                  "malformed_json",
                  "validation_failed",
                  "unauthorized",
                  "forbidden",
                  "not_found",
                  "gone",
                  "conflict",
                  "precondition_required",
                  "sign_in_failed",
                  "route_not_found",
                  "method_not_allowed",
                  "payload_too_large",
                  "unsupported_media_type",
                  "deadline_exceeded",
                  "rate_limited",
                  "unavailable",
                  "internal"
                ],
                "type": "string"
              },
              "details": {
                "$ref": "#/components/schemas/ErrorDetails"
              },
              "message": {
                "description": "safe to show a person",
                "type": "string"
              },
              "request_id": {
                "description": "matches the `x-request-id` header",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "request_id"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ErrorDetails": {
        "description": "machine-readable detail; present fields depend on `reason`",
        "properties": {
          "candidates": {
            "items": {
              "format": "date-time",
              "type": "string"
            },
            "type": "array"
          },
          "changesets": {
            "items": {
              "$ref": "#/components/schemas/PendingChangeset"
            },
            "type": "array"
          },
          "content_type": {
            "type": "string"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/EntryInTheWay"
            },
            "type": "array"
          },
          "permission": {
            "type": "string"
          },
          "pointer": {
            "description": "an RFC 6901 JSON Pointer into the request body; empty means the whole body",
            "type": "string"
          },
          "reason": {
            "description": "a stable code, such as `slug_taken` or `missing_permission`",
            "type": "string"
          },
          "referenced_by": {
            "items": {
              "$ref": "#/components/schemas/ReferrerView"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "EventStream": {
        "description": "a `text/event-stream` of `hello` once, then `change` events `{\"k\",\"c\"?,\"e\"?}` scoped to the stream's environment — each sent after the commits it reports, at most one per distinct hint per ~100 ms pass, so commits close together fold into one and the last commit is always reported (D-180) — `resync` on a missed hint, and keep-alive comments",
        "type": "string"
      },
      "EventView": {
        "properties": {
          "action": {
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/ActorView"
          },
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "detail": {
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "subject": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "GraphQLRequest": {
        "additionalProperties": false,
        "description": "GraphQL over the query language (DX.10, D-115): a document at most 8 KiB; the schema is generated per collection, so introspection names it. `entries(where, orderBy, first, after)` runs the canonical document and `entry(id)` one draft; mutations stay REST.",
        "properties": {
          "operationName": {
            "description": "which operation runs, when the document names several",
            "type": "string"
          },
          "query": {
            "description": "the GraphQL document; `query` is required, `mutation` and `subscription` are refused",
            "type": "string"
          },
          "variables": {
            "description": "variable values, an object",
            "type": "object"
          }
        },
        "required": [
          "query"
        ],
        "type": "object"
      },
      "GraphQLResponse": {
        "description": "GraphQL's own `{\"data\": …, \"errors\": […]}` — a refusal surfaces as an error on the field that ran, `extensions.code`/`extensions.pointer` carrying the query language's `code` and JSON Pointer (D-115)",
        "properties": {
          "data": {
            "description": "`entries` (a `{T}Connection`: `nodes`, `pageInfo {endCursor, hasNextPage}`, `applied {query, queryHash}`) and `entry` results",
            "type": "object"
          },
          "errors": {
            "items": {
              "properties": {
                "extensions": {
                  "description": "`code` and `pointer`, the refusal's own",
                  "type": "object"
                },
                "locations": {
                  "type": "array"
                },
                "message": {
                  "type": "string"
                },
                "path": {
                  "type": "array"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ImportBody": {
        "description": "one JSON object per line, one JSON array of the same objects, or a Strapi API response's `{\"data\": […], \"meta\": {…}}`. Each item is a native content document, a Strapi entity (`{\"type\": \"api::…\", \"data\": {…}}`, `{\"version\":…,\"data\":{…}}`, `{id, attributes}` or a flat `documentId`/`id` document) or a Sanity document (`_id`, `_type`). At most 512 items."
      },
      "ImportOutcome": {
        "description": "one item's place in the report",
        "properties": {
          "entry": {
            "description": "the entry the item writes or named",
            "format": "uuid",
            "type": "string"
          },
          "item": {
            "description": "its pointer: `/line/3` for JSONL, `/2` for a JSON array, `/data/0` for a wrapped list",
            "type": "string"
          },
          "reason": {
            "description": "why a `skipped` item was skipped",
            "type": "string"
          },
          "refusal": {
            "$ref": "#/components/schemas/ItemRefusal"
          },
          "source": {
            "description": "the source's own id: a Sanity `_id`, a Strapi `id`/`documentId`",
            "type": "string"
          },
          "status": {
            "description": "`would_*` and `invalid` only in a plan",
            "enum": [
              "created",
              "updated",
              "skipped",
              "would_create",
              "would_update",
              "invalid"
            ],
            "type": "string"
          },
          "unmapped": {
            "description": "source keys set aside rather than imported",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "item",
          "status"
        ],
        "type": "object"
      },
      "ImportPlanView": {
        "description": "what `?dry_run=true` answers: the plan, nothing written. A prediction, not a reservation — applying re-checks every item",
        "properties": {
          "dry_run": {
            "enum": [
              true
            ],
            "type": "boolean"
          },
          "outcomes": {
            "items": {
              "$ref": "#/components/schemas/ImportOutcome"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ImportedView": {
        "properties": {
          "imported": {
            "description": "items that created or updated an entry (`skipped` doesn't count)",
            "type": "integer"
          },
          "outcomes": {
            "items": {
              "$ref": "#/components/schemas/ImportOutcome"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Installation": {
        "properties": {
          "has_administrator": {
            "type": "boolean"
          },
          "install_kind": {
            "description": "How the server was installed, when its installer said (`GET /api/v1/installation` only): `container` means the setup code is in `docker compose logs colophon`.",
            "enum": [
              "container"
            ],
            "type": "string"
          }
        },
        "required": [
          "has_administrator"
        ],
        "type": "object"
      },
      "InvitationToken": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "InvitationView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "link": {
            "description": "the usable URL; only in the create answer",
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "label",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "ItemRefusal": {
        "description": "the code, pointer and message an `invalid` item fails with when applied",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "pointer": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "pointer",
          "message"
        ],
        "type": "object"
      },
      "ItemsCount": {
        "properties": {
          "blocked": {
            "type": "integer"
          },
          "done": {
            "type": "integer"
          },
          "expected": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "JobView": {
        "properties": {
          "attempts": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "destination_id": {
            "format": "uuid",
            "type": "string"
          },
          "destination_name": {
            "type": "string"
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "generation": {
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_http_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "JoinedView": {
        "properties": {
          "project_id": {
            "format": "uuid",
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "JsonLines": {
        "description": "one JSON object per line, each an entry's content document",
        "type": "string"
      },
      "LiveView": {
        "properties": {
          "generation": {
            "type": "integer"
          },
          "revision_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Liveness": {
        "properties": {
          "status": {
            "enum": [
              "live"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "LocalizationView": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "MagicLinkRequest": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "return_to": {
            "description": "the site's absolute http(s) landing page, on an origin the project lists; the token is appended to it",
            "type": "string"
          }
        },
        "required": [
          "email",
          "return_to"
        ],
        "type": "object"
      },
      "McpMessage": {
        "description": "one JSON-RPC 2.0 message under MCP protocol 2025-11-25: a request, a notification or a response — never a batch",
        "properties": {
          "error": {
            "description": "`{code, message, data?}`, on a client's own refusal",
            "type": "object"
          },
          "id": {
            "description": "a string or number on requests and their responses; absent on notifications"
          },
          "jsonrpc": {
            "enum": [
              "2.0"
            ],
            "type": "string"
          },
          "method": {
            "description": "`initialize`, `ping`, `tools/list`, `tools/call`, or a `notifications/*` notification",
            "type": "string"
          },
          "params": {
            "type": "object"
          },
          "result": {
            "description": "the answer, on a client's own response"
          }
        },
        "required": [
          "jsonrpc"
        ],
        "type": "object"
      },
      "McpResponse": {
        "description": "one JSON-RPC 2.0 response message: `result` on success or `error` on failure, never both",
        "properties": {
          "error": {
            "properties": {
              "code": {
                "description": "JSON-RPC's own, plus -32001 API-unavailable, -32002 not-initialized, -32800 cancelled",
                "type": "integer"
              },
              "data": {
                "description": "the API's error code, status and request id when it refused"
              },
              "message": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "description": "the request's id, echoed"
          },
          "jsonrpc": {
            "enum": [
              "2.0"
            ],
            "type": "string"
          },
          "result": {
            "description": "the handshake on `initialize`, `{}` on `ping`, `{tools}` on `tools/list`, and `{content, structuredContent, isError}` on `tools/call` — `isError` carries the API's own refusal"
          }
        },
        "required": [
          "jsonrpc",
          "id"
        ],
        "type": "object"
      },
      "Me": {
        "properties": {
          "administrator": {
            "type": "boolean"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "installation": {
            "$ref": "#/components/schemas/Installation"
          },
          "issuer": {
            "type": "string"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ProjectView"
            },
            "type": "array"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "issuer",
          "subject",
          "administrator",
          "installation",
          "projects"
        ],
        "type": "object"
      },
      "MemberRole": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "description": "the role's key",
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "MemberView": {
        "properties": {
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "identity_id": {
            "format": "uuid",
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "identity_id",
          "role",
          "joined_at"
        ],
        "type": "object"
      },
      "MigrationItemView": {
        "properties": {
          "applied_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "entry_id": {
            "format": "uuid",
            "type": "string"
          },
          "expected_revision_id": {
            "format": "uuid",
            "type": "string"
          },
          "new_revision_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "enum": [
              "ok",
              "migrates",
              "needs_input",
              "blocked",
              "resolved",
              "applied",
              "skipped"
            ],
            "type": "string"
          },
          "problem": {
            "description": "the refusal the stored revision would get",
            "type": [
              "object",
              "null"
            ]
          },
          "republish_required": {
            "type": "boolean"
          },
          "resolution": {
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "MigrationSummaryView": {
        "properties": {
          "approved_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "approved_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "base_version": {
            "type": "integer"
          },
          "collection": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "description": "`sha256:<hex>` — the plan's `ETag`",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "$ref": "#/components/schemas/ItemsCount"
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "enum": [
              "proposed",
              "approved",
              "running",
              "done",
              "blocked",
              "superseded",
              "cancelled"
            ],
            "type": "string"
          },
          "target_version": {
            "type": [
              "integer",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewAudienceRole": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "1–63 of a–z, 0–9 and '-', starting with a letter",
            "type": "string"
          },
          "self_assign": {
            "description": "whether signup may choose it; false unless said",
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NewBulkJob": {
        "additionalProperties": false,
        "properties": {
          "collection": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/BulkItemInput"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array"
          },
          "seal": {
            "description": "close the manifest at once and start the run",
            "type": "boolean"
          }
        },
        "required": [
          "collection",
          "items"
        ],
        "type": "object"
      },
      "NewChangeset": {
        "additionalProperties": false,
        "properties": {
          "entries": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          },
          "title": {
            "type": "string"
          },
          "unpublish": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "title"
        ],
        "type": "object"
      },
      "NewComment": {
        "properties": {
          "body": {
            "maxLength": 8000,
            "minLength": 1,
            "type": "string"
          },
          "field": {
            "description": "an optional field path",
            "type": "string"
          },
          "revision": {
            "description": "the immutable revision the comment anchors",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "revision",
          "body"
        ],
        "type": "object"
      },
      "NewComponent": {
        "additionalProperties": false,
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/ComponentDefinition"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "definition"
        ],
        "type": "object"
      },
      "NewDestination": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "default": "webhook",
            "enum": [
              "webhook"
            ],
            "type": "string"
          },
          "location": {
            "description": "a probe location label",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "description": "https to a public address",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "name",
          "url"
        ],
        "type": "object"
      },
      "NewInvitation": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "role",
          "label"
        ],
        "type": "object"
      },
      "NewPlan": {
        "additionalProperties": false,
        "properties": {
          "collection": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/TypeDefinition"
          },
          "operations": {
            "description": "declared `fill`/`move` operations for values the target can't derive",
            "type": "object"
          }
        },
        "required": [
          "collection",
          "definition"
        ],
        "type": "object"
      },
      "NewPreview": {
        "additionalProperties": false,
        "description": "exactly one of `entry` and `changeset`",
        "properties": {
          "changeset": {
            "format": "uuid",
            "type": "string"
          },
          "entry": {
            "format": "uuid",
            "type": "string"
          },
          "ttl_seconds": {
            "default": 900,
            "maximum": 3600,
            "minimum": 60,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "NewProject": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name"
        ],
        "type": "object"
      },
      "NewRelease": {
        "additionalProperties": false,
        "properties": {
          "base_generation": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "base_generation"
        ],
        "type": "object"
      },
      "NewResolution": {
        "additionalProperties": false,
        "properties": {
          "resolution": {
            "description": "the entry's content under the target definition, as a save would store it",
            "type": "object"
          }
        },
        "required": [
          "resolution"
        ],
        "type": "object"
      },
      "NewReview": {
        "additionalProperties": false,
        "properties": {
          "comment": {
            "maxLength": 2000,
            "type": "string"
          },
          "decision": {
            "enum": [
              "approve",
              "request_changes"
            ],
            "type": "string"
          },
          "stage": {
            "description": "the stage's key where the environment configures a list",
            "type": "string"
          }
        },
        "required": [
          "decision"
        ],
        "type": "object"
      },
      "NewRole": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/PermissionBody"
            },
            "type": "array"
          }
        },
        "required": [
          "key",
          "name",
          "permissions"
        ],
        "type": "object"
      },
      "NewSchedule": {
        "additionalProperties": false,
        "properties": {
          "choice": {
            "description": "which of the two instants an ambiguous or skipped local time means",
            "enum": [
              "earlier",
              "later"
            ],
            "type": "string"
          },
          "local_time": {
            "description": "wall-clock time, no offset",
            "type": "string"
          },
          "time_zone": {
            "description": "an IANA zone, such as `Europe/Berlin`",
            "type": "string"
          }
        },
        "required": [
          "local_time",
          "time_zone"
        ],
        "type": "object"
      },
      "NewSiteUser": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "description": "at least 8 characters",
            "type": "string"
          },
          "role": {
            "description": "any audience role the project has, open or not",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password",
          "role"
        ],
        "type": "object"
      },
      "NewStages": {
        "additionalProperties": false,
        "properties": {
          "stages": {
            "items": {
              "properties": {
                "different_reviewer": {
                  "type": "boolean"
                },
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ],
              "type": "object"
            },
            "maxItems": 20,
            "type": "array"
          }
        },
        "required": [
          "stages"
        ],
        "type": "object"
      },
      "NewTask": {
        "properties": {
          "assignee": {
            "format": "uuid",
            "type": "string"
          },
          "changeset": {
            "format": "uuid",
            "type": "string"
          },
          "entry": {
            "format": "uuid",
            "type": "string"
          },
          "revision": {
            "format": "uuid",
            "type": "string"
          },
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "entry",
          "title"
        ],
        "type": "object"
      },
      "NewToken": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "expires_in_days": {
            "maximum": 366,
            "minimum": 1,
            "type": "integer"
          },
          "kind": {
            "enum": [
              "read-only",
              "full-access",
              "custom"
            ],
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/TokenLimits",
            "description": "budget ceilings (D-113); absent means unconstrained"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "description": "`custom` only",
            "items": {
              "$ref": "#/components/schemas/PermissionBody"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "kind",
          "expires_in_days"
        ],
        "type": "object"
      },
      "NewType": {
        "additionalProperties": false,
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/TypeDefinition"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "definition"
        ],
        "type": "object"
      },
      "OfferView": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "invited_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "format": "uuid",
            "type": "string"
          },
          "project_name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "role_description": {
            "type": "string"
          },
          "role_name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OpenApiDocument": {
        "description": "an OpenAPI 3.1 document — this one",
        "type": "object"
      },
      "OwnView": {
        "properties": {
          "kind": {
            "description": "`person` or `token`",
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/PermissionView"
            },
            "type": "array"
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PasswordSignIn": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "PatchToken": {
        "additionalProperties": false,
        "properties": {
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokenLimits"
              },
              {
                "type": "null"
              }
            ],
            "description": "the token's ceilings; `null` removes them"
          }
        },
        "required": [
          "limits"
        ],
        "type": "object"
      },
      "PendingChangeset": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "scheduled": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PermissionBody": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "condition": {
            "enum": [
              "own"
            ],
            "type": "string"
          },
          "fields": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "subject"
        ],
        "type": "object"
      },
      "PermissionView": {
        "properties": {
          "action": {
            "description": "such as `content.update`",
            "type": "string"
          },
          "condition": {
            "description": "absent means anyone's entries",
            "enum": [
              "own"
            ],
            "type": "string"
          },
          "fields": {
            "description": "a field list; absent means all fields",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "subject": {
            "description": "a collection slug, or the whole project",
            "type": "string"
          }
        },
        "required": [
          "action",
          "subject"
        ],
        "type": "object"
      },
      "PersonView": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PlanRunView": {
        "properties": {
          "hash": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "enum": [
              "running"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PlanView": {
        "properties": {
          "approved_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "approved_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "base_version": {
            "type": "integer"
          },
          "collection": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "$ref": "#/components/schemas/ItemsCount"
          },
          "operations": {
            "type": [
              "object",
              "null"
            ]
          },
          "republish_required": {
            "type": "boolean"
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "enum": [
              "proposed",
              "approved",
              "running",
              "done",
              "blocked",
              "superseded",
              "cancelled"
            ],
            "type": "string"
          },
          "target_definition": {
            "$ref": "#/components/schemas/TypeDefinition"
          },
          "target_definition_hash": {
            "type": "string"
          },
          "target_version": {
            "type": [
              "integer",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PreviewCodeView": {
        "properties": {
          "code": {
            "type": "string"
          },
          "code_expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PreviewEntryView": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublishedEntryView"
          },
          {
            "properties": {
              "preview": {
                "properties": {
                  "hidden_fields": {
                    "description": "fields the issuer's role can't read, left out",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "source": {
                    "enum": [
                      "published",
                      "draft",
                      "changeset"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "source"
                ],
                "type": "object"
              }
            },
            "required": [
              "preview"
            ],
            "type": "object"
          }
        ],
        "description": "a `PublishedEntryView`, byte for byte, plus `preview`"
      },
      "PreviewExchange": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "the `cpc_…` code from the preview address",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "PreviewIssuedView": {
        "properties": {
          "code": {
            "description": "the one-time code (`cpc_…`): exchangeable once, for 60 seconds",
            "type": "string"
          },
          "code_expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/PreviewScope"
          },
          "url": {
            "description": "the preview address with the code in it",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PreviewLiveView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "exchanged": {
            "description": "whether a site has exchanged its code",
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/PreviewScope"
          }
        },
        "type": "object"
      },
      "PreviewQueryPage": {
        "properties": {
          "applied": {
            "$ref": "#/components/schemas/AppliedQuery"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/PreviewEntryView"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor",
          "applied"
        ],
        "type": "object"
      },
      "PreviewRenewedView": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PreviewScope": {
        "properties": {
          "changeset": {
            "format": "uuid",
            "type": "string"
          },
          "entry": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "entry",
              "changeset"
            ],
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "PreviewSessionView": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/PreviewScope"
          }
        },
        "type": "object"
      },
      "PreviewTargetView": {
        "properties": {
          "origin": {
            "description": "the address's origin: where the Studio posts `colophon:draft-saved`",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "url_template": {
            "description": "the site address a preview opens, with `{code}` and optional `{collection}`, `{id}`, `{slug}`, `{locale}`",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PreviewTokenView": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/PreviewScope"
          },
          "token": {
            "description": "the bearer token (`cpv_…`); keep it in an HttpOnly cookie, never a URL",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Problem": {
        "properties": {
          "message": {
            "type": "string"
          },
          "pointer": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProjectView": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "description": "only when one project is read",
            "items": {
              "$ref": "#/components/schemas/PermissionView"
            },
            "type": "array"
          },
          "role": {
            "type": "string"
          },
          "role_name": {
            "type": "string"
          },
          "self_review": {
            "description": "only when one project is read",
            "type": "boolean"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "role",
          "role_name"
        ],
        "type": "object"
      },
      "PublishedEntryView": {
        "properties": {
          "collection": {
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/EntryDocument"
          },
          "content_hash": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "media": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublishedMedia"
            },
            "description": "the uploads it names (asset fields and rich-text images) at the versions its release recorded, by asset id; absent when it names none (D-178)",
            "type": "object"
          },
          "published_in": {
            "description": "the generation this revision went live in",
            "type": "integer"
          },
          "revision_id": {
            "format": "uuid",
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PublishedMedia": {
        "properties": {
          "current_url": {
            "description": "follows replacements, without publishing again",
            "type": "string"
          },
          "height": {
            "type": "integer"
          },
          "renditions": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "`wN`: N pixels wide, present only when the original is wider",
            "type": "object"
          },
          "type": {
            "type": "string"
          },
          "url": {
            "description": "the exact bytes the release published: immutable, cached a year",
            "type": "string"
          },
          "width": {
            "type": "integer"
          }
        },
        "required": [
          "url",
          "current_url",
          "type",
          "width",
          "height",
          "renditions"
        ],
        "type": "object"
      },
      "PublishedView": {
        "properties": {
          "changeset_hash": {
            "type": "string"
          },
          "changeset_id": {
            "format": "uuid",
            "type": "string"
          },
          "entries_changed": {
            "type": "integer"
          },
          "entries_unpublished": {
            "type": "integer"
          },
          "epoch": {
            "type": "integer"
          },
          "generation": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "QueriedView": {
        "properties": {
          "collection": {
            "type": "string"
          },
          "content": {
            "description": "narrowed to the role's fields, then to `fields`, then `depth`-populated",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "hidden_fields": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "published": {
            "properties": {
              "generation": {
                "type": "integer"
              },
              "revision_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "revision": {
            "$ref": "#/components/schemas/RevisionView"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "QueryDocument": {
        "description": "the bounded query document (DX.1, D-103): `filters` (field, operator, value — only indexes the type declares), `sort`, `fields` (a selection that can only narrow), `limit`, `depth` (reference population levels). The canonical form hashes to `query_hash`.",
        "type": "object"
      },
      "QueryPage": {
        "properties": {
          "applied": {
            "$ref": "#/components/schemas/AppliedQuery"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/QueriedView"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor",
          "applied"
        ],
        "type": "object"
      },
      "ReadinessReport": {
        "properties": {
          "checks": {
            "properties": {
              "cache": {
                "enum": [
                  "unknown",
                  "up",
                  "down",
                  "not_configured"
                ],
                "type": "string"
              },
              "database": {
                "enum": [
                  "unknown",
                  "up",
                  "down",
                  "not_configured"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "role": {
            "enum": [
              "api",
              "worker",
              "all"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "starting",
              "ready",
              "degraded",
              "not_ready",
              "draining"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "role",
          "checks"
        ],
        "type": "object"
      },
      "ReceiptView": {
        "description": "a release — every `ReleaseView` field, at the top level — plus its deliveries and observations: the publish receipt",
        "properties": {
          "changeset_hash": {
            "description": "the approved hash it published",
            "type": "string"
          },
          "changeset_id": {
            "format": "uuid",
            "type": "string"
          },
          "deliveries": {
            "items": {
              "$ref": "#/components/schemas/DeliveryView"
            },
            "type": "array"
          },
          "entries": {
            "description": "entries whose published revision changed",
            "type": "integer"
          },
          "epoch": {
            "description": "the environment's epoch when it committed",
            "type": "integer"
          },
          "generation": {
            "description": "its number in the environment: 1 for the first, up by exactly one each release",
            "type": "integer"
          },
          "label": {
            "description": "the release's one label (D-051); `verified` is at `locations` locations",
            "enum": [
              "published",
              "pending",
              "verified",
              "needs_attention"
            ],
            "type": "string"
          },
          "locations": {
            "description": "distinct locations a probe saw this release, or a later one, from",
            "type": "integer"
          },
          "observations": {
            "items": {
              "$ref": "#/components/schemas/SeenView"
            },
            "type": "array"
          },
          "published_at": {
            "format": "date-time",
            "type": "string"
          },
          "published_by": {
            "format": "uuid",
            "type": "string"
          },
          "published_by_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "purge": {
            "description": "whether the environment's CDNs accepted a purge covering it (D-050)",
            "enum": [
              "none",
              "pending",
              "accepted",
              "failed"
            ],
            "type": "string"
          },
          "title": {
            "description": "the changeset's title",
            "type": "string"
          },
          "unpublished": {
            "description": "entries it took down",
            "type": "integer"
          }
        },
        "required": [
          "deliveries",
          "observations",
          "generation",
          "epoch",
          "changeset_id",
          "title",
          "changeset_hash",
          "published_by",
          "published_by_name",
          "published_at",
          "entries",
          "unpublished",
          "purge",
          "label",
          "locations"
        ],
        "type": "object"
      },
      "ReferrerView": {
        "properties": {
          "collection": {
            "type": "string"
          },
          "entry_id": {
            "format": "uuid",
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "in_draft": {
            "type": "boolean"
          },
          "published": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ReleaseView": {
        "properties": {
          "changeset_hash": {
            "description": "the approved hash it published",
            "type": "string"
          },
          "changeset_id": {
            "format": "uuid",
            "type": "string"
          },
          "entries": {
            "description": "entries whose published revision changed",
            "type": "integer"
          },
          "epoch": {
            "description": "the environment's epoch when it committed",
            "type": "integer"
          },
          "generation": {
            "description": "its number in the environment: 1 for the first, up by exactly one each release",
            "type": "integer"
          },
          "label": {
            "description": "the release's one label (D-051); `verified` is at `locations` locations",
            "enum": [
              "published",
              "pending",
              "verified",
              "needs_attention"
            ],
            "type": "string"
          },
          "locations": {
            "description": "distinct locations a probe saw this release, or a later one, from",
            "type": "integer"
          },
          "published_at": {
            "format": "date-time",
            "type": "string"
          },
          "published_by": {
            "format": "uuid",
            "type": "string"
          },
          "published_by_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "purge": {
            "description": "whether the environment's CDNs accepted a purge covering it (D-050)",
            "enum": [
              "none",
              "pending",
              "accepted",
              "failed"
            ],
            "type": "string"
          },
          "title": {
            "description": "the changeset's title",
            "type": "string"
          },
          "unpublished": {
            "description": "entries it took down",
            "type": "integer"
          }
        },
        "required": [
          "generation",
          "epoch",
          "changeset_id",
          "title",
          "changeset_hash",
          "published_by",
          "published_by_name",
          "published_at",
          "entries",
          "unpublished",
          "purge",
          "label",
          "locations"
        ],
        "type": "object"
      },
      "RemovedView": {
        "properties": {
          "removed": {
            "type": "boolean"
          },
          "slug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResolvedView": {
        "properties": {
          "hash": {
            "type": "string"
          },
          "item": {
            "$ref": "#/components/schemas/MigrationItemView"
          }
        },
        "type": "object"
      },
      "ReviewView": {
        "properties": {
          "changeset_hash": {
            "description": "the hash this review bound",
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "description": "whether the hash it bound is still the changeset's",
            "type": "boolean"
          },
          "decision": {
            "enum": [
              "approve",
              "request_changes"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "reviewer_id": {
            "format": "uuid",
            "type": "string"
          },
          "reviewer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "RevisionContentView": {
        "properties": {
          "content": {
            "$ref": "#/components/schemas/EntryDocument"
          },
          "revision": {
            "$ref": "#/components/schemas/RevisionView"
          }
        },
        "type": "object"
      },
      "RevisionView": {
        "properties": {
          "author_id": {
            "format": "uuid",
            "type": "string"
          },
          "base_revision_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "content_hash": {
            "description": "`sha256:<hex>`",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RichTextDocument": {
        "description": "a `colophon/rich-text` v1 document (docs/formats/rich-text-v1.md)",
        "type": "object"
      },
      "RichTextVerdict": {
        "properties": {
          "bytes": {
            "type": "integer"
          },
          "depth": {
            "type": "integer"
          },
          "nodes": {
            "type": "integer"
          },
          "value": {
            "description": "the canonical document",
            "type": "object"
          }
        },
        "type": "object"
      },
      "RoleChange": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/PermissionBody"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "permissions"
        ],
        "type": "object"
      },
      "RoleView": {
        "properties": {
          "built_in": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "fixed": {
            "type": "boolean"
          },
          "invitations": {
            "type": "integer"
          },
          "key": {
            "type": "string"
          },
          "members": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/PermissionView"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "key",
          "name",
          "description",
          "built_in",
          "fixed",
          "version",
          "permissions",
          "members",
          "invitations",
          "updated_at"
        ],
        "type": "object"
      },
      "ScheduleView": {
        "properties": {
          "changeset_hash": {
            "type": "string"
          },
          "changeset_id": {
            "format": "uuid",
            "type": "string"
          },
          "choice": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delayed": {
            "description": "it ran late, truthfully — never reported on time",
            "type": "boolean"
          },
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "generation": {
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "local_time": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "run_at": {
            "format": "date-time",
            "type": "string"
          },
          "scheduled_by": {
            "format": "uuid",
            "type": "string"
          },
          "scheduled_by_name": {
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "enum": [
              "pending",
              "published",
              "blocked",
              "cancelled"
            ],
            "type": "string"
          },
          "time_zone": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SeenView": {
        "properties": {
          "body_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination_id": {
            "format": "uuid",
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "http_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "location": {
            "type": "string"
          },
          "observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "observed_generation": {
            "description": "the release the answer said it was built from, if it said",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "destination_id",
          "location",
          "observed_generation",
          "http_status",
          "body_hash",
          "error",
          "observed_at"
        ],
        "type": "object"
      },
      "SetPreviewTarget": {
        "additionalProperties": false,
        "properties": {
          "url_template": {
            "description": "https (http only to localhost on a development server), at most 2,048 characters, holding `{code}`; `null` clears it",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "url_template"
        ],
        "type": "object"
      },
      "SetUp": {
        "properties": {
          "administrator": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SetupCode": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "SignUp": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "SignedOut": {
        "properties": {
          "provider_sign_out": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SiteSession": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "description": "its absolute end, use or not",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "created_at",
          "last_seen_at",
          "expires_at",
          "revoked"
        ],
        "type": "object"
      },
      "SiteUser": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "disabled": {
            "description": "staff disabled it: its sessions are dead and sign-in says so",
            "type": "boolean"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_sign_in_at": {
            "description": "present once it has signed in",
            "format": "date-time",
            "type": "string"
          },
          "role": {
            "description": "the audience role it holds — the label `role:<name>` visibility grants to",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "display_name",
          "role",
          "created_at",
          "disabled"
        ],
        "type": "object"
      },
      "SiteUserChange": {
        "additionalProperties": false,
        "description": "a role and/or a disable — at least one",
        "properties": {
          "disabled": {
            "description": "true disables and revokes its sessions, false re-enables",
            "type": "boolean"
          },
          "role": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StageListView": {
        "properties": {
          "stages": {
            "items": {
              "$ref": "#/components/schemas/StageView"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "StageStateView": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "by_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "different_reviewer": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "enum": [
              "pending",
              "changes_requested",
              "approved",
              "approval_expired"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "StageView": {
        "properties": {
          "different_reviewer": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StatusView": {
        "properties": {
          "by": {
            "type": [
              "string",
              "null"
            ]
          },
          "edited_items": {
            "type": "integer"
          },
          "generation": {
            "type": [
              "integer",
              "null"
            ]
          },
          "self_review": {
            "type": "boolean"
          },
          "state": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TaskUpdate": {
        "properties": {
          "assignee": {
            "description": "absent leaves it; `null` unassigns",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "open",
              "done",
              "cancelled"
            ],
            "type": "string"
          },
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TaskView": {
        "properties": {
          "assignee_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "changeset_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "collection": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "type": "string"
          },
          "done_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "done_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "entry_id": {
            "format": "uuid",
            "type": "string"
          },
          "etag": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "revision_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "open",
              "done",
              "cancelled"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TokenLimits": {
        "properties": {
          "cost_per_day_micros": {
            "description": "provider cost per rolling day, in micros of the accounting unit — the unit's millionths, a fixed-point integer (D-122)",
            "maximum": 100000000000,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "documents_per_day": {
            "description": "entry writes per rolling day",
            "maximum": 1000000,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "max_concurrent_jobs": {
            "description": "delivery jobs held at once",
            "maximum": 64,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "requests_per_minute": {
            "description": "management requests per rolling minute; over it, 429 `rate_limited` with `Retry-After` (D-118)",
            "maximum": 100000,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "tokens_per_day": {
            "description": "provider tokens per rolling day (D-122)",
            "maximum": 1000000000,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TokenUsage": {
        "properties": {
          "cost_last_day": {
            "description": "provider cost in the last day, in micros of the accounting unit",
            "type": "integer"
          },
          "documents_last_day": {
            "type": "integer"
          },
          "jobs_open": {
            "type": "integer"
          },
          "requests_last_minute": {
            "description": "the limiter's current rolling window (D-118); 0 without the ceiling or when unreachable",
            "type": "integer"
          },
          "tokens_last_day": {
            "description": "provider tokens in the last day; settled outcomes at what they consumed, open reservations at their allowance",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TokenView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "$ref": "#/components/schemas/PersonView"
          },
          "description": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "identity_id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "read-only",
              "full-access",
              "custom"
            ],
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokenLimits"
              },
              {
                "type": "null"
              }
            ],
            "description": "budget ceilings; `null` is unconstrained at the quota layer"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/PermissionView"
            },
            "type": "array"
          },
          "revoked_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "secret": {
            "description": "`colophon_api_…`; only in the create answer, shown once",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "expired",
              "revoked"
            ],
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/TokenUsage",
            "description": "what it holds or spent; only on the single-token answer"
          }
        },
        "type": "object"
      },
      "TypeDefinition": {
        "description": "a content type definition: `kind` (`collection` or `single`), `title` field name, `fields` (each with its `type` and options), `locales` policy. Rust revalidates every mutation against it; its canonical form hashes to `definition_hash`.",
        "type": "object"
      },
      "TypeVersion": {
        "properties": {
          "slug": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TypeVersionView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/TypeDefinition"
          },
          "definition_hash": {
            "description": "`sha256:<hex>` of the canonical definition",
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UploadBody": {
        "description": "the file's bytes; its name in `X-Colophon-File-Name`, its claimed type in `Content-Type`",
        "format": "binary",
        "type": "string"
      },
      "VersionReport": {
        "description": "the shape never changes: fields may be added, none removed or renamed",
        "properties": {
          "api": {
            "description": "the API versions served, oldest first",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "build_date": {
            "description": "the day it was built, or `unknown`",
            "type": "string"
          },
          "commit": {
            "description": "the git commit, or `unknown`",
            "type": "string"
          },
          "version": {
            "description": "the release, such as `0.1.0-alpha.1`",
            "type": "string"
          }
        },
        "required": [
          "version",
          "commit",
          "build_date",
          "api"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiToken": {
        "bearerFormat": "colophon_api_",
        "description": "a project API token (`colophon_api_…`). It acts as its own identity with its own permissions, only on its own project's `/environments` routes and `/api/v1/rich-text/validate`: another project is 404, other routes are 403 `api_token_not_allowed`, and so is scheduling, which runs later as a person.",
        "scheme": "bearer",
        "type": "http"
      },
      "audienceCookie": {
        "description": "a site user's session (D-137). `Authorization: Bearer <token>` works everywhere the cookie does; a cookie-carried write also echoes the CSRF token — the readable `colophon_audience_csrf` cookie — in `X-CSRF-Token`.",
        "in": "cookie",
        "name": "colophon_audience",
        "type": "apiKey"
      },
      "bearerToken": {
        "description": "a personal access token, as `colophon login` gets from the device flow. A bearer request is authenticated by the token alone — no CSRF.",
        "scheme": "bearer",
        "type": "http"
      },
      "previewToken": {
        "bearerFormat": "cpv_",
        "description": "a preview token (D-171): a customer's site exchanges a one-time code from a preview address for it. It reads one entry's drafts (or one publish request's pinned revisions) over the latest release, as the person who opened the preview may read them, until it expires or is revoked.",
        "scheme": "bearer",
        "type": "http"
      },
      "sessionCookie": {
        "description": "a browser session. Cookie-authenticated writes (anything but GET, HEAD, OPTIONS) also need an `Origin` the server trusts exactly and an `X-CSRF-Token` header matching the session's CSRF token, which lives in the readable `colophon_csrf` cookie.",
        "in": "cookie",
        "name": "colophon_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Colophon's HTTP API: the /api/v1 management surface the Studio, CLI, SDK and agents share, the public /content/v1 delivery and /media/v1 origins, and the server's own meta routes. Emitted from the route table the server itself is built from (D-110), so the document and the routes cannot drift.",
    "title": "Colophon",
    "version": "0.1.0-alpha.1"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/installation": {
      "get": {
        "operationId": "installation",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Installation"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "says yes or no, never who; `Cache-Control: no-store`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Whether anyone is an administrator of this Colophon yet",
        "tags": [
          "setup"
        ]
      }
    },
    "/api/v1/invitations/accept": {
      "post": {
        "operationId": "acceptInvitation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JoinedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such invitation — used, revoked or invented"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`already_member` — already in the project"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Join the project an invitation names",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/invitations/lookup": {
      "post": {
        "operationId": "lookupInvitation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OfferView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such invitation — used, revoked or invented"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "What an invitation link offers, before accepting",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "listProjects",
        "parameters": [
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "matches name or slug, any case",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ProjectView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The projects the caller belongs to, by name",
        "tags": [
          "projects"
        ]
      },
      "post": {
        "operationId": "createProject",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewProject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`administrators_only, not_set_up` — only an administrator creates projects"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`project_exists` — a project with this slug exists"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_slug, invalid_name` — the fields refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Create a project (administrators only)",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project}": {
      "get": {
        "operationId": "getProject",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "One project, with what the caller's role allows in it",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/origins": {
      "get": {
        "operationId": "audienceOrigins",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceOrigins"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The origins the project's magic links may land on",
        "tags": [
          "audience"
        ]
      },
      "put": {
        "operationId": "audienceOriginsSet",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudienceOrigins"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceOrigins"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_origin` — not scheme://host[:port] over http(s); `too_many_origins` — more than the project may list"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Replace the origins the project's magic links may land on",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/roles": {
      "get": {
        "operationId": "audienceRoles",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/AudienceRole"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "by name"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's audience roles",
        "tags": [
          "audience"
        ]
      },
      "post": {
        "operationId": "audienceRoleCreate",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAudienceRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceRole"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`role_exists` — the project has this role already"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_role` — the name refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Make an audience role",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/roles/{name}": {
      "delete": {
        "operationId": "audienceRoleDelete",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "a rendition name the worker wrote, such as `w320`; or an audience role's",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`role_in_use` — site users hold it — change their roles first"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Delete the audience role",
        "tags": [
          "audience"
        ]
      },
      "patch": {
        "operationId": "audienceRoleUpdate",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "a rendition name the worker wrote, such as `w320`; or an audience role's",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudienceRoleChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceRole"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Open the role to signup, or close it",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/sessions/{session}": {
      "delete": {
        "operationId": "audienceSessionRevoke",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the session's id",
            "in": "path",
            "name": "session",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Revoke one site session",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/users": {
      "get": {
        "operationId": "audienceUsers",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SiteUser"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's site users, newest first",
        "tags": [
          "audience"
        ]
      },
      "post": {
        "operationId": "audienceUserCreate",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewSiteUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteUser"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`email_taken` — an account with this email exists; `audience_full` — the project is at its site-user bound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_email, weak_password, unknown_audience_role` — the fields refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Make a site user, in any audience role",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/users/{user}": {
      "get": {
        "operationId": "audienceUser",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the site user's id",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteUser"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "One site user",
        "tags": [
          "audience"
        ]
      },
      "patch": {
        "operationId": "audienceUserUpdate",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the site user's id",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteUserChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteUser"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unknown_audience_role, empty_change` — the change refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Change a site user's role, or disable it",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audience/users/{user}/sessions": {
      "get": {
        "operationId": "audienceUserSessions",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the site user's id",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SiteSession"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The site user's sessions, live and dead",
        "tags": [
          "audience"
        ]
      }
    },
    "/api/v1/projects/{project}/audit": {
      "get": {
        "operationId": "listAuditEvents",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one action, such as `entry.deleted`",
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one actor's events",
            "in": "query",
            "name": "actor",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/EventView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's audit log, newest first",
        "tags": [
          "audit"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/assets": {
      "get": {
        "operationId": "listAssets",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 100",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "≤ 100 characters, matched in the file name, title and alt text",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "quarantined, usable, rejected, deleting or deleted",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "assets carrying this tag",
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/AssetView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_limit, invalid_query, invalid_state, invalid_tag, invalid_cursor` — a parameter refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "A page of the environment's assets, newest first, searchable",
        "tags": [
          "assets"
        ]
      },
      "post": {
        "operationId": "uploadAsset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the file's name",
            "in": "header",
            "name": "x-colophon-file-name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the claimed image type, verified by the worker",
            "in": "header",
            "name": "content-type",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "$ref": "#/components/schemas/UploadBody"
              }
            }
          },
          "description": "the file's bytes",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AssetUploadView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "quarantined; the verify job decides what it becomes"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_upload` — the name, type or size refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — uploads are not configured on this server"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Upload an image; the verify job decides what it becomes",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/assets/{asset}": {
      "delete": {
        "operationId": "deleteAsset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AssetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the worker removes the objects and lands `deleted`"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`already_deleted, asset_quarantined` — on its way out already, or still being verified; `still_referenced` — content still names it; `details.referenced_by` names them; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Ask for the asset to go — 202 is requested, not gone",
        "tags": [
          "assets"
        ]
      },
      "get": {
        "operationId": "getAsset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetDetailView"
                }
              }
            },
            "description": "`data` is the asset; `versions` its byte history (D-136)",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One asset with every verified version, oldest first",
        "tags": [
          "assets"
        ]
      },
      "patch": {
        "operationId": "updateAsset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetMetadata"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AssetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_version` — someone changed its details; the `ETag` names them now; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`wrong_type, unknown_field, invalid_value, invalid_tag, duplicate_tag, too_many_tags` — the change refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Change an asset's alt text, title, credit or tags",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/assets/{asset}/references": {
      "get": {
        "operationId": "assetReferences",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ReferrerView"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The entries that name this asset, in collections the role reads",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/assets/{asset}/replace": {
      "post": {
        "operationId": "replaceAsset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the file's name",
            "in": "header",
            "name": "x-colophon-file-name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the claimed image type, verified by the worker",
            "in": "header",
            "name": "content-type",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "$ref": "#/components/schemas/UploadBody"
              }
            }
          },
          "description": "the file's bytes",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AssetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the reverify job swings the current version only if the bytes verify"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`asset_quarantined, asset_rejected, already_deleted` — its first verdict is still out, it has no version to replace, or it is gone; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_upload` — the name, type or size refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — uploads are not configured on this server"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "New bytes for a usable asset — a new version, the old one keeps its objects",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/bulk": {
      "get": {
        "operationId": "listBulkJobs",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`accepting`, `running`, `done`, `blocked`, `cancelled`",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/BulkJobView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's bulk jobs, newest first",
        "tags": [
          "bulk"
        ]
      },
      "post": {
        "operationId": "submitBulkJob",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBulkJob"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkJobView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`ETag: \"sha256:<manifest hash>\"` — what `If-Match` binds",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, budget_exceeded` — a permission the manifest asks for isn't the caller's, or a budget refuses"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_*, chunk_too_large, manifest_empty` — a manifest item wouldn't validate"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Submit a manifest of exact entries and base revisions (a chunk is at most 100 items and 1 MiB)",
        "tags": [
          "bulk"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/bulk/{job}": {
      "get": {
        "operationId": "getBulkJob",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkJobView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One bulk job, `ETag`'d with its manifest hash",
        "tags": [
          "bulk"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/bulk/{job}/cancel": {
      "post": {
        "operationId": "cancelBulkJob",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkJobView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`job_finished` — the job is already finished; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Cancel an open job; pending items skip, reservations release",
        "tags": [
          "bulk"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/bulk/{job}/items": {
      "get": {
        "operationId": "listBulkItems",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`pending`, `applied`, `conflict`, `refused`, `skipped`",
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "continue past this item",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/BulkItemView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "A job's items in key order — the resumable cursor",
        "tags": [
          "bulk"
        ]
      },
      "post": {
        "operationId": "appendBulkItems",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppendBulkItems"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkAppendView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the job after the chunk; `duplicates` names keys that landed already",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, budget_exceeded` — a permission the chunk asks for isn't the caller's, or a budget refuses"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`job_moved` — the manifest changed; the `ETag` names it now; `job_not_accepting` — the manifest is closed; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_*, chunk_too_large, manifest_too_large` — the chunk wouldn't validate"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Append the next chunk while the job is `accepting`",
        "tags": [
          "bulk"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets": {
      "get": {
        "operationId": "listChangesets",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ChangesetSummaryView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the latest 100 changesets; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's changesets",
        "tags": [
          "publishing"
        ]
      },
      "post": {
        "operationId": "createChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewChangeset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChangesetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unknown_entry, entries_moved_on, too_many_entries, empty_changeset and friends` — the changeset refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Pin entries at their current revisions for review and release",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets/{changeset}": {
      "get": {
        "operationId": "getChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the changeset's id",
            "in": "path",
            "name": "changeset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChangesetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One changeset: items, status, reviews, stage states; `ETag`'d by its hash",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets/{changeset}/publish": {
      "post": {
        "operationId": "publishChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the changeset's id",
            "in": "path",
            "name": "changeset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRelease"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublishedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`budget_exceeded` — a token's `max_concurrent_jobs` budget refused the release's dispatch"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_changeset` — the changeset moved; the `ETag` names it now; `generation_moved` — another release committed first; `Colophon-Generation` names the current one; `not_approved, already_published` — wrong state; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_generation, slug_taken`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Commit the release on the publisher's base generation",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets/{changeset}/refresh": {
      "post": {
        "operationId": "refreshChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the changeset's id",
            "in": "path",
            "name": "changeset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChangesetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_changeset` — the changeset moved; the `ETag` names it now; `not_editable, already_published` — wrong state"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Re-pin the changeset's items at their current revisions",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets/{changeset}/reviews": {
      "post": {
        "operationId": "reviewChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the changeset's id",
            "in": "path",
            "name": "changeset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewReview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChangesetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, agent_self_review` — the role can't review it, or a token tried to approve a token's changeset"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_changeset` — the changeset moved; the `ETag` names it now; `not_submitted, already_published, different_reviewer` — wrong state, or a stage needs another reviewer"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_decision, invalid_comment, stage_required, unknown_stage` — the review refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Approve, or request changes on, the changeset's current hash",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets/{changeset}/schedule": {
      "post": {
        "operationId": "scheduleChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the changeset's id",
            "in": "path",
            "name": "changeset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewSchedule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScheduleView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_changeset` — the changeset moved; the `ETag` names it now; `already_scheduled` — one schedule is pending already"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`ambiguous_local_time, skipped_local_time, in_the_past, too_far_ahead, after_approval_expires, unknown_time_zone, invalid_local_time, invalid_choice` — the time refused; `details.candidates` offers the two instants"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Schedule the publish in an IANA time zone",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/changesets/{changeset}/submit": {
      "post": {
        "operationId": "submitChangeset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the changeset's id",
            "in": "path",
            "name": "changeset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChangesetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_changeset` — the changeset moved; the `ETag` names it now; `already_submitted, already_published` — wrong state"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Submit a changeset for review",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries": {
      "get": {
        "operationId": "listEntries",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "title search",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`me` or a creator's id, within what the role may list",
            "in": "query",
            "name": "created_by",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one locale's entries",
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/EntrySummaryView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "A collection's drafts, cursored",
        "tags": [
          "entries"
        ]
      },
      "post": {
        "operationId": "createEntry",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's locale; absent or empty leaves it unlocalized",
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`public`, `authenticated` or `role:<name>` — who may read it once published; absent keeps the draft's gate",
            "in": "query",
            "name": "visibility",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntryDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DraftView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, fields_not_writable, budget_exceeded` — the role, or a token's `documents_per_day` budget, refused it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`slug_taken, value_taken` — the slug or a unique value is another entry's; `details.entries` names it; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`validation_failed, reference_not_found, single_exists and friends` — the document refused, with `details.reason` and a JSON Pointer"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Create a draft, validated against the collection's type",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/query": {
      "post": {
        "operationId": "queryEntries",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryPage"
                }
              }
            },
            "description": "`applied` echoes the canonical query and its hash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`field_not_readable` — a filter or sort names a field the role can't read on every row; `invalid_cursor, foreign_cursor, too_large, position_mismatch` — the cursor is not this query's; `invalid_*` — the query document refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Run the bounded query language over current drafts",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}": {
      "delete": {
        "operationId": "deleteEntry",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_revision` — the draft moved; the `ETag` names it now; `still_referenced, entry_in_changeset` — something still depends on it; `details` names it; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Delete an entry, leaving a tombstone",
        "tags": [
          "entries"
        ]
      },
      "get": {
        "operationId": "getEntry",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DraftView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One draft: its content narrowed to the role, `referenced_by`, `ETag`",
        "tags": [
          "entries"
        ]
      },
      "put": {
        "operationId": "saveEntry",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "a tag sets the locale; an empty value clears it; absent leaves it alone",
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`public`, `authenticated` or `role:<name>` — who may read it once published; absent keeps the draft's gate",
            "in": "query",
            "name": "visibility",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntryDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DraftView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, fields_not_writable, budget_exceeded` — the role, or a token's `documents_per_day` budget, refused it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_revision` — the draft moved; the `ETag` names it now; `slug_taken, value_taken` — the slug or a unique value is another entry's; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`validation_failed and friends` — the document refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Save a draft on its expected revision",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/comments": {
      "get": {
        "operationId": "listComments",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one revision's comments",
            "in": "query",
            "name": "revision",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`open` or `resolved`",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CommentView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "An entry's comments, revision-anchored and verbatim",
        "tags": [
          "collaboration"
        ]
      },
      "post": {
        "operationId": "createComment",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewComment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`revision_not_found, invalid_field_path, empty_body, body_too_long` — the comment refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Anchor a comment to an immutable revision",
        "tags": [
          "collaboration"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/comments/{comment}": {
      "get": {
        "operationId": "getComment",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the comment's id",
            "in": "path",
            "name": "comment",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One comment, `ETag`'d by its resolution state",
        "tags": [
          "collaboration"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/comments/{comment}/reopen": {
      "post": {
        "operationId": "reopenComment",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the comment's id",
            "in": "path",
            "name": "comment",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`comment_moved` — the comment moved; the `ETag` names it now; `already_open` — it is already open; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Reopen a resolved comment",
        "tags": [
          "collaboration"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/comments/{comment}/resolve": {
      "post": {
        "operationId": "resolveComment",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the comment's id",
            "in": "path",
            "name": "comment",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`comment_moved` — the comment moved; the `ETag` names it now; `already_resolved` — it is already resolved; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Mark a comment resolved",
        "tags": [
          "collaboration"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/localizations": {
      "post": {
        "operationId": "createLocalization",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the sibling's locale tag, such as `fr`",
            "in": "query",
            "name": "locale",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`public`, `authenticated` or `role:<name>` — who may read it once published; absent keeps the draft's gate",
            "in": "query",
            "name": "visibility",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DraftView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`budget_exceeded` — a token's `documents_per_day` budget refused it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`locale_taken, slug_taken, value_taken, single_exists` — the locale is already in the group, or the copy hit a uniqueness rule; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_locale, invalid_locale and friends`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Create a locale sibling holding a copy of this draft",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/revisions": {
      "get": {
        "operationId": "entryHistory",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/RevisionView"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "every revision kept"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The entry's revisions, newest first",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/entries/{entry}/revisions/{revision}": {
      "get": {
        "operationId": "getRevision",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the revision's id",
            "in": "path",
            "name": "revision",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RevisionContentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One revision's content, narrowed to the role",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/export": {
      "get": {
        "operationId": "exportEntries",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/jsonlines": {
                "schema": {
                  "$ref": "#/components/schemas/JsonLines"
                }
              }
            },
            "description": "one entry per line — what `import` takes back",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`fields_not_readable` — an export holds every field, so it needs a role that reads them all"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Every draft's canonical content as JSON Lines",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/graphql": {
      "post": {
        "operationId": "queryEntriesGraphQL",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GraphQLRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GraphQLResponse"
                }
              }
            },
            "description": "the document's `data`, with `errors[].extensions` carrying the query language's `code`/`pointer` on a refusal"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`too_large, wrong_type` — the `query` string over 8 KiB, or `variables` not an object; `too_deep, too_complex, fragment_cycle` — with fragments expanded: deeper than 16, more than 512 fields, or spreads that cycle — refused before the read opens"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "GraphQL over the same read `entries/query` runs (read-only)",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/collections/{collection}/import": {
      "post": {
        "operationId": "importEntries",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "set `true` to run every item and roll back — the 200 plan names each `would_create`, `would_update`, `skipped` or `invalid` item; a plan is a prediction, not a reservation, and needs no `Idempotency-Key`",
            "in": "query",
            "name": "dry_run",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "the Sanity `_type` to take from a mixed file; documents of other types are `skipped`, reported",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment; required unless `?dry_run=true`, which plans without one",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportBody"
              }
            },
            "application/jsonlines": {
              "schema": {
                "$ref": "#/components/schemas/ImportBody"
              }
            }
          },
          "description": "one object per line, one array, or a Strapi `{\"data\": […], \"meta\": {…}}`; lands in one transaction or not at all",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ImportPlanView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the dry run's per-item plan; nothing was written"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ImportedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, fields_not_writable, budget_exceeded` — the role, or a token's `documents_per_day` budget, refused it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`single_exists` — a single type already has its entry; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`too_many_items, type_mismatch, invalid_*, slug_taken, value_taken` — the file refused, with the failing item's index"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Import entries: native JSONL, or Strapi and Sanity documents",
        "tags": [
          "entries"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/components": {
      "get": {
        "operationId": "listComponents",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ComponentView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "every shared component; one answer (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's shared components",
        "tags": [
          "schema"
        ]
      },
      "post": {
        "operationId": "createComponent",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewComponent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ComponentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`component_exists` — a component with this slug exists; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_*` — the definition refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Create a shared component",
        "tags": [
          "schema"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/components/{slug}": {
      "get": {
        "operationId": "getComponent",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the type's or component's slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ComponentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One shared component, `ETag: \"v<version>\"`",
        "tags": [
          "schema"
        ]
      },
      "put": {
        "operationId": "updateComponent",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the type's or component's slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComponentDefinition"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ComponentView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_version` — the component moved; the `ETag` names it now; `migration_in_progress` — a migration runs on a collection that uses it; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`needs_migration` — a using type's stored content wouldn't fit; `details.content_type` names it"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Rewrite a component; every type that uses it gets a new version",
        "tags": [
          "schema"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/content-types": {
      "get": {
        "operationId": "listContentTypes",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TypeVersionView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "every content type; one answer (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's content types, each at its current version",
        "tags": [
          "schema"
        ]
      },
      "post": {
        "operationId": "createContentType",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TypeVersionView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`content_type_exists` — a type with this slug exists; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_*` — the definition refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Create a collection or single type",
        "tags": [
          "schema"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/content-types/{slug}": {
      "delete": {
        "operationId": "deleteContentType",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the type's or component's slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RemovedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_version` — the type moved; the `ETag` names it now; `still_referenced, collection_not_empty, collection_has_history, collection_has_plans, migration_in_progress` — something still depends on the collection; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Delete a collection and every version of its definition",
        "tags": [
          "schema"
        ]
      },
      "get": {
        "operationId": "getContentType",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the type's or component's slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TypeVersionView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One content type at its current version, `ETag: \"v<version>\"`",
        "tags": [
          "schema"
        ]
      },
      "put": {
        "operationId": "updateContentType",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the type's or component's slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TypeDefinition"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TypeVersionView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_version` — the type moved; the `ETag` names it now; `migration_in_progress` — a migration plan is running on the collection; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`needs_migration` — stored content wouldn't fit; `details.entries` names the first 20 in the way"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Write a new version, checked against every stored revision",
        "tags": [
          "schema"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/destinations": {
      "get": {
        "operationId": "listDestinations",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DestinationView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the first 100 destinations; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's delivery destinations",
        "tags": [
          "publishing"
        ]
      },
      "post": {
        "operationId": "createDestination",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDestination"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DestinationView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_kind, invalid_name, invalid_url, private_address and friends` — the destination refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Add a webhook destination (https, public addresses)",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/destinations/{destination}": {
      "put": {
        "operationId": "setDestinationEnabled",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the destination's id",
            "in": "path",
            "name": "destination",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DestinationEnabled"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "the flag changed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Enable or pause a destination",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/events": {
      "get": {
        "operationId": "streamEvents",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/EventStream"
                }
              }
            },
            "description": "`hello`, then `change` frames — always after the commits they report, at most one per distinct hint per pump pass (about 100 ms), so several commits may fold into one (D-180) — `resync` on a missed hint, never a replay"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — past the per-credential stream limit; `Retry-After`; over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — past the per-project or per-server stream limit"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Live change hints as server-sent events",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/jobs": {
      "get": {
        "operationId": "listJobs",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one release's jobs",
            "in": "query",
            "name": "generation",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/JobView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the newest 100 jobs; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Delivery jobs, newest first",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/mcp": {
      "delete": {
        "operationId": "mcpDelete",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the session to end",
            "in": "header",
            "name": "mcp-session-id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`2025-11-25`",
            "in": "header",
            "name": "mcp-protocol-version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "the session ended; its in-flight requests answer `request cancelled`"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — the `Mcp-Session-Id` or `MCP-Protocol-Version` header is missing or wrong"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_required` — a person's credential — a browser session or a personal access token; agents sign in as project API tokens; `origin_not_allowed` — an `Origin` this server does not trust"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such session — or one another token holds, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "apiToken": []
          }
        ],
        "summary": "End the remote-MCP session early",
        "tags": [
          "mcp"
        ]
      },
      "post": {
        "operationId": "mcpPost",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the session `initialize` minted; required on every message after it",
            "in": "header",
            "name": "mcp-session-id",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`2025-11-25`; required once a session exists",
            "in": "header",
            "name": "mcp-protocol-version",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "when present it must be an origin this server trusts, exactly — the transport's DNS-rebinding check",
            "in": "header",
            "name": "origin",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpResponse"
                }
              }
            },
            "description": "the request's own JSON-RPC response; `Mcp-Session-Id` rides on the `initialize` answer only",
            "headers": {
              "Mcp-Session-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "a notification or a stray response — accepted, nothing to answer"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — not acceptable JSON-RPC, or `MCP-Protocol-Version`/`Accept` failed the transport's checks"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_required` — a person's credential — a browser session or a personal access token; agents sign in as project API tokens; `origin_not_allowed` — an `Origin` this server does not trust"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such session — or one another token holds, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — the token's session cap is full; `Retry-After`; over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — the project's or the server's session cap is full"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "apiToken": []
          }
        ],
        "summary": "One JSON-RPC message on the remote-MCP session (D-121)",
        "tags": [
          "mcp"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations": {
      "get": {
        "operationId": "listMigrations",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one collection's plans",
            "in": "query",
            "name": "collection",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`proposed`, `approved`, `running`, `done`, `blocked`, `superseded`, `cancelled`",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/MigrationSummaryView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the newest 100 plans; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's migration plans, newest first",
        "tags": [
          "migrations"
        ]
      },
      "post": {
        "operationId": "createMigration",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPlan"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`ETag: \"sha256:<plan hash>\"` — what `If-Match` binds",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`migration_in_progress` — a migration is running on the collection; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`no_migration_needed` — a plain content-type update could apply"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Plan a schema migration: what the target definition would change",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations/{migration}": {
      "get": {
        "operationId": "getMigration",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the plan's id",
            "in": "path",
            "name": "migration",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One plan, `ETag`'d with its hash",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations/{migration}/apply": {
      "post": {
        "operationId": "applyMigration",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the plan's id",
            "in": "path",
            "name": "migration",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanRunView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "accepted — `state: \"running\"`, never \"done\"",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`plan_moved` — the plan moved; the `ETag` names it now; `plan_not_approved` — only an approved plan can be applied; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Start an approved plan; a worker drives its items",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations/{migration}/approve": {
      "post": {
        "operationId": "approveMigration",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the plan's id",
            "in": "path",
            "name": "migration",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`plan_moved` — the plan moved; the `ETag` names it now; `plan_not_proposed` — only a proposed plan can be approved; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Approve a proposed plan on its hash",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations/{migration}/cancel": {
      "post": {
        "operationId": "cancelMigration",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the plan's id",
            "in": "path",
            "name": "migration",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`cannot_cancel_running, plan_finished` — running plans can't be cancelled; finished ones are done; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Cancel a plan before it runs",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations/{migration}/items": {
      "get": {
        "operationId": "listMigrationItems",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the plan's id",
            "in": "path",
            "name": "migration",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`ok` or `needs_input`",
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "continue past this item",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/MigrationItemView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "A plan's items in entry order",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/migrations/{migration}/items/{entry}": {
      "put": {
        "operationId": "resolveMigrationItem",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the plan's id",
            "in": "path",
            "name": "migration",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewResolution"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ResolvedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`plan_moved` — the plan moved; the `ETag` names it now; `item_not_needs_input, plan_not_open` — the item is resolved, or the plan left its open states; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_*` — the resolution wouldn't validate against the target"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Give a `needs_input` item its resolution document",
        "tags": [
          "migrations"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/permissions": {
      "get": {
        "operationId": "ownPermissions",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OwnView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The caller's own permissions in this environment",
        "tags": [
          "permissions"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/preview-target": {
      "get": {
        "operationId": "getPreviewTarget",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewTargetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "unset fields are null"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_not_allowed` — people open previews; an API token can't"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Where this environment's previews open on the site",
        "tags": [
          "preview"
        ]
      },
      "put": {
        "operationId": "setPreviewTarget",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPreviewTarget"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewTargetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "as stored"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_preview_url` — the address refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Set or clear the site address previews open",
        "tags": [
          "preview"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/previews": {
      "get": {
        "operationId": "listMyPreviews",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "only those of this entry",
            "in": "query",
            "name": "entry",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PreviewLiveView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the newest 100 of the caller's own live previews; `next_cursor` is always null"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_not_allowed` — people open previews; an API token can't"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Your own live previews, newest first",
        "tags": [
          "preview"
        ]
      },
      "post": {
        "operationId": "issuePreview",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPreview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewIssuedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_not_allowed` — people open previews; an API token can't"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`already_published` — the publish request is already live"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_not_configured, invalid_scope, invalid_ttl` — no preview address is set, or the request refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_limit` — the project has 1,000 previews open; over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Open a preview of an entry or a publish request: a one-time code and the site address it fills",
        "tags": [
          "preview"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/previews/{preview}": {
      "delete": {
        "operationId": "revokePreview",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "preview",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "ended"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_not_allowed` — people open previews; an API token can't"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "End one of your previews now: its token answers 401 preview_revoked",
        "tags": [
          "preview"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/previews/{preview}/code": {
      "post": {
        "operationId": "newPreviewCode",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "preview",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewCodeView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_not_allowed` — people open previews; an API token can't"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_not_configured` — no preview address is set"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "A fresh one-time code for one of your live previews (exchanging it replaces the token)",
        "tags": [
          "preview"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/previews/{preview}/renew": {
      "post": {
        "operationId": "renewPreview",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "preview",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewRenewedView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the new end"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`api_token_not_allowed` — people open previews; an API token can't"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Keep one of your live previews open: its time to live again, never past 8 hours from opening",
        "tags": [
          "preview"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/releases": {
      "get": {
        "operationId": "listReleases",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 100",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ReleaseView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "a page of releases, newest first; the current generation is in `Colophon-Generation`",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — `limit` out of range, or a cursor that isn't this list's"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's releases, newest first",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/releases/{generation}": {
      "get": {
        "operationId": "getReceipt",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the release's generation",
            "in": "path",
            "name": "generation",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReceiptView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One release's receipt: deliveries and observations",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/releases/{generation}/rollback": {
      "post": {
        "operationId": "rollbackRelease",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the release's generation",
            "in": "path",
            "name": "generation",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewChangeset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChangesetView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_field` — a rollback takes no `entries` or `unpublish`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Open a changeset restoring what that release published",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/review-stages": {
      "get": {
        "operationId": "listReviewStages",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StageListView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's ordered review stages, `ETag`'d as a list",
        "tags": [
          "publishing"
        ]
      },
      "put": {
        "operationId": "replaceReviewStages",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewStages"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StageListView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_stages` — the list moved; the `ETag` names it now; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`too_many_stages, invalid_stage_key, invalid_stage_name, duplicate_stage` — the list refused, naming the offending position"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Replace the whole stage list in the body's order",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/schedules": {
      "get": {
        "operationId": "listSchedules",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one changeset's schedules",
            "in": "query",
            "name": "changeset",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ScheduleView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "up to 100 pending schedules in time order, then the 20 most recently finished; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Pending schedules, then the latest finished, each with `delayed`",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/schedules/{schedule}": {
      "delete": {
        "operationId": "cancelSchedule",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the schedule's id",
            "in": "path",
            "name": "schedule",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScheduleView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`schedule_ran` — it already ran"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Cancel a pending schedule",
        "tags": [
          "publishing"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/tasks": {
      "get": {
        "operationId": "listTasks",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keep one entry's tasks",
            "in": "query",
            "name": "entry",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "with `entry`, its collection",
            "in": "query",
            "name": "collection",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`me`, `none`, or an identity id",
            "in": "query",
            "name": "assignee",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`open`, `done` or `cancelled`",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TaskView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The environment's editorial tasks",
        "tags": [
          "collaboration"
        ]
      },
      "post": {
        "operationId": "createTask",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewTask"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`revision_not_found, changeset_not_found, assignee_not_member, empty_title, title_too_long` — the task refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Create a task on an entry",
        "tags": [
          "collaboration"
        ]
      }
    },
    "/api/v1/projects/{project}/environments/{environment}/tasks/{task}": {
      "get": {
        "operationId": "getTask",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the task's id",
            "in": "path",
            "name": "task",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "One task, `ETag`'d by its state",
        "tags": [
          "collaboration"
        ]
      },
      "patch": {
        "operationId": "updateTask",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the task's id",
            "in": "path",
            "name": "task",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "16–128 of `A-Z a-z 0-9 - _`, scoped to the actor, operation and environment",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`task_moved` — the task moved; the `ETag` names it now; `idempotency_key_reused` — this `Idempotency-Key` was used before for a different request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_status, nothing_to_change, assignee_not_member` — the change refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — a required `If-Match` or `Idempotency-Key` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "Change a task's title, assignee or status",
        "tags": [
          "collaboration"
        ]
      }
    },
    "/api/v1/projects/{project}/invitations": {
      "get": {
        "operationId": "listInvitations",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/InvitationView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the newest 1,000 invitations; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's pending invitations",
        "tags": [
          "members"
        ]
      },
      "post": {
        "operationId": "createInvitation",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewInvitation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InvitationView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`already_member` — they are already in the project"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_role, invalid_label` — the fields refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Create a single-use invitation link",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects/{project}/invitations/{invitation}": {
      "delete": {
        "operationId": "revokeInvitation",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the invitation's id",
            "in": "path",
            "name": "invitation",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Revoke a pending invitation",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects/{project}/members": {
      "get": {
        "operationId": "listMembers",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/MemberView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "up to 1,000 members, owners first; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's members",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects/{project}/members/{identity}": {
      "delete": {
        "operationId": "removeMember",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the member's identity id",
            "in": "path",
            "name": "identity",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "removed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`last_owner` — the last owner cannot leave"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Remove a member; anyone may leave",
        "tags": [
          "members"
        ]
      },
      "put": {
        "operationId": "changeMemberRole",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the member's identity id",
            "in": "path",
            "name": "identity",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "the role changed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`last_owner` — the last owner cannot be demoted"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_role` — no such role key"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Change a member's role",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects/{project}/roles": {
      "get": {
        "operationId": "listRoles",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/RoleView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "up to 100 roles, the built-in ones first; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's roles, built-in and custom",
        "tags": [
          "roles"
        ]
      },
      "post": {
        "operationId": "createRole",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RoleView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`role_exists` — a role with this key exists"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_key, invalid_name, cannot_grant and friends` — the fields refused, or a permission the role can't offer"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Create a custom role",
        "tags": [
          "roles"
        ]
      }
    },
    "/api/v1/projects/{project}/roles/{role}": {
      "delete": {
        "operationId": "deleteRole",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the role's key",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_role` — the role moved; the `ETag` names it now; `role_in_use, owner_role_fixed, built_in_role` — members hold it, invitations offer it, or it is built in"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — missing `If-Match`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Delete a custom role",
        "tags": [
          "roles"
        ]
      },
      "get": {
        "operationId": "getRole",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the role's key",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RoleView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "One role, `ETag`'d as `\"v<version>\"`",
        "tags": [
          "roles"
        ]
      },
      "put": {
        "operationId": "updateRole",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the role's key",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the resource's `ETag`, exactly as a response carried it",
            "in": "header",
            "name": "if-match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RoleView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`bad_request` — a malformed `If-Match`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`stale_role` — the role moved; the `ETag` names it now; `owner_role_fixed` — the owner role cannot change"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_*` — the fields refused"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`precondition_required` — missing `If-Match`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Replace a role's name, description and permissions",
        "tags": [
          "roles"
        ]
      }
    },
    "/api/v1/projects/{project}/tokens": {
      "get": {
        "operationId": "listTokens",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TokenView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "always `null`: this list answers in one page",
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the newest 200 tokens; no further pages (`next_cursor` is always `null`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The project's API tokens",
        "tags": [
          "tokens"
        ]
      },
      "post": {
        "operationId": "createToken",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TokenView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission, cannot_grant, not_for_tokens` — `tokens.manage` needed, or a permission the creator lacks"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_expiry, permissions_required, too_many_tokens and friends` — the fields refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Create a project API token; `secret` is shown only here",
        "tags": [
          "tokens"
        ]
      }
    },
    "/api/v1/projects/{project}/tokens/{token}": {
      "delete": {
        "operationId": "revokeToken",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the token's id",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TokenView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Revoke a project API token — the exact kill switch",
        "tags": [
          "tokens"
        ]
      },
      "get": {
        "operationId": "getToken",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the token's id",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TokenView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "One project API token, its limits and its usage",
        "tags": [
          "tokens"
        ]
      },
      "patch": {
        "operationId": "updateToken",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the token's id",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TokenView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`missing_permission and friends` — signed in, but the role does not allow this"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_limit, limits_empty, nothing_to_change` — the fields refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Replace (`{\"limits\": {…}}`) or remove (`null`) a token's budget limits",
        "tags": [
          "tokens"
        ]
      }
    },
    "/api/v1/rich-text/validate": {
      "post": {
        "operationId": "validateRichText",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RichTextDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RichTextVerdict"
                }
              }
            },
            "description": "the canonical document and its measurements; nothing is stored"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`validation_failed` — the document was refused; `details` name the rejection code and JSON Pointer"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          },
          {
            "apiToken": []
          }
        ],
        "summary": "The server's verdict on a `colophon/rich-text` v1 document",
        "tags": [
          "rich-text"
        ]
      }
    },
    "/api/v1/setup": {
      "post": {
        "operationId": "claimSetup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SetUp"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`already_set_up` — an administrator exists already"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`setup_code_invalid` — wrong, used or expired, alike"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — too many attempts; `Retry-After`; over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Claim the first administrator with the one-time setup code",
        "tags": [
          "setup"
        ]
      }
    },
    "/audience/v1/{project}/magic-link": {
      "post": {
        "operationId": "audienceMagicLink",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagicLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "the same answer whether or not the email has an account; a configured mail provider emails the link, `dev_link` only with COLOPHON_DEV_MAIL=1"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_return_to` — not an absolute http(s) URL; `return_to_not_allowed` — its origin isn't one the project lists (`PUT {P}/audience/origins`)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — this address's last link is under a minute old and unused, or the project is at its per-minute ceiling; `Retry-After` says when; over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Ask for a single-use sign-in link by email",
        "tags": [
          "audience"
        ]
      }
    },
    "/audience/v1/{project}/magic-link/{token}": {
      "post": {
        "operationId": "audienceMagicLinkSignIn",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the token's id",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceSession"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the session's `Set-Cookie` pair; an unknown email is created in the open self-assign role",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`magic_link_invalid` — used, expired or unknown; `no_open_role` — no role a new account may take"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Sign in with the token a magic link carried",
        "tags": [
          "audience"
        ]
      }
    },
    "/audience/v1/{project}/me": {
      "get": {
        "operationId": "audienceMe",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteUser"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "audienceCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "The site user the session belongs to",
        "tags": [
          "audience"
        ]
      }
    },
    "/audience/v1/{project}/signin": {
      "post": {
        "operationId": "audienceSignIn",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudienceSignIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceSession"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the session's `Set-Cookie` pair",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`sign_in_failed` — a wrong password, a missing account and an (account, address) paused after eight misses, alike"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`account_disabled` — staff disabled the account"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`password_too_long` — longer than any account's (512 bytes)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — password work at its bound; `Retry-After` says when"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Sign a site user in with email and password",
        "tags": [
          "audience"
        ]
      }
    },
    "/audience/v1/{project}/signout": {
      "post": {
        "operationId": "audienceSignOut",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the session's CSRF token — required when it arrives as the `colophon_audience` cookie, unneeded on `Authorization: Bearer`",
            "in": "header",
            "name": "x-csrf-token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "the cleared `Set-Cookie` pair; signing out twice answers the same",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`csrf_token_invalid` — a cookie-carried session asked for the CSRF header"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "End the site session and clear its cookies",
        "tags": [
          "audience"
        ]
      }
    },
    "/audience/v1/{project}/signup": {
      "post": {
        "operationId": "audienceSignUp",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudienceSignUp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AudienceSession"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "the session's `Set-Cookie` pair: `colophon_audience` and its CSRF sibling",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`email_taken` — an account with this email exists; `audience_full` — the project is at its site-user bound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_email, weak_password, invalid_role, unavailable_role` — the fields refused — a role not open to signup among them"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Make a site-user account and start its session",
        "tags": [
          "audience"
        ]
      }
    },
    "/auth/callback": {
      "get": {
        "operationId": "callback",
        "parameters": [
          {
            "description": "the authorization code",
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the state this flow started with",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the provider's refusal",
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "redirect back into the Studio",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`sign_in_failed` — sign-in failed, was cancelled, or its state expired or was already used"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "The provider's redirect back: exchanges the code, sets the session cookies",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/device": {
      "post": {
        "operationId": "deviceStart",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeviceStarted"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "created"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Start device sign-in (`colophon login`)",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/device/approve": {
      "post": {
        "operationId": "deviceApprove",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceApprove"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "the device may now poll for its token"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`browser_session_required` — not a browser session"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Approve a device sign-in as the signed-in person",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/device/token": {
      "post": {
        "operationId": "deviceToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevicePoll"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DevicePolled"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`pending` until a browser approves, `approved` with the token"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Poll for the device flow's access token",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/device/{code}": {
      "get": {
        "operationId": "deviceStatus",
        "parameters": [
          {
            "description": "the user code the device showed",
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DevicePending"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "What is asking to sign in, for the approval page",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/login": {
      "get": {
        "operationId": "login",
        "parameters": [
          {
            "description": "where to send the browser afterwards",
            "in": "query",
            "name": "return_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`create` opens the provider's sign-up form when it offers one",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "redirect to the identity provider",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — sign-in is not configured on this server"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Start OpenID Connect sign-in: redirect to the provider",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/logout": {
      "post": {
        "operationId": "logout",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SignedOut"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "for a browser session; a bearer credential answers 204"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "End the session or revoke the bearer credential",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/providers": {
      "get": {
        "operationId": "authProviders",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AuthProviders"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "never cached: it is configuration"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "What sign-in methods this server offers (whether an external provider is configured)",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/signin": {
      "post": {
        "operationId": "signIn",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordSignIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "the session's `Set-Cookie` pair",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`sign_in_failed` — a wrong password, a missing account and an (account, address) paused after eight misses, alike"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`password_too_long` — longer than any account's (512 bytes)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — password work at its bound; `Retry-After` says when"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Sign in with email and password",
        "tags": [
          "auth"
        ]
      }
    },
    "/auth/signup": {
      "post": {
        "operationId": "signUp",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignUp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "the session's `Set-Cookie` pair",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`email_taken` — an account with this email exists"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_email, weak_password` — the fields refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-credential or per-address limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Make an email-and-password account and start its session",
        "tags": [
          "auth"
        ]
      }
    },
    "/content/v1/{project}/{environment}/events": {
      "get": {
        "operationId": "streamDeliveryEvents",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/EventStream"
                }
              }
            },
            "description": "`hello`, then a `change` per release burst; no ids or content, so a reader only learns to re-read"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — this client address already holds its public streams (D-159); `Retry-After` says when; over the per-address delivery limit; `Retry-After`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — the project's or the server's public stream budget is full"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Live change hints for published content, anonymously",
        "tags": [
          "delivery"
        ]
      }
    },
    "/content/v1/{project}/{environment}/{collection}": {
      "get": {
        "operationId": "deliveryList",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pin the read to one release generation",
            "in": "query",
            "name": "generation",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`Bearer <token>` — a site user's session; the read gains its audience role, and the answer is marked `private`. Without it the read is anonymous",
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PublishedEntryView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "a matching `If-None-Match` gets 304",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`gone` — the collection was published and has been taken down"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-address delivery limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "The published entries of a collection at a generation",
        "tags": [
          "delivery"
        ]
      }
    },
    "/content/v1/{project}/{environment}/{collection}/query": {
      "post": {
        "operationId": "deliveryQuery",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pin the read to one release generation",
            "in": "query",
            "name": "generation",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`Bearer <token>` — a site user's session; the read gains its audience role, and the answer is marked `private`. Without it the read is anonymous",
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryQueryPage"
                }
              }
            },
            "description": "a matching `If-None-Match` gets 304",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`invalid_cursor, invalid_*, too_large` — the document or cursor refused"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-address delivery limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Run the bounded query language over the published projection",
        "tags": [
          "delivery"
        ]
      }
    },
    "/content/v1/{project}/{environment}/{collection}/{entry}": {
      "get": {
        "operationId": "deliveryGet",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "pin the read to one release generation",
            "in": "query",
            "name": "generation",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "`Bearer <token>` — a site user's session; the read gains its audience role, and the answer is marked `private`. Without it the read is anonymous",
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublishedEntryView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "a matching `If-None-Match` gets 304",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`gone` — the entry was published and has been taken down"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`rate_limited` — over the per-address delivery limit; `Retry-After`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "One published entry at a generation",
        "tags": [
          "delivery"
        ]
      }
    },
    "/livez": {
      "get": {
        "operationId": "liveness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Liveness"
                }
              }
            },
            "description": "`Cache-Control: no-store`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "The process responds",
        "tags": [
          "meta"
        ]
      }
    },
    "/me": {
      "get": {
        "operationId": "me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ok"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Who the caller is, and every project they belong to",
        "tags": [
          "auth"
        ]
      }
    },
    "/media/v1/{project}/{environment}/{asset}": {
      "get": {
        "operationId": "serveAsset",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "the stored `Content-Type`; `max-age=60, must-revalidate` with the version's `ETag` (a replace or delete moves this address, D-157) — a matching `If-None-Match` answers 304; a version's sha address is `immutable`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — the object store is not configured"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "The asset's current version's verified bytes, publicly",
        "tags": [
          "media"
        ]
      }
    },
    "/media/v1/{project}/{environment}/{asset}/{name}": {
      "get": {
        "operationId": "serveRendition",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "a rendition name the worker wrote, such as `w320`; or an audience role's",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "the stored `Content-Type`; a sha (a pinned version) is `immutable`, a rendition name of the current version revalidates after 60 s (D-157)"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — the object store is not configured"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "A rendition the worker wrote — or, when `name` is a 64-hex sha, that pinned version's original",
        "tags": [
          "media"
        ]
      }
    },
    "/media/v1/{project}/{environment}/{asset}/{sha}/{name}": {
      "get": {
        "operationId": "serveVersionedRendition",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the asset's id",
            "in": "path",
            "name": "asset",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the path parameter",
            "in": "path",
            "name": "sha",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "a rendition name the worker wrote, such as `w320`; or an audience role's",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "the stored `Content-Type`; caches forever"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — the object store is not configured"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "A rendition of a pinned version: the worker wrote it under the version's key",
        "tags": [
          "media"
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapiDocument",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiDocument"
                }
              }
            },
            "description": "the document; `ETag`'d for conditional requests",
            "headers": {
              "ETag": {
                "description": "the document's own hash",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "unchanged since the caller's `If-None-Match`"
          }
        },
        "security": [],
        "summary": "This OpenAPI document",
        "tags": [
          "meta"
        ]
      }
    },
    "/preview/v1/{project}/{environment}/exchange": {
      "post": {
        "operationId": "previewExchange",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewExchange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewTokenView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`private, no-store`; a code works once"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_not_found` — unknown, used and expired codes all answer alike"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Exchange a preview address's one-time code for a bearer token",
        "tags": [
          "preview"
        ]
      }
    },
    "/preview/v1/{project}/{environment}/session": {
      "get": {
        "operationId": "previewSession",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewSessionView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`private, no-store`, `noindex`",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "Colophon-Preview": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked; no token, an ended one, or its issuer can no longer read here"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_stale` — the publish request changed after the preview opened"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_published` — the publish request is live; `Colophon-Generation` names its release"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_reads_latest, preview_depth` — `?generation=` or `depth` asked for"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — preview read capacity is full; `Retry-After` says when"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "previewToken": []
          }
        ],
        "summary": "The preview token's scope and end, for the site's preview banner",
        "tags": [
          "preview"
        ]
      }
    },
    "/preview/v1/{project}/{environment}/{collection}": {
      "get": {
        "operationId": "previewList",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size: 1–100, default 20",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PreviewEntryView"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "pass back in the operation's cursor parameter for the next page; `null` on the last page",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`/content/v1`'s shape; `private, no-store`, `noindex`, never `ETag`",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "Colophon-Preview": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked; no token, an ended one, or its issuer can no longer read here"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_stale` — the publish request changed after the preview opened"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_published` — the publish request is live; `Colophon-Generation` names its release"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_reads_latest, preview_depth` — `?generation=` or `depth` asked for"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — preview read capacity is full; `Retry-After` says when"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "previewToken": []
          }
        ],
        "summary": "A collection as the preview sees it: the scope's drafts over the latest release",
        "tags": [
          "preview"
        ]
      }
    },
    "/preview/v1/{project}/{environment}/{collection}/query": {
      "post": {
        "operationId": "previewQuery",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the `next_cursor` a previous page answered",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewQueryPage"
                }
              }
            },
            "description": "`/content/v1`'s query page; `depth` isn't served in preview yet (422 `preview_depth`)",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "Colophon-Preview": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked; no token, an ended one, or its issuer can no longer read here"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_stale` — the publish request changed after the preview opened"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_published` — the publish request is live; `Colophon-Generation` names its release"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_reads_latest, preview_depth` — `?generation=` or `depth` asked for"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — preview read capacity is full; `Retry-After` says when"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "previewToken": []
          }
        ],
        "summary": "Run the bounded query language over the preview's overlay",
        "tags": [
          "preview"
        ]
      }
    },
    "/preview/v1/{project}/{environment}/{collection}/{entry}": {
      "get": {
        "operationId": "previewGet",
        "parameters": [
          {
            "description": "the project's id",
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "the environment's slug, such as `production`",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the collection's slug",
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the entry's id",
            "in": "path",
            "name": "entry",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewEntryView"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "`/content/v1`'s shape; `private, no-store`, `noindex`, never `ETag`",
            "headers": {
              "Colophon-Generation": {
                "schema": {
                  "type": "string"
                }
              },
              "Colophon-Preview": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unauthorized` — not signed in, the credential is invalid, or the token was revoked; no token, an ended one, or its issuer can no longer read here"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`not_found` — no such resource — or one the caller may not see, which looks the same"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_stale` — the publish request changed after the preview opened"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_published` — the publish request is live; `Colophon-Generation` names its release"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`preview_reads_latest, preview_depth` — `?generation=` or `depth` asked for"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`unavailable` — preview read capacity is full; `Retry-After` says when"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [
          {
            "previewToken": []
          }
        ],
        "summary": "One entry as the preview sees it",
        "tags": [
          "preview"
        ]
      }
    },
    "/readyz": {
      "get": {
        "operationId": "readiness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadinessReport"
                }
              }
            },
            "description": "`ready` or `degraded`; `Cache-Control: no-store`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`starting`, `not_ready` or `draining` — the same report, not an error envelope"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "Whether this role can safely serve now",
        "tags": [
          "meta"
        ]
      }
    },
    "/version": {
      "get": {
        "operationId": "serverVersion",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionReport"
                }
              }
            },
            "description": "fields may be added, never removed or renamed; `Cache-Control: no-store`"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "any other failure, in the one error envelope"
          }
        },
        "security": [],
        "summary": "The release this server is and the API versions it serves",
        "tags": [
          "meta"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "health, version and this document — unauthenticated",
      "name": "meta"
    },
    {
      "description": "sign-in, sessions, the device flow and `/me`",
      "name": "auth"
    },
    {
      "description": "the one-time first-administrator claim",
      "name": "setup"
    },
    {
      "description": "project lifecycle",
      "name": "projects"
    },
    {
      "description": "members and single-use invitations",
      "name": "members"
    },
    {
      "description": "roles as data, and the caller's own permissions",
      "name": "roles"
    },
    {
      "description": "the caller's own permissions in an environment",
      "name": "permissions"
    },
    {
      "description": "project API tokens and their kill switch",
      "name": "tokens"
    },
    {
      "description": "the append-only audit log",
      "name": "audit"
    },
    {
      "description": "live change hints over server-sent events",
      "name": "events"
    },
    {
      "description": "the remote-MCP endpoint — the agent protocol over HTTP (D-121)",
      "name": "mcp"
    },
    {
      "description": "the project's site visitors: public signup and sessions, staff-managed roles and users (D-137)",
      "name": "audience"
    },
    {
      "description": "content types, shared components, migration plans",
      "name": "schema"
    },
    {
      "description": "schema migration plans and their items",
      "name": "migrations"
    },
    {
      "description": "drafts, revisions, locales, queries, transfer",
      "name": "entries"
    },
    {
      "description": "comments and editorial tasks",
      "name": "collaboration"
    },
    {
      "description": "changesets, reviews, stages, schedules, releases, receipts, destinations, jobs",
      "name": "publishing"
    },
    {
      "description": "uploads, verification and asset deletion",
      "name": "assets"
    },
    {
      "description": "the `colophon/rich-text` v1 validator",
      "name": "rich-text"
    },
    {
      "description": "the published projection, publicly, at a generation",
      "name": "delivery"
    },
    {
      "description": "verified asset bytes, publicly: sha addresses immutable, current-version addresses revalidating",
      "name": "media"
    },
    {
      "description": "drafts on the editor's own site: scoped, short-lived grants and the `/preview/v1` reads (never cached)",
      "name": "preview"
    }
  ]
}
