{
  "openapi": "3.1.0",
  "info": {
    "title": "Ketvia Kits Web API",
    "version": "1.0.0",
    "description": "The public Web API for Ketvia Kits. Authenticate with `Authorization: Bearer kbot_…` (bot token) or `Bearer kusr_…` (user token); the workspace is implied by the token. JSON in and out. Errors are `{code, message, correlationId}`. Lists take `cursor` and `limit` and return `nextCursor`."
  },
  "servers": [
    {
      "url": "https://api.ketvia.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Auth"
    },
    {
      "name": "Conversations"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Reactions"
    },
    {
      "name": "Files"
    },
    {
      "name": "Users"
    },
    {
      "name": "Runs"
    },
    {
      "name": "Installation"
    },
    {
      "name": "Incoming webhooks"
    }
  ],
  "paths": {
    "/auth/test": {
      "get": {
        "operationId": "authTest",
        "summary": "Check a token",
        "description": "Introspects the calling token: installation, workspace, bot or user, and effective scopes.",
        "tags": [
          "Auth"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": null,
        "x-ketvia-rate-limit": "read",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/rotate": {
      "post": {
        "operationId": "authRotate",
        "summary": "Rotate a bot token",
        "description": "Issues a new bot token. The calling token keeps working for 24 hours, then expires. A token can be rotated once.",
        "tags": [
          "Auth"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot"
        ],
        "x-ketvia-scope": null,
        "x-ketvia-rate-limit": "write",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (for example an `Idempotency-Key` reused with different content).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/kit.access": {
      "post": {
        "operationId": "kitAccess",
        "summary": "Exchange an authorization code or refresh token",
        "description": "Called by the Kit backend with its client credentials. An authorization code from the install redirect becomes a bot token (or a user token plus refresh token, with PKCE). Refresh tokens are single-use; reusing one revokes the whole grant.",
        "tags": [
          "Auth"
        ],
        "security": [],
        "x-ketvia-token-types": [
          "client"
        ],
        "x-ketvia-scope": null,
        "x-ketvia-rate-limit": "none",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KitAccessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KitAccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/conversations": {
      "get": {
        "operationId": "conversationsList",
        "summary": "List conversations",
        "description": "Bot tokens: the channels the Kit bot was added to. User tokens: the conversations the member belongs to.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "conversations:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/conversations/{id}": {
      "get": {
        "operationId": "conversationsGet",
        "summary": "Get a conversation",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "conversations:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/conversations/{id}/members": {
      "get": {
        "operationId": "conversationsMembers",
        "summary": "List conversation members",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "conversations:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/conversations/{id}/messages": {
      "get": {
        "operationId": "conversationsHistory",
        "summary": "Read message history",
        "description": "Top-level messages and replies, newest first. Private assistant results are never included.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "messages:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messages/{id}": {
      "get": {
        "operationId": "messagesGet",
        "summary": "Get a message",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "messages:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "messagesUpdate",
        "summary": "Edit an own message",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "messages:write",
        "x-ketvia-rate-limit": "write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "messagesDelete",
        "summary": "Delete an own message",
        "description": "Deleting is idempotent: deleting a deleted message returns the tombstone.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "messages:write",
        "x-ketvia-rate-limit": "write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messages/{id}/replies": {
      "get": {
        "operationId": "messagesReplies",
        "summary": "List thread replies",
        "description": "Replies to a top-level message, newest first.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "messages:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messages": {
      "post": {
        "operationId": "messagesPost",
        "summary": "Post a message",
        "description": "Bot tokens post as the Kit bot into channels it was added to; user tokens post as the member. With an `Idempotency-Key` a retry returns the stored message (200) instead of posting twice; the same key with different content is a 409. Limited to 1 message per second per conversation (burst 5).",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "messages:write",
        "x-ketvia-rate-limit": "write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Makes a retry safe for 24 hours: the same key returns the stored result; the same key with different content is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (for example an `Idempotency-Key` reused with different content).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reactions": {
      "post": {
        "operationId": "reactionsAdd",
        "summary": "Add a reaction",
        "description": "User tokens only in v1 (Kit bots cannot react yet). Idempotent.",
        "tags": [
          "Reactions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "reactions:write",
        "x-ketvia-rate-limit": "write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "reactionsRemove",
        "summary": "Remove a reaction",
        "description": "User tokens only in v1. Idempotent.",
        "tags": [
          "Reactions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "reactions:write",
        "x-ketvia-rate-limit": "write",
        "parameters": [
          {
            "name": "messageId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "reaction",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "thumbs_up",
                "heart",
                "laugh",
                "celebrate",
                "eyes",
                "thinking",
                "thanks",
                "check"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/files": {
      "post": {
        "operationId": "filesUpload",
        "summary": "Upload a file",
        "description": "JSON with base64 content (size and type limits of the files module). User tokens only in v1 (Kit bots cannot upload yet).",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "files:write",
        "x-ketvia-rate-limit": "files",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadFileRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/files/{id}": {
      "get": {
        "operationId": "filesGet",
        "summary": "Get file metadata",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "files:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/files/{id}/content": {
      "get": {
        "operationId": "filesContent",
        "summary": "Download file content",
        "description": "The raw bytes with the stored content type.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "files:read",
        "x-ketvia-rate-limit": "files",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file content (`Content-Type: application/octet-stream`; the stored type is in `X-Ketvia-Content-Type`).",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "get": {
        "operationId": "usersList",
        "summary": "List workspace members",
        "description": "Active members. Email addresses only with `users:read.email`.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "users:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/users/me": {
      "get": {
        "operationId": "usersMe",
        "summary": "Who am I",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": null,
        "x-ketvia-rate-limit": "read",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "operationId": "usersGet",
        "summary": "Get a member",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": "users:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/runs/{id}": {
      "get": {
        "operationId": "runsGet",
        "summary": "Get an assistant run",
        "description": "User tokens only. Private runs are visible to their requester only.",
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "user"
        ],
        "x-ketvia-scope": "runs:read",
        "x-ketvia-rate-limit": "read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/installation": {
      "get": {
        "operationId": "installationGet",
        "summary": "Describe this installation",
        "description": "The Kit version, workspace, Kit bot, effective scopes and channels.",
        "tags": [
          "Installation"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-ketvia-token-types": [
          "bot",
          "user"
        ],
        "x-ketvia-scope": null,
        "x-ketvia-rate-limit": "read",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/{installationId}/{webhookId}/{secret}": {
      "post": {
        "operationId": "incomingWebhook",
        "summary": "Post through an incoming webhook",
        "description": "The webhook URL is the credential: keep it secret. Posts as the Kit bot into the webhook's channel; the body cannot choose the channel, author or icon, and interactive elements are removed. Unknown, revoked and uninstalled webhooks all answer 404. 1 request per second per webhook (burst 5), at most 64 KB.",
        "tags": [
          "Incoming webhooks"
        ],
        "servers": [
          {
            "url": "https://hooks.ketvia.com"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "secret",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncomingWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Posted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Disabled (the channel was archived or the Kit bot was removed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A bot token (`kbot_…`) or a user token (`kusr_…`)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "validation_error",
              "unauthenticated",
              "invalid_credentials",
              "csrf_rejected",
              "forbidden",
              "not_found",
              "conflict",
              "idempotency_conflict",
              "send_context_changed",
              "workspace_context_changed",
              "email_taken",
              "name_taken",
              "slug_taken",
              "workspace_login_unavailable",
              "invalid_invitation",
              "rate_limited",
              "payload_too_large",
              "unsupported_media_type",
              "internal_error",
              "invalid_token",
              "missing_scope",
              "gone"
            ]
          },
          "message": {
            "type": "string"
          },
          "correlationId": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "correlationId"
        ],
        "additionalProperties": false
      },
      "Block": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "header"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 150
              }
            },
            "required": [
              "type",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "section"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "text": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "plain",
                      "mrkdwn"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  }
                },
                "required": [
                  "type",
                  "text"
                ],
                "additionalProperties": false
              },
              "accessory": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "actionId": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                      },
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 75
                      },
                      "value": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "style": {
                        "default": "default",
                        "type": "string",
                        "enum": [
                          "default",
                          "primary",
                          "danger"
                        ]
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      "confirm": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "confirm": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 30
                          },
                          "deny": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 30
                          }
                        },
                        "required": [
                          "title",
                          "text",
                          "confirm",
                          "deny"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "actionId",
                      "text",
                      "style"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "static_select"
                      },
                      "actionId": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                      },
                      "placeholder": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 150
                      },
                      "options": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 75
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 150
                            }
                          },
                          "required": [
                            "text",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "type",
                      "actionId",
                      "placeholder",
                      "options"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "fileId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "alt": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    },
                    "required": [
                      "type",
                      "fileId",
                      "alt"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "required": [
              "type",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "fields"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "fields": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "label",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "fields"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "metrics"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "items": {
                "minItems": 1,
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "value": {
                      "type": "number"
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "integer",
                        "decimal",
                        "currency",
                        "percent"
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "primary": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "value",
                    "primary"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "items"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "table"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "columns": {
                "minItems": 1,
                "maxItems": 6,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "align": {
                      "default": "left",
                      "type": "string",
                      "enum": [
                        "left",
                        "center",
                        "right"
                      ]
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "align"
                  ],
                  "additionalProperties": false
                }
              },
              "rows": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "maxLength": 200
                  }
                }
              }
            },
            "required": [
              "type",
              "columns",
              "rows"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "list"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "items": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 150
                    },
                    "subtitle": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    }
                  },
                  "required": [
                    "title"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "items"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "context"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "elements": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "plain",
                        "mrkdwn"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 3000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "elements"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "divider"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "image"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "fileId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "alt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "type",
              "fileId",
              "alt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "actions"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "elements": {
                "minItems": 1,
                "maxItems": 5,
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "button"
                        },
                        "actionId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 75
                        },
                        "value": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "style": {
                          "default": "default",
                          "type": "string",
                          "enum": [
                            "default",
                            "primary",
                            "danger"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "confirm": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "confirm": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 30
                            },
                            "deny": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 30
                            }
                          },
                          "required": [
                            "title",
                            "text",
                            "confirm",
                            "deny"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "type",
                        "actionId",
                        "text",
                        "style"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "static_select"
                        },
                        "actionId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                        },
                        "placeholder": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 150
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 75
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              }
                            },
                            "required": [
                              "text",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "type",
                        "actionId",
                        "placeholder",
                        "options"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "overflow"
                        },
                        "actionId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 75
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              }
                            },
                            "required": [
                              "text",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "type",
                        "actionId",
                        "options"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            },
            "required": [
              "type",
              "elements"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "author": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "user",
                  "bot"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind",
              "id"
            ],
            "additionalProperties": false
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "blocks": {
            "anyOf": [
              {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Block"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "threadParentId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "editedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "conversationId",
          "author",
          "text",
          "blocks",
          "threadParentId",
          "createdAt",
          "editedAt",
          "deletedAt"
        ],
        "additionalProperties": false
      },
      "Conversation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "channel",
              "dm",
              "group"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "archived": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "kind",
          "visibility",
          "name",
          "topic",
          "archived",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "displayName": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member",
              "guest"
            ]
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayName",
          "role"
        ],
        "additionalProperties": false
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "uploadedByUserId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "conversationId",
          "name",
          "mimeType",
          "sizeBytes",
          "uploadedByUserId",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "Installation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kit": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{1,39}$"
              },
              "version": {
                "type": "string",
                "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "slug",
              "version",
              "displayName"
            ],
            "additionalProperties": false
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "botId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "type": "object",
            "properties": {
              "bot": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "conversations:read",
                    "messages:read",
                    "messages:write",
                    "messages:write.ephemeral",
                    "reactions:read",
                    "reactions:write",
                    "files:read",
                    "files:write",
                    "users:read",
                    "users:read.email",
                    "commands",
                    "incoming-webhook",
                    "assistant:tools",
                    "runs:read"
                  ]
                }
              },
              "user": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "conversations:read",
                    "messages:read",
                    "messages:write",
                    "messages:write.ephemeral",
                    "reactions:read",
                    "reactions:write",
                    "files:read",
                    "files:write",
                    "users:read",
                    "users:read.email",
                    "commands",
                    "incoming-webhook",
                    "assistant:tools",
                    "runs:read"
                  ]
                }
              }
            },
            "required": [
              "bot",
              "user"
            ],
            "additionalProperties": false
          },
          "channelIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "modelDataPolicy": {
            "type": "string",
            "const": "none"
          }
        },
        "required": [
          "id",
          "kit",
          "workspace",
          "botId",
          "scopes",
          "channelIds",
          "modelDataPolicy"
        ],
        "additionalProperties": false
      },
      "Run": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "botId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "requesterUserId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "audience": {
            "type": "string",
            "enum": [
              "channel",
              "private"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "received",
              "queued",
              "connecting",
              "awaiting_approval",
              "succeeded",
              "failed",
              "cancelled",
              "expired",
              "reconciliation_required"
            ]
          },
          "question": {
            "type": "string",
            "maxLength": 8000
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "finishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "durationMs": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string",
                  "enum": [
                    "received",
                    "queued",
                    "connecting",
                    "awaiting_approval",
                    "succeeded",
                    "failed",
                    "cancelled",
                    "expired",
                    "reconciliation_required"
                  ]
                },
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "state",
                "at"
              ],
              "additionalProperties": false
            }
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "card": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "runId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "botId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "audience": {
                        "type": "string",
                        "enum": [
                          "channel",
                          "private"
                        ]
                      },
                      "requesterUserId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "synthetic": {
                            "type": "boolean"
                          },
                          "kitSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "official": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "label",
                          "synthetic"
                        ],
                        "additionalProperties": false
                      },
                      "localDate": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "timezone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "fetchedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "stale": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cachedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "cachedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revoked": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "body": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Block"
                        }
                      },
                      "kind": {
                        "type": "string",
                        "const": "ok"
                      },
                      "metrics": {
                        "minItems": 1,
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 60
                            },
                            "value": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "primary": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "label",
                            "value",
                            "primary"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "definition": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "botId",
                      "audience",
                      "requesterUserId",
                      "title",
                      "headline",
                      "source",
                      "localDate",
                      "timezone",
                      "fetchedAt",
                      "stale",
                      "revoked",
                      "createdAt",
                      "kind",
                      "metrics",
                      "definition"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "runId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "botId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "audience": {
                        "type": "string",
                        "enum": [
                          "channel",
                          "private"
                        ]
                      },
                      "requesterUserId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "synthetic": {
                            "type": "boolean"
                          },
                          "kitSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "official": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "label",
                          "synthetic"
                        ],
                        "additionalProperties": false
                      },
                      "localDate": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "timezone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "fetchedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "stale": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cachedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "cachedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revoked": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "body": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Block"
                        }
                      },
                      "kind": {
                        "type": "string",
                        "const": "zero"
                      },
                      "metrics": {
                        "minItems": 1,
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 60
                            },
                            "value": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "primary": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "label",
                            "value",
                            "primary"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "definition": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "botId",
                      "audience",
                      "requesterUserId",
                      "title",
                      "headline",
                      "source",
                      "localDate",
                      "timezone",
                      "fetchedAt",
                      "stale",
                      "revoked",
                      "createdAt",
                      "kind",
                      "metrics",
                      "definition"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "runId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "botId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "audience": {
                        "type": "string",
                        "enum": [
                          "channel",
                          "private"
                        ]
                      },
                      "requesterUserId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "synthetic": {
                            "type": "boolean"
                          },
                          "kitSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "official": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "label",
                          "synthetic"
                        ],
                        "additionalProperties": false
                      },
                      "localDate": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "timezone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "fetchedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "stale": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cachedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "cachedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revoked": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "body": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Block"
                        }
                      },
                      "kind": {
                        "type": "string",
                        "const": "no-data"
                      },
                      "metricLabels": {
                        "minItems": 1,
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        }
                      },
                      "definition": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "botId",
                      "audience",
                      "requesterUserId",
                      "title",
                      "headline",
                      "source",
                      "localDate",
                      "timezone",
                      "fetchedAt",
                      "stale",
                      "revoked",
                      "createdAt",
                      "kind",
                      "metricLabels",
                      "definition"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "runId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "botId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "audience": {
                        "type": "string",
                        "enum": [
                          "channel",
                          "private"
                        ]
                      },
                      "requesterUserId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "synthetic": {
                            "type": "boolean"
                          },
                          "kitSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "official": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "label",
                          "synthetic"
                        ],
                        "additionalProperties": false
                      },
                      "localDate": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "timezone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "fetchedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "stale": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cachedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "cachedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revoked": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "body": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Block"
                        }
                      },
                      "kind": {
                        "type": "string",
                        "const": "unavailable"
                      },
                      "errorCode": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "attempts": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "failedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "botId",
                      "audience",
                      "requesterUserId",
                      "title",
                      "headline",
                      "source",
                      "localDate",
                      "timezone",
                      "fetchedAt",
                      "stale",
                      "revoked",
                      "createdAt",
                      "kind",
                      "errorCode",
                      "attempts",
                      "failedAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "runId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "botId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "audience": {
                        "type": "string",
                        "enum": [
                          "channel",
                          "private"
                        ]
                      },
                      "requesterUserId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "synthetic": {
                            "type": "boolean"
                          },
                          "kitSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "official": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "label",
                          "synthetic"
                        ],
                        "additionalProperties": false
                      },
                      "localDate": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "timezone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "fetchedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "stale": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cachedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "cachedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revoked": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "body": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Block"
                        }
                      },
                      "kind": {
                        "type": "string",
                        "const": "forbidden"
                      }
                    },
                    "required": [
                      "id",
                      "runId",
                      "botId",
                      "audience",
                      "requesterUserId",
                      "title",
                      "headline",
                      "source",
                      "localDate",
                      "timezone",
                      "fetchedAt",
                      "stale",
                      "revoked",
                      "createdAt",
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "sharePolicy": {
            "type": "string",
            "enum": [
              "private_only",
              "channel_allowed"
            ]
          },
          "modelText": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "correlationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "toolCalls": {
            "maxItems": 12,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "displayName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "connectionName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "synthetic": {
                  "type": "boolean"
                },
                "grantVersion": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "durationMs": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "running",
                    "succeeded",
                    "failed"
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "tool",
                "connectionName",
                "synthetic",
                "grantVersion",
                "startedAt",
                "durationMs",
                "state",
                "errorCode"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "botId",
          "conversationId",
          "requesterUserId",
          "audience",
          "state",
          "question",
          "createdAt",
          "updatedAt",
          "finishedAt",
          "durationMs",
          "steps",
          "errorCode",
          "attempts",
          "card"
        ],
        "additionalProperties": false
      },
      "AuthTestResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "tokenType": {
            "type": "string",
            "enum": [
              "bot",
              "user"
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "installationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kitSlug": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,39}$"
          },
          "botId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "userId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "conversations:read",
                "messages:read",
                "messages:write",
                "messages:write.ephemeral",
                "reactions:read",
                "reactions:write",
                "files:read",
                "files:write",
                "users:read",
                "users:read.email",
                "commands",
                "incoming-webhook",
                "assistant:tools",
                "runs:read"
              ]
            }
          }
        },
        "required": [
          "ok",
          "tokenType",
          "workspaceId",
          "installationId",
          "kitSlug",
          "botId",
          "userId",
          "scopes"
        ],
        "additionalProperties": false
      },
      "RotateResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "pattern": "^kbot_[A-Za-z0-9_-]{43}$"
          },
          "previousTokenExpiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "token",
          "previousTokenExpiresAt"
        ],
        "additionalProperties": false
      },
      "KitAccessResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "tokenType": {
                "type": "string",
                "const": "bot"
              },
              "accessToken": {
                "type": "string",
                "pattern": "^kbot_[A-Za-z0-9_-]{43}$"
              },
              "botId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "installationId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "workspace": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "conversations:read",
                    "messages:read",
                    "messages:write",
                    "messages:write.ephemeral",
                    "reactions:read",
                    "reactions:write",
                    "files:read",
                    "files:write",
                    "users:read",
                    "users:read.email",
                    "commands",
                    "incoming-webhook",
                    "assistant:tools",
                    "runs:read"
                  ]
                }
              }
            },
            "required": [
              "tokenType",
              "accessToken",
              "botId",
              "installationId",
              "workspace",
              "scopes"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "tokenType": {
                "type": "string",
                "const": "user"
              },
              "accessToken": {
                "type": "string",
                "pattern": "^kusr_[A-Za-z0-9_-]{43}$"
              },
              "refreshToken": {
                "type": "string",
                "pattern": "^kref_[A-Za-z0-9_-]{43}$"
              },
              "expiresIn": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "userId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "installationId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "workspace": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "conversations:read",
                    "messages:read",
                    "messages:write",
                    "messages:write.ephemeral",
                    "reactions:read",
                    "reactions:write",
                    "files:read",
                    "files:write",
                    "users:read",
                    "users:read.email",
                    "commands",
                    "incoming-webhook",
                    "assistant:tools",
                    "runs:read"
                  ]
                }
              }
            },
            "required": [
              "tokenType",
              "accessToken",
              "refreshToken",
              "expiresIn",
              "userId",
              "installationId",
              "workspace",
              "scopes"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ConversationListResponse": {
        "type": "object",
        "properties": {
          "conversations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conversation"
            }
          },
          "nextCursor": {
            "description": "Pass as `cursor` to fetch the next page; null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "conversations",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "ConversationResponse": {
        "type": "object",
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          }
        },
        "required": [
          "conversation"
        ],
        "additionalProperties": false
      },
      "MemberListResponse": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "joinedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "userId",
                "joinedAt"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "description": "Pass as `cursor` to fetch the next page; null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "members",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "MessageListResponse": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "nextCursor": {
            "description": "Pass as `cursor` to fetch the next page; null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "messages",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "MessageResponse": {
        "type": "object",
        "properties": {
          "message": {
            "$ref": "#/components/schemas/Message"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false
      },
      "OkResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": false
      },
      "FileResponse": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/File"
          }
        },
        "required": [
          "file"
        ],
        "additionalProperties": false
      },
      "UserListResponse": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "nextCursor": {
            "description": "Pass as `cursor` to fetch the next page; null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "users",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "UserResponse": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user"
        ],
        "additionalProperties": false
      },
      "MeResponse": {
        "type": "object",
        "properties": {
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/User"
              },
              {
                "type": "null"
              }
            ]
          },
          "bot": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "displayName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "displayName"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "user",
          "bot"
        ],
        "additionalProperties": false
      },
      "RunResponse": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/Run"
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": false
      },
      "InstallationResponse": {
        "type": "object",
        "properties": {
          "installation": {
            "$ref": "#/components/schemas/Installation"
          }
        },
        "required": [
          "installation"
        ],
        "additionalProperties": false
      },
      "BlockInput": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "header"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 150
              }
            },
            "required": [
              "type",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "section"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "text": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "plain",
                      "mrkdwn"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  }
                },
                "required": [
                  "type",
                  "text"
                ],
                "additionalProperties": false
              },
              "accessory": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "actionId": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                      },
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 75
                      },
                      "value": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "style": {
                        "default": "default",
                        "type": "string",
                        "enum": [
                          "default",
                          "primary",
                          "danger"
                        ]
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      "confirm": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "confirm": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 30
                          },
                          "deny": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 30
                          }
                        },
                        "required": [
                          "title",
                          "text",
                          "confirm",
                          "deny"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "actionId",
                      "text"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "static_select"
                      },
                      "actionId": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                      },
                      "placeholder": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 150
                      },
                      "options": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 75
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 150
                            }
                          },
                          "required": [
                            "text",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "type",
                      "actionId",
                      "placeholder",
                      "options"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "fileId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "alt": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    },
                    "required": [
                      "type",
                      "fileId",
                      "alt"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "required": [
              "type",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "fields"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "fields": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "label",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "fields"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "metrics"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "items": {
                "minItems": 1,
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "value": {
                      "type": "number"
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "integer",
                        "decimal",
                        "currency",
                        "percent"
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "primary": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "value",
                    "primary"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "items"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "table"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "columns": {
                "minItems": 1,
                "maxItems": 6,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "align": {
                      "default": "left",
                      "type": "string",
                      "enum": [
                        "left",
                        "center",
                        "right"
                      ]
                    }
                  },
                  "required": [
                    "key",
                    "label"
                  ],
                  "additionalProperties": false
                }
              },
              "rows": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "maxLength": 200
                  }
                }
              }
            },
            "required": [
              "type",
              "columns",
              "rows"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "list"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "items": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 150
                    },
                    "subtitle": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    }
                  },
                  "required": [
                    "title"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "items"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "context"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "elements": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "plain",
                        "mrkdwn"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 3000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "elements"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "divider"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "image"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "fileId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "alt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "type",
              "fileId",
              "alt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "actions"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "elements": {
                "minItems": 1,
                "maxItems": 5,
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "button"
                        },
                        "actionId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 75
                        },
                        "value": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "style": {
                          "default": "default",
                          "type": "string",
                          "enum": [
                            "default",
                            "primary",
                            "danger"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "confirm": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "confirm": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 30
                            },
                            "deny": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 30
                            }
                          },
                          "required": [
                            "title",
                            "text",
                            "confirm",
                            "deny"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "type",
                        "actionId",
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "static_select"
                        },
                        "actionId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                        },
                        "placeholder": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 150
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 75
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              }
                            },
                            "required": [
                              "text",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "type",
                        "actionId",
                        "placeholder",
                        "options"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "overflow"
                        },
                        "actionId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_.-]{1,64}$"
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 75
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              }
                            },
                            "required": [
                              "text",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "type",
                        "actionId",
                        "options"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            },
            "required": [
              "type",
              "elements"
            ],
            "additionalProperties": false
          }
        ]
      },
      "PostMessageRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "text": {
            "type": "string",
            "maxLength": 8000,
            "description": "Plain text with optional `<@user:ID>` mentions. Required: it is the notification and search fallback for blocks."
          },
          "blocks": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockInput"
            }
          },
          "threadParentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "conversationId",
          "text"
        ],
        "additionalProperties": false
      },
      "UpdateMessageRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 8000,
            "description": "Plain text with optional `<@user:ID>` mentions. Required: it is the notification and search fallback for blocks."
          },
          "blocks": {
            "anyOf": [
              {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlockInput"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "text"
        ],
        "additionalProperties": false
      },
      "ReactionRequest": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "reaction": {
            "type": "string",
            "enum": [
              "thumbs_up",
              "heart",
              "laugh",
              "celebrate",
              "eyes",
              "thinking",
              "thanks",
              "check"
            ]
          }
        },
        "required": [
          "messageId",
          "reaction"
        ],
        "additionalProperties": false
      },
      "UploadFileRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "mimeType": {
            "type": "string",
            "enum": [
              "text/plain",
              "text/markdown",
              "application/json",
              "application/pdf",
              "image/png",
              "image/jpeg"
            ]
          },
          "contentBase64": {
            "type": "string",
            "minLength": 4,
            "maxLength": 7000000,
            "pattern": "^[A-Za-z0-9+/]+={0,2}$"
          }
        },
        "required": [
          "conversationId",
          "name",
          "mimeType",
          "contentBase64"
        ],
        "additionalProperties": false
      },
      "KitAccessRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "grantType": {
                "type": "string",
                "const": "authorization_code"
              },
              "clientId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "clientSecret": {
                "type": "string",
                "pattern": "^kcs_[A-Za-z0-9_-]{43}$"
              },
              "code": {
                "type": "string",
                "pattern": "^kcode_[A-Za-z0-9_-]{43}$"
              },
              "redirectUri": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "codeVerifier": {
                "type": "string",
                "pattern": "^[A-Za-z0-9._~-]{43,128}$"
              }
            },
            "required": [
              "grantType",
              "clientId",
              "clientSecret",
              "code",
              "redirectUri"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "grantType": {
                "type": "string",
                "const": "refresh_token"
              },
              "clientId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "clientSecret": {
                "type": "string",
                "pattern": "^kcs_[A-Za-z0-9_-]{43}$"
              },
              "refreshToken": {
                "type": "string",
                "pattern": "^kref_[A-Za-z0-9_-]{43}$"
              }
            },
            "required": [
              "grantType",
              "clientId",
              "clientSecret",
              "refreshToken"
            ],
            "additionalProperties": false
          }
        ]
      },
      "IncomingWebhookRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "blocks": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockInput"
            }
          }
        },
        "required": [
          "text"
        ]
      }
    }
  }
}
