{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base",
  "info": {
    "title": "Coviqo Bot API",
    "version": "1.7.0",
    "summary": "Token API for Coviqo bots, incoming webhooks, interaction requests and event deliveries.",
    "description": "Bots are space members with a managed role \"Bot: <name>\" – every call runs with the permissions of that role in the space / room.\n\nAuthenticate with `Authorization: Bot <token>` (token `cqb_…` from Settings → Developer). Bot tokens only work under `/api/v1/bot/*`.\n\nErrors: `{ statusCode, code, message, details? }`. Unknown request fields are ignored; ignore unknown response fields and event types.\n\nWebSocket gateway (not described here): `wss://<host>/api/v1/bot/gateway`, heartbeat 41250 ms – see the documentation.",
    "contact": {
      "name": "Coviqo developer documentation",
      "url": "https://coviqo.com/developers"
    }
  },
  "servers": [
    {
      "url": "https://app.coviqo.com/api/v1",
      "description": "This Coviqo instance"
    },
    {
      "url": "https://{host}/api/v1",
      "description": "Any Coviqo instance",
      "variables": {
        "host": {
          "default": "app.coviqo.com",
          "description": "Host of the Coviqo app"
        }
      }
    }
  ],
  "externalDocs": {
    "description": "Developer documentation",
    "url": "https://coviqo.com/developers"
  },
  "tags": [
    {
      "name": "Profile & spaces",
      "description": "Who the bot is, where it is installed, rooms, members and roles."
    },
    {
      "name": "Messages",
      "description": "Post, edit, delete, react, read the history."
    },
    {
      "name": "Slash commands",
      "description": "Register the commands people see after typing \"/\"."
    },
    {
      "name": "Interactions",
      "description": "Follow-ups and edits of interaction answers (header X-Coviqo-Interaction-Token)."
    },
    {
      "name": "Events",
      "description": "Event subscriptions per space (event webhook and WebSocket gateway)."
    },
    {
      "name": "Direct messages",
      "description": "1:1 conversations of people with the bot."
    },
    {
      "name": "Tasks",
      "description": "Tasks of rooms."
    },
    {
      "name": "Calendar",
      "description": "Calendar events."
    },
    {
      "name": "Files",
      "description": "Files: list, metadata, download, three-step upload."
    },
    {
      "name": "Notes",
      "description": "Notes as text with light Markdown."
    },
    {
      "name": "Moderation",
      "description": "Timeouts, kicks and bans with the bot as moderator (role hierarchy applies)."
    },
    {
      "name": "Voice",
      "description": "Voice bots (plan voiceBots)."
    },
    {
      "name": "Transcripts",
      "description": "Finished meeting transcripts and summaries (plan botTranscriptAccess)."
    },
    {
      "name": "Tickets",
      "description": "Private support tickets (room module TICKETS): data access TICKETS_READ / TICKETS_WRITE plus the ticket permissions of the bot role."
    },
    {
      "name": "Teams",
      "description": "Teams, applications and announcements (data access MEMBERS; changes need teams.manage)."
    },
    {
      "name": "Forum",
      "description": "Forum rooms: posts (title + first message, tags), replies, solved / pinned / locked. Reading posts needs MESSAGE_CONTENT."
    },
    {
      "name": "Roles",
      "description": "Assign / remove roles of members (data access ROLES_ASSIGN, allow-list per installation)."
    },
    {
      "name": "Rooms",
      "description": "Create, edit, archive and delete rooms and categories, room permission overrides (data access ROOMS_MANAGE + room.create / room.manage), move / disconnect people in voice (voice.move_members)."
    },
    {
      "name": "Invites",
      "description": "Invite links and who joined through them (space.invite or space.manage_members)."
    },
    {
      "name": "Voice data",
      "description": "Voice states, voice activity and sessions (activity / sessions: data access VOICE_ACTIVITY)."
    },
    {
      "name": "Statistics",
      "description": "Member growth (daily snapshots)."
    },
    {
      "name": "Incoming webhooks",
      "description": "Post into a room from CI, monitoring … – no bot account."
    },
    {
      "name": "Interaction requests",
      "description": "Sent by Coviqo to the interaction URL of the bot (signed)."
    },
    {
      "name": "Event deliveries",
      "description": "Sent by Coviqo to the event URL of the bot (signed)."
    }
  ],
  "security": [
    {
      "BotToken": []
    }
  ],
  "paths": {
    "/bot/me": {
      "get": {
        "operationId": "getMe",
        "summary": "Bot profile",
        "description": "Profile of the bot plus its public key and the requested permissions / intents. Good first call to check a token.",
        "tags": [
          "Profile & spaces"
        ],
        "responses": {
          "200": {
            "description": "Profile",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMe"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces": {
      "get": {
        "operationId": "listSpaces",
        "summary": "Spaces the bot is installed in",
        "tags": [
          "Profile & spaces"
        ],
        "responses": {
          "200": {
            "description": "Installations (paused ones included, `enabled: false`)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotSpace"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces/{spaceId}/rooms": {
      "get": {
        "operationId": "listRooms",
        "summary": "Rooms the bot can see",
        "tags": [
          "Profile & spaces"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rooms by position",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotRoom"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createRoom",
        "summary": "Create a room",
        "description": "Like a person with room.create: in any category (default: the first one); the room starts synced with the category’s permissions. Types: STANDARD, VOICE, PROJECT, EVENT, COMMUNITY, STAGE, FORUM (no meeting, lobby or map rooms). Modules: not WEBPAGES / FEED. PRIVATE / INVITE_ONLY rooms get the bot as room member. At most 50 rooms + categories per bot, space and day (429 RATE_LIMITED, scope `botrooms`).\n\n**Permissions** of the bot role: `room.create`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoomRequest"
              },
              "example": {
                "name": "Squad 3",
                "type": "VOICE",
                "userLimit": 5
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The room",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotRoomDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, CATEGORY_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "CATEGORY_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.create"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/members": {
      "get": {
        "operationId": "listMembers",
        "summary": "Member list",
        "description": "Active members (standard intent MEMBERS: names, roles), ordered by member id. Space identities (per-space names) are applied. `joinSource` is always present (null without space.invite / space.manage_members or for joins before invite tracking); `linkedAccounts` only with LINKED_ACCOUNTS and the member’s consent.",
        "tags": [
          "Profile & spaces"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a member id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 1000)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "presence",
            "in": "query",
            "required": false,
            "description": "`true` adds `presence` – needs the PRESENCE intent (403 BOT_INTENT_REQUIRED)",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false"
              ]
            }
          },
          {
            "name": "joinedViaInviteId",
            "in": "query",
            "required": false,
            "description": "Only members that joined through this invite – needs space.invite or space.manage_members (403 MISSING_PERMISSION)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "joinedVia",
            "in": "query",
            "required": false,
            "description": "Only members that joined this way – needs space.invite or space.manage_members",
            "schema": {
              "type": "string",
              "enum": [
                "invite",
                "vanity",
                "public",
                "lfg",
                "sso",
                "join_request",
                "handover",
                "onboarding"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMemberPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces/{spaceId}/members/{userId}": {
      "get": {
        "operationId": "getMember",
        "summary": "One member",
        "tags": [
          "Profile & spaces"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "presence",
            "in": "query",
            "required": false,
            "description": "`true` adds `presence` – needs the PRESENCE intent (403 BOT_INTENT_REQUIRED)",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The member",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces/{spaceId}/roles": {
      "get": {
        "operationId": "listRoles",
        "summary": "Roles of the space",
        "description": "All roles, highest first (position 0 = highest). `assignable` = the bot may assign / remove the role right now (ROLES_ASSIGN, allow-list, below the bot role; admin-level roles only with “allow roles with admin rights”).",
        "tags": [
          "Profile & spaces"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Roles by position",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotRole"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/rooms/{roomId}/messages": {
      "post": {
        "operationId": "createMessage",
        "summary": "Post a message",
        "description": "Posts as the bot (encrypted with the space key, mentions, realtime and activity as for people). Optional buttons / select menus.\n\n**Permissions** of the bot role: `chat.view`, `chat.send`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotMessageRequest"
              },
              "example": {
                "content": "Build **#128** finished.",
                "components": [
                  {
                    "type": "row",
                    "components": [
                      {
                        "type": "button",
                        "style": "success",
                        "label": "Deploy",
                        "customId": "deploy:128"
                      },
                      {
                        "type": "button",
                        "style": "link",
                        "label": "Log",
                        "url": "https://ci.example.com/128"
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, MESSAGE_EMPTY, BOT_COMPONENTS_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "MESSAGE_EMPTY",
                            "BOT_COMPONENTS_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "chat.send"
        ],
        "x-coviqo-write": true
      },
      "get": {
        "operationId": "listMessages",
        "summary": "Message history",
        "description": "Newest first, system messages left out. `author=self` (Since 1.6.0) returns only the bot's own messages and works without the MESSAGE_CONTENT intent (room.view + chat.view still needed); everything else needs MESSAGE_CONTENT. Since 1.7.0 every item carries `components` (buttons / select menus as stored, null without) – `customId` only on the bot's own messages, other bots' components come without it. Use it to find your own boards again (e.g. delete duplicates by custom id).\n\n**Permissions** of the bot role: `chat.view`.\n\n**Data access**: `MESSAGE_CONTENT`.",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Message id – returns older messages (`nextCursor` of the previous page)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "author",
            "in": "query",
            "required": false,
            "description": "`self` = only messages of the bot itself – no MESSAGE_CONTENT intent needed. Since 1.6.0",
            "schema": {
              "type": "string",
              "enum": [
                "self"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryMessagePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ],
        "x-coviqo-intent": "MESSAGE_CONTENT"
      }
    },
    "/bot/messages/{messageId}": {
      "patch": {
        "operationId": "editMessage",
        "summary": "Edit an own message",
        "description": "**Permissions** of the bot role: `chat.view`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "description": "Message id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotEditMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The edited message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_COMPONENTS_INVALID, MESSAGE_EMPTY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_COMPONENTS_INVALID",
                            "MESSAGE_EMPTY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, MESSAGE_NOT_AUTHOR",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "MESSAGE_NOT_AUTHOR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ],
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteMessage",
        "summary": "Delete a message",
        "description": "Own messages always; messages of others need `chat.manage` (moderation feed + audit with the bot as actor).\n\n**Permissions** of the bot role: `chat.manage (others’ messages)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "description": "Message id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.manage (others’ messages)"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/messages/{messageId}/reactions/{emoji}": {
      "put": {
        "operationId": "addReaction",
        "summary": "Add a reaction",
        "description": "**Permissions** of the bot role: `chat.view`, `chat.react`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "description": "Message id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "required": true,
            "description": "Emoji (URL-encoded), e.g. `%F0%9F%91%8D` or a custom emoji `:name:`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reactions of the message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "chat.react"
        ],
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "removeReaction",
        "summary": "Remove the bot’s reaction",
        "description": "**Permissions** of the bot role: `chat.view`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "description": "Message id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "required": true,
            "description": "Emoji (URL-encoded), e.g. `%F0%9F%91%8D` or a custom emoji `:name:`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reactions of the message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/commands": {
      "get": {
        "operationId": "listCommands",
        "summary": "Registered slash commands",
        "tags": [
          "Slash commands"
        ],
        "responses": {
          "200": {
            "description": "Commands",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Command"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "replaceCommands",
        "summary": "Replace all slash commands",
        "description": "The list becomes the complete command set of the bot (bulk overwrite). Spaces see the change at once.",
        "tags": [
          "Slash commands"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceCommandsRequest"
              },
              "example": {
                "commands": [
                  {
                    "name": "ping",
                    "description": "Answers with Pong"
                  },
                  {
                    "name": "remind",
                    "description": "Set a reminder",
                    "options": [
                      {
                        "name": "text",
                        "description": "What about?",
                        "type": "string",
                        "required": true
                      },
                      {
                        "name": "minutes",
                        "description": "In minutes",
                        "type": "integer",
                        "choices": [
                          {
                            "name": "5",
                            "value": 5
                          },
                          {
                            "name": "60",
                            "value": 60
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new command set",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Command"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_COMMANDS_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_COMMANDS_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/interactions/{interactionId}/followups": {
      "post": {
        "operationId": "createFollowup",
        "summary": "Send a follow-up message",
        "description": "Another answer to an interaction (within 15 minutes). The first follow-up after DEFERRED_MESSAGE ends \"<Bot> is thinking …\" and becomes the original answer. Note: an empty message answers 502 BOT_INTERACTION_INVALID_RESPONSE and invalid components 502 BOT_COMPONENTS_INVALID on this endpoint (the same check as for interaction responses).\n\n**Permissions** of the bot role: `chat.view`, `chat.send (public answers)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Interactions"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotFollowupRequest"
              },
              "example": {
                "content": "Done."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Id of the new message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowupResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "description": "Invalid answer: BOT_INTERACTION_INVALID_RESPONSE, BOT_COMPONENTS_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 502
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_INVALID_RESPONSE",
                            "BOT_COMPONENTS_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "chat.send (public answers)"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/interactions/{interactionId}/original": {
      "patch": {
        "operationId": "editOriginal",
        "summary": "Edit the original answer",
        "description": "Edits the first answer – for COMPONENT interactions without an own answer the message carrying the component. After DEFERRED_MESSAGE without an answer the edit becomes the answer.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Interactions"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotEditMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Id of the edited message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditOriginalResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_COMPONENTS_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_COMPONENTS_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, MESSAGE_NOT_AUTHOR",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "MESSAGE_NOT_AUTHOR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_INTERACTION_EXPIRED, BOT_INTERACTION_NO_ORIGINAL",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED",
                            "BOT_INTERACTION_NO_ORIGINAL"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteOriginal",
        "summary": "Delete the original answer",
        "description": "A public answer is deleted like DELETE /bot/messages/{messageId} (realtime `message.deleted` to the room). An ephemeral answer is removed live from the clients of the person (realtime `bot.ephemeral_deleted`).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Interactions"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionToken"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_INTERACTION_EXPIRED, BOT_INTERACTION_NO_ORIGINAL",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED",
                            "BOT_INTERACTION_NO_ORIGINAL"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-write": true
      }
    },
    "/bot/interactions/{interactionId}/modal": {
      "post": {
        "operationId": "openModal",
        "summary": "Open a form (modal) for the person",
        "description": "For bots answering through the WebSocket gateway (every interaction arrives deferred) or after DEFERRED_MESSAGE / DEFERRED_UPDATE: opens the form for the person who used the command / component – like a MODAL response. Rules: not for MODAL_SUBMIT interactions (409 BOT_MODAL_NOT_ALLOWED), once per interaction, not after an answer was posted, and only within 60 s of the interaction (409 BOT_MODAL_TOO_LATE). The form replaces \"<Bot> is thinking …\"; the submission arrives as a new MODAL_SUBMIT interaction (`interaction.created` on the gateway, or the interaction URL).",
        "tags": [
          "Interactions"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Modal"
              },
              "example": {
                "customId": "report",
                "title": "Report a problem",
                "fields": [
                  {
                    "type": "text",
                    "customId": "details",
                    "label": "What happened?",
                    "style": "paragraph",
                    "required": true,
                    "minLength": 10,
                    "maxLength": 1000
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The form was sent to the person",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenModalResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_MODAL_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_MODAL_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_NO_ACCESS",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_NO_ACCESS"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MODAL_NOT_ALLOWED, BOT_MODAL_TOO_LATE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MODAL_NOT_ALLOWED",
                            "BOT_MODAL_TOO_LATE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/interactions/{interactionId}/autocomplete": {
      "post": {
        "operationId": "answerAutocomplete",
        "summary": "Answer an AUTOCOMPLETE interaction (gateway bots)",
        "description": "For bots without interaction URL that receive AUTOCOMPLETE interactions as `interaction.created` over the WebSocket gateway: send the suggestions for `command.focused` – once, within 3 s of the interaction (afterwards the person already got an empty list: 410 BOT_INTERACTION_EXPIRED; a second answer: 409 BOT_AUTOCOMPLETE_ANSWERED). At most 25 choices are passed on; entries with an invalid name or a value that does not match the option type / limits are dropped (listed in `dropped`). HTTP bots answer AUTOCOMPLETE_RESULT in the response instead. Since 1.4.0.",
        "tags": [
          "Interactions"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutocompleteResultData"
              },
              "example": {
                "choices": [
                  {
                    "name": "Berlin",
                    "value": "berlin"
                  },
                  {
                    "name": "Bern",
                    "value": "bern"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The suggestions were passed on to the person",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutocompleteAnswerResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_AUTOCOMPLETE_ANSWERED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_AUTOCOMPLETE_ANSWERED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Expired: BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 410
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/interactions/{interactionId}/files/{fileId}/download": {
      "get": {
        "operationId": "downloadFormFile",
        "summary": "Download URL of a file submitted with a form",
        "description": "A fresh signed URL (valid 10 minutes, absolute, no bot token needed) for a file the person uploaded in a file upload field and submitted to THIS bot in THIS MODAL_SUBMIT interaction – the payload already carries one per file. No interaction token needed; available for 72 hours after the submit, then Coviqo deletes the files (keep your own copy). Every other file, another interaction, a paused or removed installation or a room the bot no longer sees: 404 BOT_FORM_FILE_NOT_FOUND. End-to-end encrypted files are never delivered (409 FILE_E2EE, defensive). Counts against the normal request limits; audited (BOT_FORM_FILES `downloaded`, file id – no name). Since 1.6.0.",
        "tags": [
          "Interactions"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "description": "File id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed URL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDownload"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, FILE_INFECTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "FILE_INFECTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_FORM_FILE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_FORM_FILE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: FILE_NOT_READY, FILE_E2EE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "FILE_NOT_READY",
                            "FILE_E2EE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/interactions/{interactionId}/dm": {
      "post": {
        "operationId": "answerInDm",
        "summary": "Answer an interaction in a direct message",
        "description": "Opens (or reuses) the 1:1 conversation with the person who used the interaction and posts there – within the 15 minutes of the interaction token. Link buttons only. `replyToId` is ignored here.",
        "tags": [
          "Direct messages"
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "description": "`id` of the interaction payload",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotMessageRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Conversation and message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionDmResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_COMPONENTS_INVALID, BOT_DM_COMPONENTS_LINK_ONLY, MESSAGE_EMPTY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_COMPONENTS_INVALID",
                            "BOT_DM_COMPONENTS_LINK_ONLY",
                            "MESSAGE_EMPTY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_DM_BLOCKED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_DM_BLOCKED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces/{spaceId}/subscriptions": {
      "get": {
        "operationId": "getSubscriptions",
        "summary": "Event subscriptions in a space",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscribed event types",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotSubscriptions"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setSubscriptions",
        "summary": "Set the event subscriptions in a space",
        "description": "Replaces the list (event webhook and gateway). Intents and room permissions are still checked for every event.",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionsRequest"
              },
              "example": {
                "events": [
                  "message.created",
                  "member.joined"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscribed event types",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotSubscriptions"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_EVENTS_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_EVENTS_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/dms": {
      "get": {
        "operationId": "listDms",
        "summary": "Conversations of the bot",
        "description": "1:1 conversations with the bot, newest activity first.",
        "tags": [
          "Direct messages"
        ],
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "ISO date – `nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmConversationPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/dms/{conversationId}/messages": {
      "get": {
        "operationId": "listDmMessages",
        "summary": "Messages of a conversation",
        "description": "Always with text (people wrote to the bot directly) – no intent needed.",
        "tags": [
          "Direct messages"
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "description": "Conversation id (`conversationId` of `dm.message_created` / GET /bot/dms)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Message id – older messages",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagePage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: DM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "DM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createDmMessage",
        "summary": "Reply in a conversation",
        "description": "Only after the person wrote in this conversation – never unsolicited – and never while a block exists. Link buttons only.",
        "tags": [
          "Direct messages"
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "description": "Conversation id (`conversationId` of `dm.message_created` / GET /bot/dms)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotMessageRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_COMPONENTS_INVALID, BOT_DM_COMPONENTS_LINK_ONLY, MESSAGE_EMPTY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_COMPONENTS_INVALID",
                            "BOT_DM_COMPONENTS_LINK_ONLY",
                            "MESSAGE_EMPTY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_DM_NOT_ALLOWED, BOT_DM_BLOCKED, DM_USER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_DM_NOT_ALLOWED",
                            "BOT_DM_BLOCKED",
                            "DM_USER_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: DM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "DM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/rooms/{roomId}/tasks": {
      "get": {
        "operationId": "listTasks",
        "summary": "Tasks of a room",
        "description": "**Permissions** of the bot role: `tasks.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter",
            "schema": {
              "type": "string",
              "enum": [
                "TODO",
                "IN_PROGRESS",
                "DONE"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tasks",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Task"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tasks.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      },
      "post": {
        "operationId": "createTask",
        "summary": "Create a task",
        "description": "Same rules as for people (`tasks.create`).\n\n**Permissions** of the bot role: `tasks.create`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskRequest"
              },
              "example": {
                "title": "Review release notes",
                "priority": "HIGH",
                "dueDate": "2026-10-09T12:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new task",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tasks.create"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/tasks/{taskId}": {
      "get": {
        "operationId": "getTask",
        "summary": "One task",
        "description": "**Permissions** of the bot role: `tasks.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "Task id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The task",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TASK_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TASK_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tasks.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      },
      "patch": {
        "operationId": "updateTask",
        "summary": "Change a task",
        "description": "Same rules as for people. Tasks the bot did not create need CONTENT_READ (the answer contains the task).\n\n**Data access**: `CONTENT_READ` (for objects the bot did not create).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "Task id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TASK_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TASK_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "CONTENT_READ",
        "x-coviqo-write": true
      }
    },
    "/bot/tasks/{taskId}/complete": {
      "post": {
        "operationId": "completeTask",
        "summary": "Complete a task",
        "description": "Shortcut for `PATCH { status: \"DONE\" }`.\n\n**Data access**: `CONTENT_READ` (for objects the bot did not create).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "Task id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The task",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TASK_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TASK_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "CONTENT_READ",
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Calendar events",
        "description": "**Permissions** of the bot role: `events.view`.",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "ISO date – start of the range",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "ISO date – end of the range",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "roomId",
            "in": "query",
            "required": false,
            "description": "Only events of this room",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CalendarEvent"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, ROOM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "ROOM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.view"
        ]
      }
    },
    "/bot/rooms/{roomId}/events": {
      "post": {
        "operationId": "createEvent",
        "summary": "Create a calendar event",
        "description": "Same rules as for people (`events.create`).\n\n**Permissions** of the bot role: `events.create`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventRequest"
              },
              "example": {
                "title": "Release review",
                "startAt": "2026-10-09T14:00:00.000Z",
                "endAt": "2026-10-09T15:00:00.000Z",
                "timezone": "Europe/Berlin"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new event",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarEvent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.create"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/events/{eventId}": {
      "patch": {
        "operationId": "updateEvent",
        "summary": "Change a calendar event",
        "description": "Own events, others’ with `events.manage`. Since 1.6.0 `roomId` moves the event to another room of the same space (move, not copy – the id stays): the bot needs `events.manage` in the old AND the new room (own events: `events.create` in the new room), must see the new room with `events.view` (else 404 ROOM_NOT_FOUND), the Events module must be on there and the room not archived; neither room end-to-end encrypted. Recurring series move as a whole. Calendar entries of online meetings move their meeting along (the new room needs \"Meetings\"). RSVPs, tickets and reminders stay; people who cannot see the new room keep their answer but no longer see the event. At most 10 moves per minute per bot and space (on top of the write limit; 429 RATE_LIMITED, scope `botevmove`). Audited as EVENT_MOVED with the bot as actor; `event.updated` carries `previousRoomId`.\n\n**Permissions** of the bot role: `events.manage (others’ events; for moves in the old and the new room)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "Calendar event id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEventRequest"
              },
              "example": {
                "roomId": "cm0room0000000000000000002"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The event",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarEvent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, E2EE_FEATURE_DISABLED, SPACE_MEETINGS_DISABLED, MEETING_NOT_ORGANIZER",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "E2EE_FEATURE_DISABLED",
                            "SPACE_MEETINGS_DISABLED",
                            "MEETING_NOT_ORGANIZER"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, EVENT_NOT_FOUND, ROOM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "EVENT_NOT_FOUND",
                            "ROOM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: EVENT_CANCELED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "EVENT_CANCELED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.manage (others’ events; for moves in the old and the new room)"
        ],
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteEvent",
        "summary": "Delete (cancel) a calendar event",
        "description": "Removes the event from all calendars – like `DELETE` for people this cancels the event (Coviqo never hard-deletes calendar events: RSVPs and tickets stay for the record). Same rules and errors as POST /bot/events/{eventId}/cancel; idempotent.\n\n**Permissions** of the bot role: `events.manage (others’ events)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "Calendar event id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Canceled",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, MEETING_NOT_ORGANIZER",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "MEETING_NOT_ORGANIZER"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, EVENT_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "EVENT_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.manage (others’ events)"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/events/{eventId}/cancel": {
      "post": {
        "operationId": "cancelEvent",
        "summary": "Cancel a calendar event",
        "description": "Same rules as for people: own events (created by the bot), others’ with `events.manage`. A recurring event is canceled as a whole series. The entry disappears from all calendars (external calendar copies are removed); the calendar entry of an online meeting also cancels the meeting (only meeting organizers / moderators – 403 MEETING_NOT_ORGANIZER). Idempotent – an already canceled event is returned unchanged. Sends `event.canceled`.\n\n**Permissions** of the bot role: `events.manage (others’ events)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "Calendar event id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The canceled event (`canceledAt` set)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarEvent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, MEETING_NOT_ORGANIZER",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "MEETING_NOT_ORGANIZER"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, EVENT_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "EVENT_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.manage (others’ events)"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/events/{eventId}/rsvps": {
      "get": {
        "operationId": "listEventRsvps",
        "summary": "RSVPs of a calendar event",
        "description": "Who accepted, declined or answered maybe – the same list people with `events.view` see on the event, never more: the bot must see the room (or hold `events.view` in the space for space-wide events), entries of online meetings only when the bot may see the meeting, no RSVPs from end-to-end encrypted rooms. Users with their space identity, no e-mail. Coviqo tracks answers, not actual attendance. Changes arrive as `event.rsvp_updated`.\n\n**Permissions** of the bot role: `events.view`.\n\n**Data access**: `EVENT_RSVPS`.",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "Calendar event id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only this answer (default: all)",
            "schema": {
              "type": "string",
              "enum": [
                "GOING",
                "REGISTERED",
                "MAYBE",
                "DECLINED",
                "INVITED"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 500)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventRsvpPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, EVENT_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "EVENT_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.view"
        ],
        "x-coviqo-intent": "EVENT_RSVPS"
      }
    },
    "/bot/events/{eventId}/rsvps/{userId}": {
      "put": {
        "operationId": "putEventRsvp",
        "summary": "Answer an event on behalf of a member",
        "description": "Since 1.4.0. Going / maybe / declined for a member – the answer shows \"via <bot>\" until the person answers themselves. The member is named by (1) interaction proof – `interactionId` plus the header X-Coviqo-Interaction-Token of an interaction of this bot in this space by exactly this person, no extra data access – or (2) the privileged data access EVENT_RSVP_ON_BEHALF (any active member). The bot must see the event (as for RSVP lists, no end-to-end encrypted rooms); the member must be an active member (no guests, bots, suspended accounts) who sees the event – then every rule of a personal answer applies (canceled events, capacity, tickets, webinar registration). Sends `event.rsvp_updated`. Extra limit of 10 per minute and space (scope botonbehalf); audited as BOT_MEMBER_ACTION `event_rsvp`.\n\n**Permissions** of the bot role: `events.view`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "Calendar event id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutEventRsvpRequest"
              },
              "example": {
                "status": "GOING"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventRsvpResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, BOT_ON_BEHALF_INVALID, BOT_INTERACTION_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "BOT_ON_BEHALF_INVALID",
                            "BOT_INTERACTION_MISMATCH"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, EVENT_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "EVENT_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, EVENT_CANCELED, EVENT_FULL, EVENT_TICKET_REQUIRED, WEBINAR_USE_REGISTRATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "EVENT_CANCELED",
                            "EVENT_FULL",
                            "EVENT_TICKET_REQUIRED",
                            "WEBINAR_USE_REGISTRATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.view"
        ],
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteEventRsvp",
        "summary": "Remove a member’s answer on behalf of the member",
        "description": "Since 1.5.0. Removes the person’s answer entirely – back to “no answer” (meeting invitees stay invited). Same gate as PUT: (1) interaction proof – `interactionId` (query) plus the header X-Coviqo-Interaction-Token of an interaction of this bot in this space by exactly this person – or (2) EVENT_RSVP_ON_BEHALF: then the bot may remove the person’s answer whatever its origin (given by the person, this bot or another bot) – the website is the source of truth for the person’s choice. Answers tied to a ticket (paid or free, VALID / PENDING) are refused with 409 EVENT_RSVP_TICKET_HELD { ticketStatus, paid } – bots never cancel or refund tickets. Canceled events 409 EVENT_CANCELED, webinars with registration 409 WEBINAR_USE_REGISTRATION. Idempotent: without an answer nothing happens (204). Sends `event.rsvp_updated` with `status: null`, `source: \"bot\"`. Shares the extra limit of 10 per minute and space with PUT (scope botonbehalf); audited as BOT_MEMBER_ACTION `event_rsvp_removed` (with the previous status and origin).\n\n**Permissions** of the bot role: `events.view`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Calendar"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "Calendar event id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interactionId",
            "in": "query",
            "required": false,
            "description": "Interaction proof: an interaction of this bot by this person – only together with the header X-Coviqo-Interaction-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed (or there was no answer)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, BOT_ON_BEHALF_INVALID, BOT_INTERACTION_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "BOT_ON_BEHALF_INVALID",
                            "BOT_INTERACTION_MISMATCH"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, EVENT_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "EVENT_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, EVENT_CANCELED, EVENT_RSVP_TICKET_HELD, WEBINAR_USE_REGISTRATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "EVENT_CANCELED",
                            "EVENT_RSVP_TICKET_HELD",
                            "WEBINAR_USE_REGISTRATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "events.view"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/files": {
      "get": {
        "operationId": "listFiles",
        "summary": "Files and folders of a room",
        "description": "**Permissions** of the bot role: `files.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "query",
            "required": false,
            "description": "Folder (default: root)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search by name",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Folders and files",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "files.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      },
      "post": {
        "operationId": "startUpload",
        "summary": "Start a file upload",
        "description": "Step 1 of 3: announce the file. Step 2: `PUT` the raw bytes to `uploadUrl` with `headers` (no bot token). Step 3: `POST /bot/files/{fileId}/complete` – the malware scan starts. Upload size and storage quota as in the web app.\n\n**Permissions** of the bot role: `files.upload`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadFileRequest"
              },
              "example": {
                "name": "report.pdf",
                "mimeType": "application/pdf",
                "size": 48213
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload URL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUpload"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "Not included in the plan of the space: PLAN_LIMIT_STORAGE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 402
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "PLAN_LIMIT_STORAGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Too large: FILE_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 413
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "FILE_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "files.upload"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/files/{fileId}/complete": {
      "post": {
        "operationId": "completeUpload",
        "summary": "Complete a file upload",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "description": "File id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file (status SCANNING or READY)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, FILE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "FILE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/files/{fileId}": {
      "get": {
        "operationId": "getFile",
        "summary": "File metadata",
        "description": "**Permissions** of the bot role: `files.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "description": "File id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, FILE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "FILE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "files.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      }
    },
    "/bot/files/{fileId}/download": {
      "get": {
        "operationId": "downloadFile",
        "summary": "Download URL",
        "description": "Short-lived signed URL. Files in the malware scan (409 FILE_NOT_READY) or infected (403 FILE_INFECTED) cannot be downloaded.\n\n**Permissions** of the bot role: `files.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "description": "File id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed URL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDownload"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, FILE_INFECTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "FILE_INFECTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, FILE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "FILE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: FILE_NOT_READY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "FILE_NOT_READY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "files.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      }
    },
    "/bot/rooms/{roomId}/notes": {
      "get": {
        "operationId": "listNotes",
        "summary": "Notes of a room",
        "description": "**Permissions** of the bot role: `notes.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Notes"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Notes (`content: null`)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Note"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "notes.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      },
      "post": {
        "operationId": "createNote",
        "summary": "Create a note",
        "description": "Same rules as for people (`notes.edit`).\n\n**Permissions** of the bot role: `notes.edit`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Notes"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNoteRequest"
              },
              "example": {
                "title": "Standup 2026-10-02",
                "content": "# Done\n- Release notes\n# Next\n- Review"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new note",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "notes.edit"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/notes/{noteId}": {
      "get": {
        "operationId": "getNote",
        "summary": "One note with its text",
        "description": "**Permissions** of the bot role: `notes.view`.\n\n**Data access**: `CONTENT_READ`.",
        "tags": [
          "Notes"
        ],
        "parameters": [
          {
            "name": "noteId",
            "in": "path",
            "required": true,
            "description": "Note id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The note",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, NOTE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "NOTE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "notes.view"
        ],
        "x-coviqo-intent": "CONTENT_READ"
      },
      "patch": {
        "operationId": "updateNote",
        "summary": "Change a note",
        "description": "Same rules as for people. Notes the bot did not create need CONTENT_READ. People editing live receive the new text as a change.\n\n**Data access**: `CONTENT_READ` (for objects the bot did not create).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Notes"
        ],
        "parameters": [
          {
            "name": "noteId",
            "in": "path",
            "required": true,
            "description": "Note id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The note",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, NOTE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "NOTE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: NOTE_VERSION_CONFLICT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "NOTE_VERSION_CONFLICT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "CONTENT_READ",
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/members/{userId}/timeout": {
      "post": {
        "operationId": "timeoutMember",
        "summary": "Time out a member",
        "description": "**Permissions** of the bot role: `moderate.timeout`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoutRequest"
              },
              "example": {
                "minutes": 10,
                "reason": "Spam"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, MODERATION_SELF",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "MODERATION_SELF"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MODERATION_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MODERATION_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.timeout"
        ],
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "removeTimeout",
        "summary": "End a timeout",
        "description": "**Permissions** of the bot role: `moderate.timeout`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The member",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: MODERATION_SELF",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "MODERATION_SELF"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MODERATION_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MODERATION_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.timeout"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/members/{userId}/kick": {
      "post": {
        "operationId": "kickMember",
        "summary": "Kick a member",
        "description": "**Permissions** of the bot role: `moderate.kick`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KickRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Kicked",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, MODERATION_SELF",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "MODERATION_SELF"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MODERATION_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MODERATION_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.kick"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/bans/{userId}": {
      "put": {
        "operationId": "banMember",
        "summary": "Ban a person",
        "description": "**Permissions** of the bot role: `moderate.ban`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BanRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Banned",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, MODERATION_SELF",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "MODERATION_SELF"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MODERATION_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MODERATION_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.ban"
        ],
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "unbanMember",
        "summary": "Lift a ban",
        "description": "**Permissions** of the bot role: `moderate.ban`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Ban lifted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, BAN_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "BAN_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.ban"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/voice/join": {
      "post": {
        "operationId": "joinVoice",
        "summary": "Join a voice room",
        "description": "Returns LiveKit credentials for the bot identity. The bot is a visible participant with the BOT badge; while it listens everybody in the room sees \"Bot is listening\". Never in meetings, direct messages or lobby rounds; rooms with external guests only with the room setting \"Bots may join despite external guests\".\n\n**Permissions** of the bot role: `room.join`, `voice.speak (publish)`.\n\n**Data access**: `VOICE_LISTEN`.\n\n**Plan**: `voiceBots`.",
        "tags": [
          "Voice"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceJoinRequest"
              },
              "example": {
                "listen": true,
                "publish": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "LiveKit URL and token",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceJoinResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "Not included in the plan of the space: PLAN_LIMIT_VOICE_BOTS",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 402
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "PLAN_LIMIT_VOICE_BOTS"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, BOT_VOICE_NOT_ALLOWED, BOT_VOICE_GUESTS, BOT_VOICE_CANNOT_SPEAK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "BOT_VOICE_NOT_ALLOWED",
                            "BOT_VOICE_GUESTS",
                            "BOT_VOICE_CANNOT_SPEAK"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED, ROOM_FULL",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED",
                            "ROOM_FULL"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.join",
          "voice.speak (publish)"
        ],
        "x-coviqo-intent": "VOICE_LISTEN",
        "x-coviqo-plan": "voiceBots"
      }
    },
    "/bot/rooms/{roomId}/voice/leave": {
      "post": {
        "operationId": "leaveVoice",
        "summary": "Leave a voice room",
        "tags": [
          "Voice"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Left",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: VOICE_NOT_CONNECTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VOICE_NOT_CONNECTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/rooms/{roomId}/voice": {
      "get": {
        "operationId": "getVoiceRoom",
        "summary": "Voice state of a room",
        "tags": [
          "Voice"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Participants the bot may see and its own session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceRoom"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces/{spaceId}/meetings": {
      "get": {
        "operationId": "listMeetings",
        "summary": "Finished meetings with transcript / summary",
        "description": "Meetings of the rooms a space admin released to the bot (transcript rooms), newest first.\n\n**Data access**: `TRANSCRIPTS`.\n\n**Plan**: `botTranscriptAccess`.",
        "tags": [
          "Transcripts"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "query",
            "required": false,
            "description": "Only this transcript room",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a meeting id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "Not included in the plan of the space: PLAN_LIMIT_BOT_TRANSCRIPTS",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 402
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "PLAN_LIMIT_BOT_TRANSCRIPTS"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_TRANSCRIPT_POLICY, BOT_TRANSCRIPT_ROOM_NOT_APPROVED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_TRANSCRIPT_POLICY",
                            "BOT_TRANSCRIPT_ROOM_NOT_APPROVED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "TRANSCRIPTS",
        "x-coviqo-plan": "botTranscriptAccess"
      }
    },
    "/bot/meetings/{meetingId}/transcript": {
      "get": {
        "operationId": "getTranscript",
        "summary": "Transcript and summary of a meeting",
        "description": "Every read is audited (`BOT_TRANSCRIPT_ACCESSED`). The summary is AI-generated (`ai: true`).\n\n**Data access**: `TRANSCRIPTS`.\n\n**Plan**: `botTranscriptAccess`.",
        "tags": [
          "Transcripts"
        ],
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "description": "Meeting id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transcript",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTranscript"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "Not included in the plan of the space: PLAN_LIMIT_BOT_TRANSCRIPTS",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 402
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "PLAN_LIMIT_BOT_TRANSCRIPTS"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_TRANSCRIPT_POLICY, BOT_TRANSCRIPT_ROOM_NOT_APPROVED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_TRANSCRIPT_POLICY",
                            "BOT_TRANSCRIPT_ROOM_NOT_APPROVED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, MEETING_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "MEETING_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: MEETING_STILL_LIVE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "MEETING_STILL_LIVE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "TRANSCRIPTS",
        "x-coviqo-plan": "botTranscriptAccess"
      }
    },
    "/bot/rooms/{roomId}/tickets": {
      "get": {
        "operationId": "listTickets",
        "summary": "Tickets of a room",
        "description": "Newest change first (`updatedAt`). tickets.view / handle / manage: every ticket of the room; tickets.create only: the tickets the bot opened itself. Sync: keep the newest `updatedAt` and pass it as `updatedSince`.\n\n**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "`all` (default), `open` (NEW, IN_PROGRESS, WAITING_FOR_REPLY) or one status",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "open",
                "NEW",
                "IN_PROGRESS",
                "WAITING_FOR_REPLY",
                "RESOLVED",
                "CLOSED"
              ]
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "description": "Only this priority",
            "schema": {
              "type": "string",
              "enum": [
                "LOW",
                "NORMAL",
                "HIGH",
                "URGENT"
              ]
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "required": false,
            "description": "Category id or `none`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee",
            "in": "query",
            "required": false,
            "description": "User id, `me` (the bot) or `none`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overdue",
            "in": "query",
            "required": false,
            "description": "`true`: only tickets with an overdue SLA clock",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false",
                "0"
              ]
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "description": "ISO date – only tickets changed since then",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page (`body: null`)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      },
      "post": {
        "operationId": "createTicket",
        "summary": "Open a ticket",
        "description": "By default the bot becomes the creator (notifications to the team, SLA, history as for people); the answer is the bot’s own ticket – TICKETS_READ is not needed for it. **On behalf of a member** the member becomes the creator (reporter) and the ticket shows \"created by <bot> on behalf of <member>\": (1) interaction proof – `interactionId` plus the header X-Coviqo-Interaction-Token of an interaction of this bot in this space (the room may differ), no extra data access; (2) `onBehalfOfUserId` – any active member of the space, only with the privileged data access TICKETS_CREATE_ON_BEHALF (on top of TICKETS_WRITE), e.g. for ticket forms on an external website. The member must be able to open the ticket as a person (sees the room, tickets.create, not timed out) – never guests, bots or people who left; both given must name the same person. On-behalf tickets count against an extra limit of 10 per minute and space (scope botticket) and are audited with the member. Attachments: upload them first (POST /bot/rooms/{roomId}/tickets/attachments) and pass the ids in `attachmentIds`.\n\n**Permissions** of the bot role: `tickets.create`, `tickets.handle (priority)`.\n\n**Data access**: `TICKETS_WRITE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicketRequest"
              },
              "example": {
                "title": "Server not reachable",
                "body": "Monitoring reports `api-2` down since 09:12.",
                "categoryId": null,
                "fields": {}
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new ticket",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TICKET_TITLE_INVALID, TICKET_CATEGORY_NOT_FOUND, TICKET_FIELDS_INVALID, TICKET_ATTACHMENT_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TICKET_TITLE_INVALID",
                            "TICKET_CATEGORY_NOT_FOUND",
                            "TICKET_FIELDS_INVALID",
                            "TICKET_ATTACHMENT_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY, TICKET_REPORTER_INVALID, TICKET_REPORTER_NO_ACCESS, TICKET_INTERACTION_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY",
                            "TICKET_REPORTER_INVALID",
                            "TICKET_REPORTER_NO_ACCESS",
                            "TICKET_INTERACTION_MISMATCH"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.create",
          "tickets.handle (priority)"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/tickets/attachments": {
      "post": {
        "operationId": "initTicketAttachmentUpload",
        "summary": "Start a ticket attachment upload",
        "description": "Step 1 of 3 – the same pipeline as people: upload size and storage quota of the plan, blocked file types, malware scan, encryption at rest. Step 2: `PUT` the raw bytes to `uploadUrl` with `headers` (no bot token). Step 3: `POST /bot/files/{fileId}/complete`. Then pass the file id in `attachmentIds` of a new ticket or a reply. Ticket files are private (only who may see the ticket); not in end-to-end encrypted rooms.\n\n**Permissions** of the bot role: `tickets.create | tickets.handle`.\n\n**Data access**: `TICKETS_WRITE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadTicketAttachmentRequest"
              },
              "example": {
                "name": "screenshot.png",
                "mimeType": "image/png",
                "size": 48213
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload URL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUpload"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "Not included in the plan of the space: PLAN_LIMIT_STORAGE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 402
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "PLAN_LIMIT_STORAGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Too large: FILE_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 413
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "FILE_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.create | tickets.handle"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/tickets/categories": {
      "get": {
        "operationId": "listTicketCategories",
        "summary": "Ticket categories",
        "description": "**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage | tickets.create`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Categories by position",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TicketCategory"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage | tickets.create"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/rooms/{roomId}/tickets/fields": {
      "get": {
        "operationId": "listTicketFields",
        "summary": "Custom ticket fields",
        "description": "**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage | tickets.create`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fields by position",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TicketField"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage | tickets.create"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/rooms/{roomId}/tickets/canned-responses": {
      "get": {
        "operationId": "listTicketCannedResponses",
        "summary": "Canned responses",
        "description": "**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Canned responses by position",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TicketCannedResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/rooms/{roomId}/tickets/stats": {
      "get": {
        "operationId": "getTicketStats",
        "summary": "Ticket statistics",
        "description": "**Permissions** of the bot role: `tickets.handle | tickets.manage`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Statistics of the room",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketStats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.handle | tickets.manage"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/rooms/{roomId}/tickets/ratings": {
      "get": {
        "operationId": "listTicketRatings",
        "summary": "Ticket ratings",
        "description": "Stars and comments of the creators, newest first.\n\n**Permissions** of the bot role: `tickets.handle | tickets.manage`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a ticket id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketRatingPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TICKETS_MEMBERS_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TICKETS_MEMBERS_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.handle | tickets.manage"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/tickets/{ticketId}": {
      "get": {
        "operationId": "getTicket",
        "summary": "One ticket with its replies",
        "description": "Public replies; internal notes only with tickets.handle. Tickets the bot may not see answer 404 (no existence leak).\n\n**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      },
      "patch": {
        "operationId": "updateTicket",
        "summary": "Change status, priority, category, assignee, fields or the description",
        "description": "Same workflow as for people: tickets.handle for everything; the bot’s own ticket may be closed (and reopened within the reopen window) without it. Tickets the bot did not open need TICKETS_READ too (the answer contains the ticket). `body` (description, since 1.6.0): tickets.handle, or the bot’s own ticket – opened as itself or on behalf of the creator (`createdByBotId` = this bot); same limits as on create, closed tickets only with tickets.handle (409 TICKET_CLOSED). The permission is checked before anything is written. The history gets a `description` change without the text, people with access get the realtime update, newly mentioned people a mention; ticket.updated carries `{ field: \"description\" }`.\n\n**Permissions** of the bot role: `tickets.handle`.\n\n**Data access**: `TICKETS_WRITE` (+ `TICKETS_READ` for tickets the bot did not open).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketRequest"
              },
              "example": {
                "status": "IN_PROGRESS",
                "priority": "HIGH",
                "assigneeId": "cm1user0000000000000000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The ticket",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TICKET_TITLE_INVALID, TICKET_CATEGORY_NOT_FOUND, TICKET_FIELDS_INVALID, TICKET_ASSIGNEE_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TICKET_TITLE_INVALID",
                            "TICKET_CATEGORY_NOT_FOUND",
                            "TICKET_FIELDS_INVALID",
                            "TICKET_ASSIGNEE_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TICKET_TRANSITION_INVALID, TICKET_REOPEN_EXPIRED, TICKET_CLOSED, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_TRANSITION_INVALID",
                            "TICKET_REOPEN_EXPIRED",
                            "TICKET_CLOSED",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.handle"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/bot/tickets/{ticketId}/attachments": {
      "get": {
        "operationId": "listTicketAttachments",
        "summary": "Attachments of a ticket",
        "description": "Every attachment the bot may see: files of the ticket description (`messageId` null) and of the replies; files of internal notes only with tickets.handle. Deleted files are left out; files still in the malware scan or blocked as infected are listed with their `status` but cannot be downloaded. Tickets the bot may not see answer 404 (no existence leak). Since 1.4.0.\n\n**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attachments, oldest first",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketAttachmentList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/tickets/{ticketId}/attachments/{fileId}/download": {
      "get": {
        "operationId": "downloadTicketAttachment",
        "summary": "Download URL of a ticket attachment",
        "description": "Short-lived signed URL (like GET /bot/files/{fileId}/download) – fetch it without the bot token; the bytes are streamed (HTTP Range supported), the size is bounded by the upload limit of the plan. The file must be an attachment of this ticket that the bot may see (internal notes: tickets.handle) – otherwise 404 TICKET_ATTACHMENT_NOT_FOUND. Files in the malware scan (409 FILE_NOT_READY) or infected (403 FILE_INFECTED) cannot be downloaded; end-to-end encrypted files are refused (409 FILE_E2EE – the server cannot decrypt them). The download policy of the organisation applies. Counts against the normal request limits; audited (BOT_TICKET_ACTION `attachment_downloaded`, no file name). Since 1.4.0; since 1.6.0 `url` is always absolute (built from the public base URL of the instance).\n\n**Permissions** of the bot role: `tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)`.\n\n**Data access**: `TICKETS_READ`.",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "description": "File id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed URL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDownload"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, FILE_INFECTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "FILE_INFECTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND, TICKET_ATTACHMENT_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND",
                            "TICKET_ATTACHMENT_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: FILE_NOT_READY, FILE_E2EE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "FILE_NOT_READY",
                            "FILE_E2EE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.view | tickets.handle | tickets.manage | tickets.create (own tickets)"
        ],
        "x-coviqo-intent": "TICKETS_READ"
      }
    },
    "/bot/tickets/{ticketId}/reporter": {
      "post": {
        "operationId": "reassignTicketReporter",
        "summary": "Hand a ticket of the bot over to a member",
        "description": "For tickets the bot opened **as itself** (`creatorId` = the bot), e.g. before it knew who the person was: the member becomes the reporter and the ticket is then exactly a ticket opened on behalf (`createdByBotId` = this bot, shown as \"created by <bot> on behalf of <member>\"). Same gates as POST /bot/rooms/{roomId}/tickets on behalf: interaction proof (`interactionId` + header X-Coviqo-Interaction-Token, no extra data access) or `onBehalfOfUserId` with the privileged data access TICKETS_CREATE_ON_BEHALF – neither → 400 BOT_ON_BEHALF_REQUIRED. The member must be able to open the ticket as a person (sees the room, tickets.create, not timed out) – never guests, bots or people who left. Tickets already handed over by this bot → 409 TICKET_REPORTER_ALREADY_SET (`details.sameReporter` true when the same member was named – safe to treat a retry as done); tickets of other reporters → 409 TICKET_REPORTER_NOT_BOT. Write limits plus the on-behalf ticket limit (10 per minute and space, scope botticket – shared with tickets opened on behalf). History `reporter` change, realtime update to the member, ticket.updated; audited (BOT_TICKET_ACTION `reporter_reassigned`). The answer contains the ticket once – afterwards the bot sees it only with tickets.view / handle / manage. Since 1.6.0.\n\n**Permissions** of the bot role: `tickets.create (own tickets)`.\n\n**Data access**: `TICKETS_WRITE` (+ `TICKETS_READ` for tickets the bot did not open).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReassignTicketReporterRequest"
              },
              "example": {
                "onBehalfOfUserId": "cm1user0000000000000000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The ticket (now with the member as creator)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_ON_BEHALF_REQUIRED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_ON_BEHALF_REQUIRED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, TICKET_REPORTER_INVALID, TICKET_REPORTER_NO_ACCESS, TICKET_INTERACTION_MISMATCH, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "TICKET_REPORTER_INVALID",
                            "TICKET_REPORTER_NO_ACCESS",
                            "TICKET_INTERACTION_MISMATCH",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TICKET_REPORTER_ALREADY_SET, TICKET_REPORTER_NOT_BOT, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_REPORTER_ALREADY_SET",
                            "TICKET_REPORTER_NOT_BOT",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.create (own tickets)"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/bot/tickets/{ticketId}/messages": {
      "post": {
        "operationId": "createTicketMessage",
        "summary": "Reply or add an internal note",
        "description": "PUBLIC: reply the creator sees (tickets.handle, or the bot’s own ticket) – the first team reply sets the first response time. INTERNAL: note only the team sees (tickets.handle). Closed tickets take internal notes only. Attachments: `attachmentIds` of ticket uploads (POST /bot/rooms/{roomId}/tickets/attachments). Messages (here, in GET /bot/tickets/{ticketId} and in ticket.message.created) carry `author` { id, displayName, isBot } – the display name inside the space (since 1.6.0). **On behalf of a member** (since 1.7.0) the reply becomes the member’s own reply, marked “via <bot>” (`viaBotId`): (1) interaction proof – `interactionId` plus the header X-Coviqo-Interaction-Token of an interaction of this bot in this space by exactly this person, no extra data access; (2) `onBehalfOfUserId` – only with the privileged data access TICKETS_REPLY_ON_BEHALF (on top of TICKETS_WRITE), e.g. to relay e-mail or chat replies. The member must be the reporter or a participant of the ticket, an active member (no guests, bots, people who left) who still sees the room and is not timed out (403 TICKET_REPLIER_INVALID { reason }); public replies only. Everything else runs as the member (status rules – a reply can reopen a resolved ticket within the reopen window –, notifications, mentions). The bot must see the ticket (TICKETS_READ unless it is its own ticket). Replies on behalf count against an extra limit of 30 per minute and space (scope botticketreply) and are audited with the member (BOT_TICKET_ACTION `replied_on_behalf`).\n\n**Permissions** of the bot role: `tickets.handle (internal notes, others’ tickets)`.\n\n**Data access**: `TICKETS_WRITE` (+ `TICKETS_READ` for tickets the bot did not open).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicketMessageRequest"
              },
              "example": {
                "body": "Thanks – we are on it.",
                "kind": "PUBLIC"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new message",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketMessage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TICKET_ATTACHMENT_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TICKET_ATTACHMENT_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT, TICKET_REPLIER_INVALID, TICKET_INTERACTION_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "TICKET_REPLIER_INVALID",
                            "TICKET_INTERACTION_MISMATCH"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TICKET_CLOSED, TICKET_REOPEN_EXPIRED, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_CLOSED",
                            "TICKET_REOPEN_EXPIRED",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.handle (internal notes, others’ tickets)"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/bot/tickets/{ticketId}/messages/{messageId}": {
      "patch": {
        "operationId": "editTicketMessage",
        "summary": "Edit a reply or internal note",
        "description": "Since 1.7.0. Messages the bot wrote itself or posted on behalf of a member (`viaBotId` = this bot) – others: 403 TICKET_MESSAGE_NOT_AUTHOR. Same limits as a new message; public replies of closed tickets only with tickets.handle (409 TICKET_CLOSED). Sets `editedAt` (no history entry), sends `ticket.message.updated`, notifies people mentioned for the first time. Same text: nothing happens. Audited (BOT_TICKET_ACTION `message_edited`, no content).\n\n**Permissions** of the bot role: `the bot sees the ticket`.\n\n**Data access**: `TICKETS_WRITE` (+ `TICKETS_READ` for tickets the bot did not open).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "description": "Message id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketMessageRequest"
              },
              "example": {
                "body": "Thanks – fixed in 2.4.1."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message after the edit",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketMessage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, TICKET_MESSAGE_NOT_AUTHOR, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "TICKET_MESSAGE_NOT_AUTHOR",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND, TICKET_MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND",
                            "TICKET_MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TICKET_CLOSED, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_CLOSED",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "the bot sees the ticket"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteTicketMessage",
        "summary": "Delete a reply or internal note",
        "description": "Since 1.7.0. Messages the bot wrote itself or posted on behalf of a member; with tickets.manage also messages of others (moderation). Public replies of closed tickets only with tickets.handle. Attachments of the message are deleted with it. Sends `ticket.message.deleted` (ids + kind). Audited (BOT_TICKET_ACTION `message_deleted`, no content).\n\n**Permissions** of the bot role: `tickets.manage (messages of others)`.\n\n**Data access**: `TICKETS_WRITE` (+ `TICKETS_READ` for tickets the bot did not open).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "description": "Message id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND, TICKET_MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND",
                            "TICKET_MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TICKET_CLOSED, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_CLOSED",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.manage (messages of others)"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/bot/tickets/{ticketId}/participants/{userId}": {
      "put": {
        "operationId": "addTicketParticipant",
        "summary": "Add a participant",
        "description": "A member who can see the room (no guests, no bots). Idempotent.\n\n**Permissions** of the bot role: `tickets.handle (others’ tickets)`.\n\n**Data access**: `TICKETS_WRITE` (+ `TICKETS_READ` for tickets the bot did not open).\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Tickets"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "description": "Ticket id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: TICKET_PARTICIPANT_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_PARTICIPANT_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TICKET_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TICKET_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TICKET_PARTICIPANTS_LIMIT, TICKETS_E2EE_UNSUPPORTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TICKET_PARTICIPANTS_LIMIT",
                            "TICKETS_E2EE_UNSUPPORTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "tickets.handle (others’ tickets)"
        ],
        "x-coviqo-intent": "TICKETS_WRITE",
        "x-coviqo-write": true
      }
    },
    "/hooks/{webhookId}": {
      "post": {
        "operationId": "executeIncomingWebhook",
        "summary": "Post through an incoming webhook",
        "description": "No bot account: the message is authored by the person who created the webhook and shows the webhook’s name / avatar. The secret goes into the `secret` query parameter or the X-Coviqo-Webhook-Secret header – never into the path.",
        "tags": [
          "Incoming webhooks"
        ],
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "description": "Webhook id (from the webhook URL)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncomingWebhookPayload"
              },
              "example": {
                "content": "Deploy **v2.3.1** succeeded",
                "username": "CI"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Posted"
          },
          "400": {
            "description": "Invalid input: MESSAGE_EMPTY, VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "MESSAGE_EMPTY",
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: WEBHOOK_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "WEBHOOK_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: WEBHOOK_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "WEBHOOK_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: WEBHOOK_OWNER_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "WEBHOOK_OWNER_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/WebhookRateLimited"
          },
          "503": {
            "description": "Switched off: WEBHOOKS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "WEBHOOKS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "WebhookSecretQuery": []
          },
          {
            "WebhookSecretHeader": []
          }
        ]
      }
    },
    "/bot/spaces/{spaceId}/members/by-discord/{discordUserId}": {
      "get": {
        "operationId": "getMemberByDiscord",
        "summary": "Member by linked Discord account",
        "description": "The active member who linked this Discord account AND released it for the bots of this space (consent \"BOTS_LINKED_DISCORD\", revocable). Unknown ids and members without consent both answer 404 MEMBER_NOT_FOUND.\n\n**Data access**: `LINKED_ACCOUNTS`.",
        "tags": [
          "Profile & spaces"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "discordUserId",
            "in": "path",
            "required": true,
            "description": "Discord user id (snowflake) of a linked account",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The member incl. `linkedAccounts`",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "LINKED_ACCOUNTS"
      }
    },
    "/bot/spaces/{spaceId}/linked-accounts": {
      "get": {
        "operationId": "listLinkedAccounts",
        "summary": "Members who share a linked account",
        "description": "Active members with a linked account of `provider` who released it for the bots of this space, ordered by user id. Changes arrive as `member.linked_account_updated`.\n\n**Data access**: `LINKED_ACCOUNTS`.",
        "tags": [
          "Profile & spaces"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "description": "Provider of the linked account (default `discord`)",
            "schema": {
              "type": "string",
              "enum": [
                "discord"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a user id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 1000)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedAccountPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "LINKED_ACCOUNTS"
      }
    },
    "/bot/spaces/{spaceId}/teams": {
      "get": {
        "operationId": "listTeams",
        "summary": "List teams",
        "description": "Space teams plus the organisation teams usable in the space (read-only for bots), ordered by position.\n\n**Data access**: `MEMBERS`.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The teams",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "MEMBERS"
      }
    },
    "/bot/teams/{teamId}": {
      "patch": {
        "operationId": "updateTeam",
        "summary": "Change team settings",
        "description": "Since 1.4.0. Name, join mode (OPEN / APPLICATION / INVITE_ONLY / PASSWORD since 1.6.0) and the application question of a space team – with the rules for people (teams.manage of the bot role; bots are never team leads). The team tree, IdP group, position and room grants stay with people. Switching to OPEN is refused with 409 TEAM_GRANTS_ABOVE_BOT { permissions } while the team or a parent team grants room / category permissions the bot does not hold itself. Audited as TEAM_UPDATED with the bot. Since 1.6.0: joinPolicy PASSWORD with `password` (write-only, stored hashed, never returned – the team only shows `hasJoinPassword`). Switching to PASSWORD needs a password (400 TEAM_JOIN_PASSWORD_REQUIRED); `password` alone changes it. Setting a password gets the same 409 TEAM_GRANTS_ABOVE_BOT check as OPEN (the bot knows the password, so it controls who joins) – unless the team is OPEN already. The audit names the change `joinPassword`, never the password.\n\n**Permissions** of the bot role: `teams.manage`.\n\n**Data access**: `TEAMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTeamRequest"
              },
              "example": {
                "joinPolicy": "APPLICATION",
                "applicationPrompt": "Which games do you play?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The changed team",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TEAM_SPACE_ONLY, TEAM_APPLICATION_SPACE_ONLY, TEAM_JOIN_PASSWORD_REQUIRED, TEAM_JOIN_PASSWORD_NOT_APPLICABLE",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TEAM_SPACE_ONLY",
                            "TEAM_APPLICATION_SPACE_ONLY",
                            "TEAM_JOIN_PASSWORD_REQUIRED",
                            "TEAM_JOIN_PASSWORD_NOT_APPLICABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, FORBIDDEN, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "FORBIDDEN",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TEAM_GRANTS_ABOVE_BOT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_GRANTS_ABOVE_BOT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "teams.manage"
        ],
        "x-coviqo-intent": "TEAMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/teams/{teamId}/members": {
      "get": {
        "operationId": "listTeamMembers",
        "summary": "Team members",
        "description": "Direct members (members of sub-teams are listed at their own team).\n\n**Data access**: `MEMBERS`.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The members",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "MEMBERS"
      }
    },
    "/bot/teams/{teamId}/members/{userId}": {
      "put": {
        "operationId": "putTeamMember",
        "summary": "Add a team member / set the lead flag",
        "description": "Idempotent. Only active non-guest members of the space. Sends `team.member.added` for new members (via `manual`).\n\n**Permissions** of the bot role: `teams.manage`.\n\n**Data access**: `MEMBERS`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutTeamMemberRequest"
              },
              "example": {
                "isLead": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TEAM_MEMBER_INVALID, TEAM_SPACE_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TEAM_MEMBER_INVALID",
                            "TEAM_SPACE_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND, TEAM_MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND",
                            "TEAM_MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "teams.manage"
        ],
        "x-coviqo-intent": "MEMBERS",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "removeTeamMember",
        "summary": "Remove a team member",
        "description": "Memberships synced from the identity provider cannot be removed (409 TEAM_IDP_MANAGED). Sends `team.member.removed` (via `removed`).\n\n**Permissions** of the bot role: `teams.manage`.\n\n**Data access**: `MEMBERS`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: TEAM_SPACE_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_SPACE_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND, TEAM_MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND",
                            "TEAM_MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TEAM_IDP_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_IDP_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "teams.manage"
        ],
        "x-coviqo-intent": "MEMBERS",
        "x-coviqo-write": true
      }
    },
    "/bot/teams/{teamId}/applications": {
      "get": {
        "operationId": "listTeamApplications",
        "summary": "Applications to a team",
        "description": "Teams with joinPolicy APPLICATION. The bot must be able to decide (teams.manage). New ones arrive as `team.application.created`.\n\n**Permissions** of the bot role: `teams.manage`.\n\n**Data access**: `MEMBERS`.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "PENDING | ACCEPTED | DECLINED | WITHDRAWN (default: all)",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "ACCEPTED",
                "DECLINED",
                "WITHDRAWN"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamApplicationPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: TEAM_SPACE_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_SPACE_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "teams.manage"
        ],
        "x-coviqo-intent": "MEMBERS"
      },
      "post": {
        "operationId": "applyToTeam",
        "summary": "Apply on behalf of a member",
        "description": "Since 1.4.0. Bots never apply for themselves – the member is named by (1) interaction proof – `interactionId` plus the header X-Coviqo-Interaction-Token of an interaction of this bot in this space, no extra data access – or (2) `onBehalfOfUserId` with the privileged data access TEAM_APPLY_ON_BEHALF (any active member, e.g. a recruitment form on a clan website); both given must name the same person. All rules of a personal application apply (joinPolicy APPLICATION, one open application per team, open limit, cooldown – 429 TEAM_APPLICATION_COOLDOWN { retryAfter }); the deciders are notified as usual, `team.application.created` is sent and the application shows \"via <bot>\" (`createdByBotId`). The member can withdraw it – and so can the bot (POST /bot/team-applications/{applicationId}/withdraw, since 1.5.0, no cooldown). Extra limit of 10 per minute and space (scope botonbehalf); audited as BOT_MEMBER_ACTION `team_applied` (no message content).\n\n**Data access**: `MEMBERS`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamApplicationRequest"
              },
              "example": {
                "message": "Hi, I would like to join the raid team.",
                "onBehalfOfUserId": "clx…"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new application",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamApplication"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_ON_BEHALF_REQUIRED, TEAM_SPACE_ONLY, TEAM_MEMBER_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_ON_BEHALF_REQUIRED",
                            "TEAM_SPACE_ONLY",
                            "TEAM_MEMBER_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_ON_BEHALF_INVALID, BOT_INTERACTION_MISMATCH, TEAM_NOT_APPLICATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_ON_BEHALF_INVALID",
                            "BOT_INTERACTION_MISMATCH",
                            "TEAM_NOT_APPLICATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TEAM_APPLICATION_PENDING, TEAM_ALREADY_MEMBER, TEAM_APPLICATION_LIMIT, BOT_MEMBER_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_APPLICATION_PENDING",
                            "TEAM_ALREADY_MEMBER",
                            "TEAM_APPLICATION_LIMIT",
                            "BOT_MEMBER_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "MEMBERS",
        "x-coviqo-write": true
      }
    },
    "/bot/team-applications/{applicationId}/withdraw": {
      "post": {
        "operationId": "withdrawTeamApplication",
        "summary": "Withdraw an application on behalf of the applicant",
        "description": "Since 1.5.0. Withdraws a PENDING application that THIS bot created on behalf of the person (`createdByBotId`) – the same as the person withdrawing it, but without the re-application cooldown (declining it would block the person for 24 h). Applications the person wrote themselves or another bot created: 403 TEAM_APPLICATION_NOT_BY_BOT. Gate like applying: (1) interaction proof – `interactionId` plus the header X-Coviqo-Interaction-Token of an interaction of this bot in this space by the applicant, no extra data access – or (2) TEAM_APPLY_ON_BEHALF. The applicant must still be an active member. Sends `team.application.decided` with status WITHDRAWN and `withdrawnByBotId`. Shares the extra limit of 10 per minute and space with applying (scope botonbehalf); audited as BOT_MEMBER_ACTION `team_application_withdrawn`.\n\n**Data access**: `MEMBERS`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "description": "applicationId",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/InteractionTokenOptional"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawTeamApplicationRequest"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The withdrawn application",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamApplication"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_ON_BEHALF_INVALID, BOT_INTERACTION_MISMATCH, TEAM_APPLICATION_NOT_BY_BOT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_ON_BEHALF_INVALID",
                            "BOT_INTERACTION_MISMATCH",
                            "TEAM_APPLICATION_NOT_BY_BOT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_APPLICATION_NOT_FOUND, BOT_INTERACTION_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_APPLICATION_NOT_FOUND",
                            "BOT_INTERACTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TEAM_APPLICATION_NOT_PENDING",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_APPLICATION_NOT_PENDING"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "MEMBERS",
        "x-coviqo-write": true
      }
    },
    "/bot/team-applications/{applicationId}/decision": {
      "post": {
        "operationId": "decideTeamApplication",
        "summary": "Accept or decline an application",
        "description": "ACCEPTED adds the person as a normal member (`team.member.added` via `application`). The applicant is notified; the note is shown to them. Sends `team.application.decided`.\n\n**Permissions** of the bot role: `teams.manage`.\n\n**Data access**: `MEMBERS`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "description": "applicationId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamApplicationDecisionRequest"
              },
              "example": {
                "decision": "ACCEPTED",
                "note": "Welcome aboard!"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The decided application",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamApplication"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TEAM_MEMBER_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TEAM_MEMBER_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_APPLICATION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_APPLICATION_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: TEAM_APPLICATION_NOT_PENDING",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_APPLICATION_NOT_PENDING"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "teams.manage"
        ],
        "x-coviqo-intent": "MEMBERS",
        "x-coviqo-write": true
      }
    },
    "/bot/teams/{teamId}/announcements": {
      "get": {
        "operationId": "listTeamAnnouncements",
        "summary": "Team announcements",
        "description": "**Data access**: `MEMBERS`.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 20, at most 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAnnouncementPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: TEAM_SPACE_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "TEAM_SPACE_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, TEAM_NOT_MEMBER",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "TEAM_NOT_MEMBER"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "MEMBERS"
      },
      "post": {
        "operationId": "createTeamAnnouncement",
        "summary": "Post a team announcement",
        "description": "Notifies the members of the team and its sub-teams; optionally also posts it into a room. At most 10 per team and hour (429 TEAM_ANNOUNCEMENT_RATE_LIMITED).\n\n**Permissions** of the bot role: `teams.manage`, `chat.send (roomId)`.\n\n**Data access**: `MEMBERS`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamAnnouncementRequest"
              },
              "example": {
                "title": "Raid tonight",
                "content": "Meet at 20:00 in Squad 1.",
                "roomId": null
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The announcement",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAnnouncement"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, TEAM_SPACE_ONLY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "TEAM_SPACE_ONLY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, TEAM_NOT_FOUND, ROOM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND",
                            "ROOM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "teams.manage",
          "chat.send (roomId)"
        ],
        "x-coviqo-intent": "MEMBERS",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/forum": {
      "get": {
        "operationId": "getForum",
        "summary": "Forum tags and rules",
        "description": "Tags (set up by moderators – standard data access), whether a tag is required, and what the bot may do here.\n\n**Permissions** of the bot role: `chat.view`.",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The forum",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forum"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ]
      }
    },
    "/bot/rooms/{roomId}/forum/posts": {
      "get": {
        "operationId": "listForumPosts",
        "summary": "List posts",
        "description": "Pinned posts first, then by `sort` (default: the forum’s sort). Titles and excerpts are content.\n\n**Permissions** of the bot role: `chat.view`.\n\n**Data access**: `MESSAGE_CONTENT`.",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order after the pinned posts (default: the forum’s default sort)",
            "schema": {
              "type": "string",
              "enum": [
                "activity",
                "newest",
                "reactions"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "`all` (default), `open` or `solved`",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "open",
                "solved"
              ]
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Only posts with this tag id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search words in titles, first messages and replies (at least 2 characters)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 25, at most 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPostPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED, VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED",
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ],
        "x-coviqo-intent": "MESSAGE_CONTENT"
      },
      "post": {
        "operationId": "createForumPost",
        "summary": "Create a post",
        "description": "Title plus an optional first message (with buttons / select menus like a bot message) and tags. The forum’s rules apply: required tag, moderator-only tags (forum.manage). Sends `forum.post_created`; the bot follows its post.\n\n**Permissions** of the bot role: `chat.view`, `chat.send`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateForumPostRequest"
              },
              "example": {
                "title": "Server maintenance on Friday",
                "content": "The game server is down **20:00–22:00**.",
                "tagIds": [
                  "cm1tag00000000000000000"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new post",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, FORUM_TITLE_INVALID, FORUM_TAG_REQUIRED, FORUM_TAGS_TOO_MANY, FORUM_TAG_INVALID, BOT_COMPONENTS_INVALID, ROOM_MODULE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "FORUM_TITLE_INVALID",
                            "FORUM_TAG_REQUIRED",
                            "FORUM_TAGS_TOO_MANY",
                            "FORUM_TAG_INVALID",
                            "BOT_COMPONENTS_INVALID",
                            "ROOM_MODULE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, FORUM_TAG_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "FORUM_TAG_RESTRICTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "chat.send"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/forum/posts/{postId}": {
      "get": {
        "operationId": "getForumPost",
        "summary": "One post",
        "description": "The post, its first message and the accepted answer.\n\n**Permissions** of the bot role: `chat.view`.\n\n**Data access**: `MESSAGE_CONTENT`.",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The post",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPostDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ],
        "x-coviqo-intent": "MESSAGE_CONTENT"
      },
      "patch": {
        "operationId": "updateForumPost",
        "summary": "Change title / tags",
        "description": "Own posts (chat.send) or any post with forum.manage. The first message is edited with PATCH /bot/messages/{messageId} (message id = post id).\n\n**Permissions** of the bot role: `chat.view`, `chat.send (own post) or forum.manage`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateForumPostRequest"
              },
              "example": {
                "title": "Server maintenance moved to Saturday"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post (`title` / `excerpt` null for posts of others without MESSAGE_CONTENT)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, FORUM_TITLE_INVALID, FORUM_TAG_REQUIRED, FORUM_TAGS_TOO_MANY, FORUM_TAG_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "FORUM_TITLE_INVALID",
                            "FORUM_TAG_REQUIRED",
                            "FORUM_TAGS_TOO_MANY",
                            "FORUM_TAG_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, FORUM_NOT_AUTHOR, FORUM_TAG_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "FORUM_NOT_AUTHOR",
                            "FORUM_TAG_RESTRICTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "chat.send (own post) or forum.manage"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/forum/posts/{postId}/replies": {
      "get": {
        "operationId": "listForumReplies",
        "summary": "Replies of a post",
        "description": "Newest first. New replies arrive as `message.created`.\n\n**Permissions** of the bot role: `chat.view`.\n\n**Data access**: `MESSAGE_CONTENT`.",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Reply id – returns older replies (`nextCursor` of the previous page)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventMessagePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND, MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND",
                            "MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view"
        ],
        "x-coviqo-intent": "MESSAGE_CONTENT"
      },
      "post": {
        "operationId": "createForumReply",
        "summary": "Reply to a post",
        "description": "Posts into the post’s discussion as the bot (optional buttons / select menus). Locked posts only with forum.manage (403 FORUM_POST_LOCKED).\n\n**Permissions** of the bot role: `chat.view`, `chat.send`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumReplyRequest"
              },
              "example": {
                "content": "Done – the server is back online."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new reply",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, MESSAGE_EMPTY, BOT_COMPONENTS_INVALID, ROOM_MODULE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "MESSAGE_EMPTY",
                            "BOT_COMPONENTS_INVALID",
                            "ROOM_MODULE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, FORUM_POST_LOCKED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "FORUM_POST_LOCKED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND, MESSAGE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND",
                            "MESSAGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "chat.send"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/forum/posts/{postId}/solved": {
      "put": {
        "operationId": "setForumPostSolved",
        "summary": "Mark solved / pick the answer",
        "description": "Own posts or any post with forum.manage. `solved: false` clears the answer.\n\n**Permissions** of the bot role: `chat.view`, `forum.manage (posts of others)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumSolvedRequest"
              },
              "example": {
                "solved": true,
                "answerId": "cm1msg00000000000000000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post (`title` / `excerpt` null for posts of others without MESSAGE_CONTENT)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, FORUM_ANSWER_INVALID, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "FORUM_ANSWER_INVALID",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, FORUM_NOT_AUTHOR",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "FORUM_NOT_AUTHOR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "forum.manage (posts of others)"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/forum/posts/{postId}/pinned": {
      "put": {
        "operationId": "setForumPostPinned",
        "summary": "Pin / unpin a post",
        "description": "**Permissions** of the bot role: `chat.view`, `forum.manage`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumFlagRequest"
              },
              "example": {
                "value": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post (`title` / `excerpt` null for posts of others without MESSAGE_CONTENT)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "forum.manage"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/forum/posts/{postId}/locked": {
      "put": {
        "operationId": "setForumPostLocked",
        "summary": "Lock / unlock a post",
        "description": "Locked posts take replies only from people / bots with forum.manage.\n\n**Permissions** of the bot role: `chat.view`, `forum.manage`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Forum"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Forum post id (= id of its first message)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumFlagRequest"
              },
              "example": {
                "value": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post (`title` / `excerpt` null for posts of others without MESSAGE_CONTENT)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, FORUM_POST_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "FORUM_POST_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, ROOM_ARCHIVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "ROOM_ARCHIVED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "chat.view",
          "forum.manage"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/members/{userId}/roles/{roleId}": {
      "put": {
        "operationId": "addMemberRole",
        "summary": "Assign a role",
        "description": "Only roles in the installation’s allow-list (bot detail → “Assign roles”), strictly below the bot’s own role; roles with moderation-like permissions only with “assign elevated roles”, roles with admin-level permissions only with “allow roles with admin rights” (set by the space owner or an administrator). Any active human member – the member’s own position does not matter (Discord semantics), the owner included (ownership itself is not a role and never changes); never bots, guests never get elevated roles. Idempotent. Sends `member.roles_updated` with `added`, `removed`, `actorId`.\n\n**Data access**: `ROLES_ASSIGN`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "description": "Role id (GET /bot/spaces/{spaceId}/roles)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignRequest"
              },
              "example": {
                "reason": "Discord role sync"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member after the change",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_ROLE_NOT_ALLOWED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_ROLE_NOT_ALLOWED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_ROLE_NOT_ASSIGNABLE, ROLE_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_ROLE_NOT_ASSIGNABLE",
                            "ROLE_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, ROLE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "ROLE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED, GUEST_ROLE_ELEVATED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED",
                            "GUEST_ROLE_ELEVATED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "ROLES_ASSIGN",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "removeMemberRole",
        "summary": "Remove a role",
        "description": "Same rules as assigning (allow-list, below the bot role …). Idempotent.\n\n**Data access**: `ROLES_ASSIGN`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "description": "Role id (GET /bot/spaces/{spaceId}/roles)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignRequest"
              },
              "example": {
                "reason": "Left the clan"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member after the change",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_ROLE_NOT_ALLOWED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_ROLE_NOT_ALLOWED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_ROLE_NOT_ASSIGNABLE, ROLE_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_ROLE_NOT_ASSIGNABLE",
                            "ROLE_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, ROLE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "ROLE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED, GUEST_ROLE_ELEVATED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED",
                            "GUEST_ROLE_ELEVATED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "ROLES_ASSIGN",
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/members/{userId}/roles": {
      "patch": {
        "operationId": "patchMemberRoles",
        "summary": "Add and remove roles at once",
        "description": "Atomic: every role is checked first (same rules as PUT); one failing role fails the whole request and nothing changes. At most 25 ids in `add` and in `remove`; a role must not be in both.\n\n**Data access**: `ROLES_ASSIGN`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RolesPatchRequest"
              },
              "example": {
                "add": [
                  "role_member"
                ],
                "remove": [
                  "role_recruit"
                ],
                "reason": "Promotion"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member after the change",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_ROLE_NOT_ALLOWED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_ROLE_NOT_ALLOWED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, BOT_ROLE_NOT_ASSIGNABLE, ROLE_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "BOT_ROLE_NOT_ASSIGNABLE",
                            "ROLE_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, ROLE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "ROLE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: BOT_MEMBER_MANAGED, GUEST_ROLE_ELEVATED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_MEMBER_MANAGED",
                            "GUEST_ROLE_ELEVATED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "ROLES_ASSIGN",
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/categories": {
      "get": {
        "operationId": "listCategories",
        "summary": "Room categories",
        "description": "With room.create: all categories of the space; otherwise only categories with rooms the bot can see.",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Categories in sidebar order",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoomCategory"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createCategory",
        "summary": "Create a category",
        "description": "Counts to the daily cap of 50 new rooms + categories per bot and space (429 RATE_LIMITED, scope `botrooms`).\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoryRequest"
              },
              "example": {
                "name": "Clan wars"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The category",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomCategory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/categories/{categoryId}": {
      "patch": {
        "operationId": "renameCategory",
        "summary": "Rename a category",
        "description": "**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "description": "Room category id (GET /bot/spaces/{spaceId}/categories)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoryRequest"
              },
              "example": {
                "name": "Season 4"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The category",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomCategory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, CATEGORY_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "CATEGORY_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteCategory",
        "summary": "Delete a category",
        "description": "Its rooms stay (without a category, with their current permissions).\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "description": "Room category id (GET /bot/spaces/{spaceId}/categories)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, CATEGORY_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "CATEGORY_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}": {
      "patch": {
        "operationId": "updateRoom",
        "summary": "Edit a room",
        "description": "Omitted fields stay. Moving to another category (`categoryId`) also needs room.manage in the space; `permissions: \"category\"` applies the override rules (only permissions the bot holds, only entries below the bot role). Meeting rooms and Runden are managed elsewhere (409).\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoomRequest"
              },
              "example": {
                "name": "Squad 3 (closed)",
                "userLimit": 4
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The room",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotRoomDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, PERMISSION_ESCALATION, ROLE_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "PERMISSION_ESCALATION",
                            "ROLE_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, CATEGORY_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "CATEGORY_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED, LOBBY_TYPE_FIXED, MAP_TYPE_FIXED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED",
                            "LOBBY_TYPE_FIXED",
                            "MAP_TYPE_FIXED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteRoom",
        "summary": "Delete a room",
        "description": "Permanent – messages, notes, files and tasks of the room go with it, a running call ends. The default room and the AFK room of the space cannot be deleted by bots (409 BOT_ROOM_PROTECTED). Prefer archiving.\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_ROOM_PROTECTED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_ROOM_PROTECTED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/archive": {
      "post": {
        "operationId": "archiveRoom",
        "summary": "Archive a room",
        "description": "Read-only, hidden from the sidebar; can be restored. Not the default room or the AFK room (409 BOT_ROOM_PROTECTED).\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The room",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotRoomDetail"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_ROOM_PROTECTED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_ROOM_PROTECTED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/unarchive": {
      "post": {
        "operationId": "unarchiveRoom",
        "summary": "Restore an archived room",
        "description": "**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The room",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotRoomDetail"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/overrides": {
      "get": {
        "operationId": "listRoomOverrides",
        "summary": "Permission overrides of a room",
        "description": "Role, member and team entries (team entries can be changed since 1.6.0).\n\n**Permissions** of the bot role: `room.manage`.",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overrides",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoomOverride"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ]
      }
    },
    "/bot/rooms/{roomId}/overrides/roles/{roleId}": {
      "put": {
        "operationId": "putRoleOverride",
        "summary": "Set the room permissions of a role",
        "description": "Replaces the role’s entry (allow / deny, room-scoped permissions only). The role must be strictly below the bot role; never the owner role, a bot role or a role with admin-level permissions (the default role is fine). The bot only adds or removes permission bits it holds itself in this room (403 PERMISSION_ESCALATION) and never permissions bots cannot hold (400 BOT_PERMISSION_FORBIDDEN). Guests never get elevated permissions (409 GUEST_ROLE_ELEVATED). Changing a synced room ends the sync.\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "description": "Role id (GET /bot/spaces/{spaceId}/roles)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutOverrideRequest"
              },
              "example": {
                "allow": [
                  "room.view",
                  "room.join"
                ],
                "deny": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The entry",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomOverride"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, BOT_OVERRIDE_NOT_ALLOWED, INVALID_PERMISSION, BOT_PERMISSION_FORBIDDEN",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "BOT_OVERRIDE_NOT_ALLOWED",
                            "INVALID_PERMISSION",
                            "BOT_PERMISSION_FORBIDDEN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, ROLE_HIERARCHY, PERMISSION_ESCALATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "ROLE_HIERARCHY",
                            "PERMISSION_ESCALATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, ROLE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "ROLE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED, GUEST_ROLE_ELEVATED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED",
                            "GUEST_ROLE_ELEVATED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteRoleOverride",
        "summary": "Remove the room permissions of a role",
        "description": "Same target rules as setting; only entries whose permissions the bot holds itself in this room.\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "description": "Role id (GET /bot/spaces/{spaceId}/roles)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: BOT_OVERRIDE_NOT_ALLOWED, BOT_PERMISSION_FORBIDDEN",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_OVERRIDE_NOT_ALLOWED",
                            "BOT_PERMISSION_FORBIDDEN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, ROLE_HIERARCHY, PERMISSION_ESCALATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "ROLE_HIERARCHY",
                            "PERMISSION_ESCALATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, ROLE_NOT_FOUND, OVERRIDE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "ROLE_NOT_FOUND",
                            "OVERRIDE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/overrides/members/{userId}": {
      "put": {
        "operationId": "putMemberOverride",
        "summary": "Set the room permissions of a member",
        "description": "Replaces the member’s entry (allow / deny, room-scoped permissions only). The member’s highest role must be strictly below the bot role; never the owner, administrators or bots. The bot only adds or removes permission bits it holds itself in this room (403 PERMISSION_ESCALATION) and never permissions bots cannot hold (400 BOT_PERMISSION_FORBIDDEN). Guests never get elevated permissions (409 GUEST_ROLE_ELEVATED). Changing a synced room ends the sync.\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutOverrideRequest"
              },
              "example": {
                "allow": [
                  "room.view",
                  "room.join"
                ],
                "deny": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The entry",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomOverride"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, INVALID_PERMISSION, BOT_PERMISSION_FORBIDDEN",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "INVALID_PERMISSION",
                            "BOT_PERMISSION_FORBIDDEN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, MEMBER_HIERARCHY, PERMISSION_ESCALATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "MEMBER_HIERARCHY",
                            "PERMISSION_ESCALATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, MEMBER_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_MEMBER_MANAGED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED, GUEST_ROLE_ELEVATED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_MEMBER_MANAGED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED",
                            "GUEST_ROLE_ELEVATED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteMemberOverride",
        "summary": "Remove the room permissions of a member",
        "description": "Same target rules as setting; only entries whose permissions the bot holds itself in this room.\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: BOT_PERMISSION_FORBIDDEN",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_PERMISSION_FORBIDDEN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, MEMBER_HIERARCHY, PERMISSION_ESCALATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "MEMBER_HIERARCHY",
                            "PERMISSION_ESCALATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, MEMBER_NOT_FOUND, OVERRIDE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "MEMBER_NOT_FOUND",
                            "OVERRIDE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_MEMBER_MANAGED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_MEMBER_MANAGED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/overrides/teams/{teamId}": {
      "put": {
        "operationId": "putTeamOverride",
        "summary": "Set the room permissions of a team",
        "description": "Since 1.6.0. Replaces the team’s entry (allow / deny, room-scoped permissions only). The team must be a team of this space or an organisation team of its organisation (like in the room settings). Members of the team and of its sub-teams get the entry. Never a team with a bot account among its (sub-team) members (409 BOT_MEMBER_MANAGED). Deny entries – set, kept or lifted – need every member of the team and its sub-teams in this space strictly below the bot role: never the owner, administrators or members with an admin-level role (403 TEAM_HIERARCHY { reason, userId }). The bot only adds or removes permission bits it holds itself in this room (403 PERMISSION_ESCALATION) and never permissions bots cannot hold or admin-level permissions (400 BOT_PERMISSION_FORBIDDEN) – so a team stays openable for the bot (no 409 TEAM_GRANTS_ABOVE_BOT because of its own entries); an OPEN team gets at most what the bot could give the default role. Guests in the team never get elevated permissions (409 GUEST_ROLE_ELEVATED). Changing a synced room ends the sync.\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutOverrideRequest"
              },
              "example": {
                "allow": [
                  "room.view",
                  "room.join",
                  "voice.speak"
                ],
                "deny": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The entry",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomOverride"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, INVALID_PERMISSION, BOT_PERMISSION_FORBIDDEN",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "INVALID_PERMISSION",
                            "BOT_PERMISSION_FORBIDDEN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TEAM_HIERARCHY, PERMISSION_ESCALATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TEAM_HIERARCHY",
                            "PERMISSION_ESCALATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, TEAM_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_MEMBER_MANAGED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED, GUEST_ROLE_ELEVATED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_MEMBER_MANAGED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED",
                            "GUEST_ROLE_ELEVATED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      },
      "delete": {
        "operationId": "deleteTeamOverride",
        "summary": "Remove the room permissions of a team",
        "description": "Since 1.6.0. Same team rules as setting; only entries whose permissions the bot holds itself in this room (and, for entries with deny bits, only when every team member is below the bot role).\n\n**Permissions** of the bot role: `room.manage`.\n\n**Data access**: `ROOMS_MANAGE`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "Team id (GET /bot/spaces/{spaceId}/teams)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: BOT_PERMISSION_FORBIDDEN",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_PERMISSION_FORBIDDEN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, BOT_INTENT_REQUIRED, TEAM_HIERARCHY, PERMISSION_ESCALATION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "BOT_INTENT_REQUIRED",
                            "TEAM_HIERARCHY",
                            "PERMISSION_ESCALATION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, TEAM_NOT_FOUND, OVERRIDE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "TEAM_NOT_FOUND",
                            "OVERRIDE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_MEMBER_MANAGED, MEETING_ROOM_MANAGED, LOBBY_SESSION_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_MEMBER_MANAGED",
                            "MEETING_ROOM_MANAGED",
                            "LOBBY_SESSION_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "room.manage"
        ],
        "x-coviqo-intent": "ROOMS_MANAGE",
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/voice/members/{userId}/move": {
      "post": {
        "operationId": "moveVoiceMember",
        "summary": "Move a person to another voice room",
        "description": "The person must be in the voice call of `roomId`. Needs voice.move_members in both rooms and room.join in the target room. Only people strictly below the bot role – never the owner, administrators or bots. Moves that would need a confirmation (full room, person cannot join the target) are refused (409 VOICE_MOVE_CONFIRM_REQUIRED). Audit `VOICE_MEMBER_MOVED` with the bot as mover; event `voice.member_moved`.\n\n**Permissions** of the bot role: `voice.move_members`, `room.join (target room)`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceMoveRequest"
              },
              "example": {
                "targetRoomId": "room_squad3"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Moved",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED, VOICE_SAME_ROOM, MODERATION_SELF",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED",
                            "VOICE_SAME_ROOM",
                            "MODERATION_SELF"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, MODERATION_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "MODERATION_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, VOICE_PARTICIPANT_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "VOICE_PARTICIPANT_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_MEMBER_MANAGED, VOICE_MOVE_CONFIRM_REQUIRED, VOICE_TARGET_NO_ACCESS, ROOM_MODULE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_MEMBER_MANAGED",
                            "VOICE_MOVE_CONFIRM_REQUIRED",
                            "VOICE_TARGET_NO_ACCESS",
                            "ROOM_MODULE_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "voice.move_members",
          "room.join (target room)"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/rooms/{roomId}/voice/members/{userId}": {
      "delete": {
        "operationId": "disconnectVoiceMember",
        "summary": "Disconnect a person from voice",
        "description": "Ends the person’s voice connection in this room (they can rejoin). Same hierarchy as moving. Audit `VOICE_MEMBER_DISCONNECTED` with the bot as actor.\n\n**Permissions** of the bot role: `voice.move_members`.\n\nCounts against the write limits (30 / min per bot and space, 120 / min per space).",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "description": "Room id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "User id of the member",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Disconnected",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Invalid input: MODERATION_SELF",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "MODERATION_SELF"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION, MEMBER_TIMED_OUT, MODERATION_HIERARCHY",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION",
                            "MEMBER_TIMED_OUT",
                            "MODERATION_HIERARCHY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: ROOM_NOT_FOUND, SPACE_NOT_FOUND, VOICE_PARTICIPANT_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "ROOM_NOT_FOUND",
                            "SPACE_NOT_FOUND",
                            "VOICE_PARTICIPANT_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict: E2EE_FEATURE_DISABLED, BOT_MEMBER_MANAGED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 409
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "E2EE_FEATURE_DISABLED",
                            "BOT_MEMBER_MANAGED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "voice.move_members"
        ],
        "x-coviqo-write": true
      }
    },
    "/bot/spaces/{spaceId}/invites": {
      "get": {
        "operationId": "listInvites",
        "summary": "Invites with join counts",
        "description": "Invite links of the space, newest first, with `joinedMembers` (active members that joined through each). Expired / used-up invites are included; revoked ones only with `includeRevoked=true`. No e-mail addresses.\n\n**Permissions** of the bot role: `space.invite | space.manage_members`.",
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeRevoked",
            "in": "query",
            "required": false,
            "description": "`true` lists revoked invites too",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (an invite id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "space.invite | space.manage_members"
        ]
      }
    },
    "/bot/spaces/{spaceId}/invites/{inviteId}/members": {
      "get": {
        "operationId": "listInviteMembers",
        "summary": "Members who joined through an invite",
        "description": "Active members whose last (re-)join used this invite, ordered by member id (incl. `joinSource`).\n\n**Permissions** of the bot role: `space.invite | space.manage_members`.",
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "description": "Invite id (GET /bot/spaces/{spaceId}/invites)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a member id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 1000)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMemberPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND, INVITE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND",
                            "INVITE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "space.invite | space.manage_members"
        ]
      }
    },
    "/bot/spaces/{spaceId}/bans": {
      "get": {
        "operationId": "listBans",
        "summary": "Active bans",
        "description": "Bans that have not expired, ordered by user id. Expired bans are lifted every minute (`member.unbanned` with `expired: true`).\n\n**Permissions** of the bot role: `moderate.ban`.",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a user id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 1000)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BanPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.ban"
        ]
      }
    },
    "/bot/spaces/{spaceId}/moderation-actions": {
      "get": {
        "operationId": "listModerationActions",
        "summary": "Moderation log",
        "description": "Warnings, kicks, bans, unbans and timeouts, newest first.\n\n**Permissions** of the bot role: `moderate.kick | moderate.ban | moderate.timeout | moderate.reports`.",
        "tags": [
          "Moderation"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "description": "Only actions against this person",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 50, at most 100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationActionPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, MISSING_PERMISSION",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "MISSING_PERMISSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-permissions": [
          "moderate.kick | moderate.ban | moderate.timeout | moderate.reports"
        ]
      }
    },
    "/bot/spaces/{spaceId}/voice/states": {
      "get": {
        "operationId": "listVoiceStates",
        "summary": "Who is in voice right now",
        "description": "Everybody in the voice rooms the bot can see with mute / deafen / video / screen share / stage state (never speaking). Changes arrive as `voice.state_updated`.",
        "tags": [
          "Voice data"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceStates"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/bot/spaces/{spaceId}/voice/activity": {
      "get": {
        "operationId": "getVoiceActivity",
        "summary": "Voice activity report",
        "description": "Per person: time in voice, muted / deafened / AFK time within [from, to) (default: the last 30 days; at most 92 days). Open sessions count until now. Only rooms the bot can see. 10 requests per bot and minute together with /voice/sessions (429 RATE_LIMITED, scope `botvoice`).\n\n**Data access**: `VOICE_ACTIVITY`.",
        "tags": [
          "Voice data"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start (ISO 8601, inclusive)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "End (ISO 8601, exclusive; default now)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "userIds",
            "in": "query",
            "required": false,
            "description": "Comma-separated user ids (≤ 200)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomIds",
            "in": "query",
            "required": false,
            "description": "Comma-separated room ids (≤ 200)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeAfkRoom",
            "in": "query",
            "required": false,
            "description": "`true` counts the AFK room into totalSec (afkRoomSec is always reported)",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false"
              ]
            }
          },
          {
            "name": "mutedGraceMinutes",
            "in": "query",
            "required": false,
            "description": "0–60: the first minutes of every muted interval do not count as muted",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 60
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a user id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceActivity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "VOICE_ACTIVITY"
      }
    },
    "/bot/spaces/{spaceId}/voice/sessions": {
      "get": {
        "operationId": "listVoiceSessions",
        "summary": "Voice sessions",
        "description": "Raw sessions overlapping [from, to) (default: the last 30 days; at most 92 days) with their muted / deafened intervals, oldest first. Only rooms the bot can see.\n\n**Data access**: `VOICE_ACTIVITY`.",
        "tags": [
          "Voice data"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start (ISO 8601, inclusive)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "End (ISO 8601, exclusive; default now)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "description": "Only this person",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` of the previous page (a session id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, at most 500)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceSessionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED, BOT_INTENT_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED",
                            "BOT_INTENT_REQUIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-coviqo-intent": "VOICE_ACTIVITY"
      }
    },
    "/bot/spaces/{spaceId}/stats/members": {
      "get": {
        "operationId": "getMemberStats",
        "summary": "Member growth",
        "description": "Daily member snapshots between two UTC days (both inclusive; default: the last 30 days up to yesterday; at most 730 days). History starts with the first day after the feature was deployed – no backfill, no estimates.",
        "tags": [
          "Statistics"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "description": "Space id (the bot must be installed there)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD)",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day (YYYY-MM-DD)",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshots",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberStats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: VALIDATION_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 400
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_FAILED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not allowed: BOT_DISABLED, BOT_PAUSED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 403
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOT_DISABLED",
                            "BOT_PAUSED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found: SPACE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 404
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SPACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Switched off: BOTS_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiError"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "const": 503
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "BOTS_DISABLED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "interaction": {
      "post": {
        "operationId": "interactionRequest",
        "summary": "Interaction request (POST to the interaction URL)",
        "description": "Slash command, button / select click, form submission, autocomplete while typing (`AUTOCOMPLETE`, answer `AUTOCOMPLETE_RESULT` – too slow or invalid → the person gets an empty list) or URL check (`PING`). Answer within 3 s with HTTP 2xx and an `InteractionResponse` (at most 64 KB, no redirects). Too slow → the person sees 504 BOT_INTERACTION_TIMEOUT; answer `DEFERRED_MESSAGE` and send a follow-up instead. Invalid answers → 502 BOT_INTERACTION_FAILED / BOT_INTERACTION_INVALID_RESPONSE / BOT_COMPONENTS_INVALID / BOT_MODAL_INVALID for the person. User-Agent: `Coviqo-Bots/1.0 (+https://coviqo.com/developers)`.",
        "tags": [
          "Interaction requests"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractionPayload"
              },
              "example": {
                "id": "cm1ia000000000000000000",
                "type": "COMMAND",
                "applicationId": "cm1app00000000000000000",
                "token": "q2V…",
                "spaceId": "cm1space000000000000000",
                "roomId": "cm1room0000000000000000",
                "user": {
                  "id": "cm1user0000000000000000",
                  "username": "anna",
                  "displayName": "Anna",
                  "locale": "en"
                },
                "memberRoleIds": [
                  "cm1role0000000000000000"
                ],
                "command": {
                  "name": "remind",
                  "options": {
                    "text": "Standup",
                    "minutes": 5
                  }
                },
                "locale": "en",
                "createdAt": "2026-10-02T09:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Interaction response (`{ \"type\": \"PONG\" }` for PING – exactly status 200 during the URL check)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionResponse"
                },
                "example": {
                  "type": "MESSAGE",
                  "data": {
                    "content": "Reminder set.",
                    "ephemeral": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.PING": {
      "post": {
        "operationId": "event_PING",
        "summary": "Event URL check (PING)",
        "description": "Sent when the event URL is saved: a signed PING must be answered with 2xx, a PING with a wrong signature with 401.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "PING"
                      },
                      "data": {
                        "type": "object",
                        "properties": {},
                        "description": "Empty"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.message.created": {
      "post": {
        "operationId": "event_message_created",
        "summary": "Event message.created",
        "description": "Requirements: the bot sees the room (room.view) and holds chat.view there; message text only with MESSAGE_CONTENT (otherwise `content: null`). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "message.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "$ref": "#/components/schemas/EventMessage"
                          }
                        },
                        "required": [
                          "message"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.message.updated": {
      "post": {
        "operationId": "event_message_updated",
        "summary": "Event message.updated",
        "description": "Requirements: the bot sees the room (room.view) and holds chat.view there; message text only with MESSAGE_CONTENT (otherwise `content: null`). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "message.updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "$ref": "#/components/schemas/EventMessage"
                          }
                        },
                        "required": [
                          "message"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.message.deleted": {
      "post": {
        "operationId": "event_message_deleted",
        "summary": "Event message.deleted",
        "description": "Requirements: the bot sees the room (room.view) and holds chat.view there. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "message.deleted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "roomId",
                          "messageId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.reaction.added": {
      "post": {
        "operationId": "event_reaction_added",
        "summary": "Event reaction.added",
        "description": "Requirements: the bot sees the room (room.view) and holds chat.view there. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "reaction.added"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "emoji": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "roomId",
                          "messageId",
                          "userId",
                          "emoji"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.reaction.removed": {
      "post": {
        "operationId": "event_reaction_removed",
        "summary": "Event reaction.removed",
        "description": "Requirements: the bot sees the room (room.view) and holds chat.view there. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "reaction.removed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "emoji": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "roomId",
                          "messageId",
                          "userId",
                          "emoji"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.joined": {
      "post": {
        "operationId": "event_member_joined",
        "summary": "Event member.joined",
        "description": "Requirements: intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.joined"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "member": {
                            "$ref": "#/components/schemas/EventMember"
                          },
                          "joinSource": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/JoinSource"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "member"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.left": {
      "post": {
        "operationId": "event_member_left",
        "summary": "Event member.left",
        "description": "Requirements: intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.left"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "memberId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "reason": {
                            "enum": [
                              "left",
                              "kicked",
                              "banned",
                              null
                            ]
                          }
                        },
                        "required": [
                          "memberId",
                          "userId",
                          "reason"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.roles_updated": {
      "post": {
        "operationId": "event_member_roles_updated",
        "summary": "Event member.roles_updated",
        "description": "Requirements: intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.roles_updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "memberId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "roleIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "All role ids after the change"
                          },
                          "added": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Role ids added by this change"
                          },
                          "removed": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Role ids removed by this change"
                          },
                          "actorId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who changed the roles (person or bot user id, null = system)"
                          }
                        },
                        "required": [
                          "memberId",
                          "userId",
                          "roleIds"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.task.created": {
      "post": {
        "operationId": "event_task_created",
        "summary": "Event task.created",
        "description": "Requirements: the bot sees the room (room.view) and holds tasks.view there; intent CONTENT_READ. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "task.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "task": {
                            "$ref": "#/components/schemas/Task"
                          }
                        },
                        "required": [
                          "task"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.task.updated": {
      "post": {
        "operationId": "event_task_updated",
        "summary": "Event task.updated",
        "description": "Requirements: the bot sees the room (room.view) and holds tasks.view there; intent CONTENT_READ. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "task.updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "task": {
                            "$ref": "#/components/schemas/Task"
                          }
                        },
                        "required": [
                          "task"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.task.completed": {
      "post": {
        "operationId": "event_task_completed",
        "summary": "Event task.completed",
        "description": "Requirements: the bot sees the room (room.view) and holds tasks.view there; intent CONTENT_READ. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "task.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "task": {
                            "$ref": "#/components/schemas/Task"
                          }
                        },
                        "required": [
                          "task"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.event.created": {
      "post": {
        "operationId": "event_event_created",
        "summary": "Event event.created",
        "description": "Requirements: the bot sees the room (room.view) and holds events.view there. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "event.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/CalendarEvent"
                          }
                        },
                        "required": [
                          "event"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.event.updated": {
      "post": {
        "operationId": "event_event_updated",
        "summary": "Event event.updated",
        "description": "Requirements: the bot sees the room (room.view) and holds events.view there. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "event.updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/CalendarEvent"
                          },
                          "previousRoomId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Only when the event moved to another room (`event.roomId` is the new one): the room it came from – null = it was space-wide. Moved events also reach bots that could view only the old room. Since 1.6.0"
                          }
                        },
                        "required": [
                          "event"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.event.canceled": {
      "post": {
        "operationId": "event_event_canceled",
        "summary": "Event event.canceled",
        "description": "Requirements: the bot sees the room (room.view) and holds events.view there. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "event.canceled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "eventId": {
                            "type": "string"
                          },
                          "spaceId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "null = space-wide event"
                          }
                        },
                        "required": [
                          "eventId",
                          "spaceId",
                          "roomId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.event.rsvp_updated": {
      "post": {
        "operationId": "event_event_rsvp_updated",
        "summary": "Event event.rsvp_updated",
        "description": "Requirements: the bot sees the room (room.view) and holds events.view there; intent EVENT_RSVPS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "event.rsvp_updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "eventId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "null = space-wide event"
                          },
                          "user": {
                            "$ref": "#/components/schemas/EventUser"
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "GOING",
                              "REGISTERED",
                              "MAYBE",
                              "DECLINED",
                              "INVITED"
                            ],
                            "description": "null = the answer was removed, the person is back to “no answer” (since 1.5.0)"
                          },
                          "respondedAt": {
                            "type": "string",
                            "description": "When the answer was given – for removals: when it was removed",
                            "format": "date-time"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "member",
                              "bot"
                            ],
                            "description": "`bot` = a bot gave / removed this answer on behalf of the person (`viaBotId`), `member` = the person themselves. Since 1.5.0"
                          },
                          "viaBotId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Bot account that gave / removed the answer on behalf of the person – null for `member`. Since 1.5.0"
                          }
                        },
                        "required": [
                          "eventId",
                          "roomId",
                          "user",
                          "status",
                          "respondedAt",
                          "source",
                          "viaBotId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.file.uploaded": {
      "post": {
        "operationId": "event_file_uploaded",
        "summary": "Event file.uploaded",
        "description": "Requirements: the bot sees the room (room.view) and holds files.view there; intent CONTENT_READ. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "file.uploaded"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "file": {
                            "$ref": "#/components/schemas/File"
                          }
                        },
                        "required": [
                          "file"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.voice.joined": {
      "post": {
        "operationId": "event_voice_joined",
        "summary": "Event voice.joined",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "voice.joined"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "bot": {
                            "type": "boolean"
                          },
                          "fromRoomId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The voice room of this space the person came from directly (switched rooms themselves, moved by a moderator / bot, AFK move) – null when they were not in another voice room or the bot cannot view that room. A switch also sends `voice.left` for the old room first. Since 1.6.0"
                          }
                        },
                        "required": [
                          "roomId",
                          "userId",
                          "bot",
                          "fromRoomId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.voice.left": {
      "post": {
        "operationId": "event_voice_left",
        "summary": "Event voice.left",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "voice.left"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "roomId",
                          "userId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.voice.member_moved": {
      "post": {
        "operationId": "event_voice_member_moved",
        "summary": "Event voice.member_moved",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "voice.member_moved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string",
                            "description": "Target room"
                          },
                          "fromRoomId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The voice room the person was moved out of. Since 1.6.0: null when the bot cannot view the origin room"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "moverId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "roomId",
                          "fromRoomId",
                          "userId",
                          "moverId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.presence.updated": {
      "post": {
        "operationId": "event_presence_updated",
        "summary": "Event presence.updated",
        "description": "Requirements: intent PRESENCE. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "presence.updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "status"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.interaction.created": {
      "post": {
        "operationId": "event_interaction_created",
        "summary": "Event interaction.created",
        "description": "Requirements: intent COMMANDS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "interaction.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "interaction": {
                            "$ref": "#/components/schemas/InteractionPayload"
                          }
                        },
                        "required": [
                          "interaction"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.dm.message_created": {
      "post": {
        "operationId": "event_dm_message_created",
        "summary": "Event dm.message_created",
        "description": "Requirements: intent COMMANDS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "dm.message_created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "conversationId": {
                            "type": "string"
                          },
                          "message": {
                            "$ref": "#/components/schemas/EventMessage"
                          }
                        },
                        "required": [
                          "conversationId",
                          "message"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.meeting.transcript_ready": {
      "post": {
        "operationId": "event_meeting_transcript_ready",
        "summary": "Event meeting.transcript_ready",
        "description": "Requirements: the bot sees the room (room.view); intent TRANSCRIPTS (plan: botTranscriptAccess). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "meeting.transcript_ready"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "meetingId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "endedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "hasTranscript": {
                            "type": "boolean"
                          },
                          "hasSummary": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "meetingId",
                          "roomId",
                          "title",
                          "endedAt",
                          "hasTranscript",
                          "hasSummary"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.created": {
      "post": {
        "operationId": "event_ticket_created",
        "summary": "Event ticket.created",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; the bot may see the ticket (tickets.view / handle / manage, or tickets.create for its own tickets). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticket": {
                            "$ref": "#/components/schemas/Ticket"
                          }
                        },
                        "required": [
                          "ticket"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.updated": {
      "post": {
        "operationId": "event_ticket_updated",
        "summary": "Event ticket.updated",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; the bot may see the ticket (tickets.view / handle / manage, or tickets.create for its own tickets). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticket": {
                            "$ref": "#/components/schemas/Ticket"
                          },
                          "changes": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/TicketChange"
                            },
                            "description": "What changed"
                          }
                        },
                        "required": [
                          "ticket",
                          "changes"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.message.created": {
      "post": {
        "operationId": "event_ticket_message_created",
        "summary": "Event ticket.message.created",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; the bot may see the ticket (tickets.view / handle / manage, or tickets.create for its own tickets); internal notes only with tickets.handle. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.message.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticketId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": "string"
                          },
                          "message": {
                            "$ref": "#/components/schemas/TicketMessage"
                          }
                        },
                        "required": [
                          "ticketId",
                          "roomId",
                          "message"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.message.updated": {
      "post": {
        "operationId": "event_ticket_message_updated",
        "summary": "Event ticket.message.updated",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; the bot may see the ticket (tickets.view / handle / manage, or tickets.create for its own tickets); internal notes only with tickets.handle. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.message.updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticketId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": "string"
                          },
                          "message": {
                            "$ref": "#/components/schemas/TicketMessage"
                          }
                        },
                        "required": [
                          "ticketId",
                          "roomId",
                          "message"
                        ],
                        "description": "A reply or internal note was edited – `message` after the edit (`editedAt` set). Since 1.7.0"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.message.deleted": {
      "post": {
        "operationId": "event_ticket_message_deleted",
        "summary": "Event ticket.message.deleted",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; the bot may see the ticket (tickets.view / handle / manage, or tickets.create for its own tickets); internal notes only with tickets.handle. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.message.deleted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticketId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "PUBLIC",
                              "INTERNAL"
                            ]
                          }
                        },
                        "required": [
                          "ticketId",
                          "roomId",
                          "messageId",
                          "kind"
                        ],
                        "description": "A reply or internal note was deleted (by its author, the bot that posted it on behalf of the author, or tickets.manage) – ids and kind only. Since 1.7.0"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.rated": {
      "post": {
        "operationId": "event_ticket_rated",
        "summary": "Event ticket.rated",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; team permission tickets.view / handle / manage in the room. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.rated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticketId": {
                            "type": "string"
                          },
                          "roomId": {
                            "type": "string"
                          },
                          "number": {
                            "type": "integer"
                          },
                          "rating": {
                            "$ref": "#/components/schemas/TicketRating"
                          }
                        },
                        "required": [
                          "ticketId",
                          "roomId",
                          "number",
                          "rating"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.ticket.sla.breached": {
      "post": {
        "operationId": "event_ticket_sla_breached",
        "summary": "Event ticket.sla.breached",
        "description": "Requirements: the bot sees the room (room.view); intent TICKETS_READ; team permission tickets.view / handle / manage in the room. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.sla.breached"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "ticket": {
                            "$ref": "#/components/schemas/Ticket"
                          },
                          "phase": {
                            "type": "string",
                            "enum": [
                              "firstResponse",
                              "resolution"
                            ]
                          },
                          "dueAt": {
                            "type": "string",
                            "description": "The due time that passed",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "ticket",
                          "phase",
                          "dueAt"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.banned": {
      "post": {
        "operationId": "event_member_banned",
        "summary": "Event member.banned",
        "description": "Requirements: the bot holds moderate.ban in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.banned"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "memberId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "null when the person was not a member"
                          },
                          "user": {
                            "$ref": "#/components/schemas/EventUser"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "durationHours": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "null = permanent"
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "deleteMessageHours": {
                            "type": "integer"
                          },
                          "moderator": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/EventUser"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "wasMember": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "userId",
                          "memberId",
                          "user",
                          "reason",
                          "durationHours",
                          "expiresAt",
                          "deleteMessageHours",
                          "moderator",
                          "wasMember"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.unbanned": {
      "post": {
        "operationId": "event_member_unbanned",
        "summary": "Event member.unbanned",
        "description": "Requirements: the bot holds moderate.ban in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.unbanned"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "user": {
                            "$ref": "#/components/schemas/EventUser"
                          },
                          "moderator": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/EventUser"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expired": {
                            "type": "boolean",
                            "description": "true when a timed ban ran out"
                          }
                        },
                        "required": [
                          "userId",
                          "user",
                          "moderator",
                          "expired"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.kicked": {
      "post": {
        "operationId": "event_member_kicked",
        "summary": "Event member.kicked",
        "description": "Requirements: the bot holds moderate.kick in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.kicked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "memberId": {
                            "type": "string"
                          },
                          "user": {
                            "$ref": "#/components/schemas/EventUser"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "moderator": {
                            "$ref": "#/components/schemas/EventUser"
                          }
                        },
                        "required": [
                          "userId",
                          "memberId",
                          "user",
                          "reason",
                          "moderator"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.timeout": {
      "post": {
        "operationId": "event_member_timeout",
        "summary": "Event member.timeout",
        "description": "Requirements: the bot holds moderate.timeout in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.timeout"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "memberId": {
                            "type": "string"
                          },
                          "user": {
                            "$ref": "#/components/schemas/EventUser"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "set",
                              "removed"
                            ]
                          },
                          "minutes": {
                            "type": "integer",
                            "description": "0 for removed"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "moderator": {
                            "$ref": "#/components/schemas/EventUser"
                          }
                        },
                        "required": [
                          "userId",
                          "memberId",
                          "user",
                          "action",
                          "minutes",
                          "reason",
                          "expiresAt",
                          "moderator"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.member.linked_account_updated": {
      "post": {
        "operationId": "event_member_linked_account_updated",
        "summary": "Event member.linked_account_updated",
        "description": "Requirements: intent LINKED_ACCOUNTS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.linked_account_updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "memberId": {
                            "type": "string"
                          },
                          "linkedAccounts": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/LinkedAccount"
                            },
                            "description": "Empty = unlinked or consent revoked"
                          }
                        },
                        "required": [
                          "userId",
                          "memberId",
                          "linkedAccounts"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.invite.created": {
      "post": {
        "operationId": "event_invite_created",
        "summary": "Event invite.created",
        "description": "Requirements: the bot holds space.invite in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "invite.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "invite": {
                            "$ref": "#/components/schemas/Invite"
                          }
                        },
                        "required": [
                          "invite"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.invite.revoked": {
      "post": {
        "operationId": "event_invite_revoked",
        "summary": "Event invite.revoked",
        "description": "Requirements: the bot holds space.invite in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "invite.revoked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "inviteId": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "revokedBy": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "inviteId",
                          "code",
                          "revokedBy"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.voice.state_updated": {
      "post": {
        "operationId": "event_voice_state_updated",
        "summary": "Event voice.state_updated",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "voice.state_updated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "state": {
                            "$ref": "#/components/schemas/VoiceState"
                          },
                          "changed": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "selfMuted",
                                "serverMuted",
                                "deafened",
                                "video",
                                "screenShare",
                                "onStage",
                                "inAfkRoom"
                              ]
                            }
                          },
                          "sessionId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "roomId",
                          "userId",
                          "state",
                          "changed",
                          "sessionId"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.voice.moved_afk": {
      "post": {
        "operationId": "event_voice_moved_afk",
        "summary": "Event voice.moved_afk",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "voice.moved_afk"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "fromRoomId": {
                            "type": "string"
                          },
                          "toRoomId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "null = disconnected"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "move",
                              "disconnect"
                            ]
                          },
                          "cause": {
                            "type": "string",
                            "enum": [
                              "muted",
                              "deafened",
                              "silent"
                            ]
                          },
                          "idleSeconds": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "userId",
                          "fromRoomId",
                          "toRoomId",
                          "action",
                          "cause",
                          "idleSeconds"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.team.application.created": {
      "post": {
        "operationId": "event_team_application_created",
        "summary": "Event team.application.created",
        "description": "Requirements: the bot holds teams.manage in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "team.application.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "application": {
                            "$ref": "#/components/schemas/TeamApplication"
                          }
                        },
                        "required": [
                          "application"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.team.application.decided": {
      "post": {
        "operationId": "event_team_application_decided",
        "summary": "Event team.application.decided",
        "description": "Requirements: the bot holds teams.manage in the space; intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "team.application.decided"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "application": {
                            "$ref": "#/components/schemas/TeamApplication"
                          }
                        },
                        "required": [
                          "application"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.team.member.added": {
      "post": {
        "operationId": "event_team_member_added",
        "summary": "Event team.member.added",
        "description": "Requirements: intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "team.member.added"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "teamId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "isLead": {
                            "type": "boolean"
                          },
                          "actorId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "via": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "application",
                              "self",
                              "idp"
                            ]
                          }
                        },
                        "required": [
                          "teamId",
                          "userId",
                          "isLead",
                          "actorId",
                          "via"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.team.member.removed": {
      "post": {
        "operationId": "event_team_member_removed",
        "summary": "Event team.member.removed",
        "description": "Requirements: intent MEMBERS. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "team.member.removed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "teamId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "isLead": {
                            "type": "boolean"
                          },
                          "actorId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "via": {
                            "type": "string",
                            "enum": [
                              "removed",
                              "left",
                              "idp",
                              "member_left"
                            ]
                          }
                        },
                        "required": [
                          "teamId",
                          "userId",
                          "isLead",
                          "actorId",
                          "via"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.forum.post_created": {
      "post": {
        "operationId": "event_forum_post_created",
        "summary": "Event forum.post_created",
        "description": "Requirements: the bot sees the room (room.view) and holds chat.view there; message text only with MESSAGE_CONTENT (otherwise `content: null`). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "forum.post_created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "post": {
                            "$ref": "#/components/schemas/ForumPost"
                          }
                        },
                        "required": [
                          "post"
                        ],
                        "description": "Without MESSAGE_CONTENT `title` and `excerpt` are null. Replies arrive as `message.created`."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.room.created": {
      "post": {
        "operationId": "event_room_created",
        "summary": "Event room.created",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "room.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "room": {
                            "$ref": "#/components/schemas/BotRoomDetail"
                          },
                          "actorId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Person or bot user that created the room"
                          }
                        },
                        "required": [
                          "room",
                          "actorId"
                        ],
                        "description": "A room was created (by a person or a bot – never echoed to the bot that did it). Since 1.6.0"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.room.updated": {
      "post": {
        "operationId": "event_room_updated",
        "summary": "Event room.updated",
        "description": "Requirements: the bot sees the room (room.view). Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "room.updated"
                      },
                      "data": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "room": {
                                "$ref": "#/components/schemas/BotRoomDetail"
                              },
                              "changes": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "name",
                                    "description",
                                    "visibility",
                                    "tags",
                                    "icon",
                                    "color",
                                    "cover",
                                    "userLimit",
                                    "type",
                                    "categoryId",
                                    "position",
                                    "projectEndsAt",
                                    "archived",
                                    "modules",
                                    "permissionsSynced",
                                    "permissions"
                                  ]
                                },
                                "description": "What changed: `archived` = archived / restored, `categoryId` = moved to another category (`permissions` when its permissions changed with the move), `permissionsSynced` = the category was deleted and the room stopped following it"
                              },
                              "actorId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Person or bot user that changed the room"
                              }
                            },
                            "required": [
                              "room",
                              "changes",
                              "actorId"
                            ],
                            "description": "Room settings changed – `room` is the state after the change. Pure re-ordering inside a category sends nothing. Since 1.6.0"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "roomId": {
                                "type": "string"
                              },
                              "spaceId": {
                                "type": "string"
                              },
                              "accessLost": {
                                "type": "boolean",
                                "const": true,
                                "description": "The bot lost view access to the room through this change"
                              }
                            },
                            "required": [
                              "roomId",
                              "spaceId",
                              "accessLost"
                            ],
                            "description": "To a bot that could view the room before the change and cannot any more – only the ids, never the new name, overrides or other details. Since 1.6.0"
                          }
                        ],
                        "description": "Room settings changed – `room` is the state after the change. Pure re-ordering inside a category sends nothing. Since 1.6.0 A bot that loses view access through the change gets only `{ roomId, spaceId, accessLost: true }` (since 1.6.0)."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.room.deleted": {
      "post": {
        "operationId": "event_room_deleted",
        "summary": "Event room.deleted",
        "description": "Requirements: the bot could view the room (room.view) right before it was deleted. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "room.deleted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "roomId": {
                            "type": "string"
                          },
                          "spaceId": {
                            "type": "string"
                          },
                          "categoryId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "actorId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Person or bot user that deleted the room"
                          }
                        },
                        "required": [
                          "roomId",
                          "spaceId",
                          "categoryId",
                          "name",
                          "type",
                          "actorId"
                        ],
                        "description": "The room was deleted permanently (with its content). Delivered to the bots that could view the room right before it was deleted. Since 1.6.0"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    },
    "event.room.permissions_updated": {
      "post": {
        "operationId": "event_room_permissions_updated",
        "summary": "Event room.permissions_updated",
        "description": "Requirements: the bot sees the room (room.view); the changed entry (`override`) only with room.manage in the room. Answer 2xx within 5 s (the body is ignored). 5xx, 408, 429, timeouts and network errors are retried up to 8 attempts with exponential backoff from 10 s; other answers fail at once.",
        "tags": [
          "Event deliveries"
        ],
        "parameters": [
          {
            "name": "X-Coviqo-Signature-Ed25519",
            "in": "header",
            "required": true,
            "description": "Ed25519 signature (hex, 128 characters) over `timestamp + rawBody` (UTF-8). Verify with the public key of the bot; answer 401 when it does not match.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{128}$"
            }
          },
          {
            "name": "X-Coviqo-Signature-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds (string). Reject requests older than 300 s (replay protection).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "X-Coviqo-Event-Id",
            "in": "header",
            "required": true,
            "description": "Idempotency id (= envelope `id`), the same for retries and redeliveries – drop duplicates",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Event-Type",
            "in": "header",
            "required": true,
            "description": "Event type (= envelope `type`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Coviqo-Delivery-Attempt",
            "in": "header",
            "required": true,
            "description": "Attempt number 1–8",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "room.permissions_updated"
                      },
                      "data": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "roomId": {
                                "type": "string"
                              },
                              "spaceId": {
                                "type": "string"
                              },
                              "change": {
                                "type": "string",
                                "enum": [
                                  "override_set",
                                  "override_removed",
                                  "synced",
                                  "category_sync"
                                ],
                                "description": "`override_set` / `override_removed`: one role / member / team entry; `synced`: the room took over its category’s permissions; `category_sync`: the category’s permissions changed and the synced room followed"
                              },
                              "permissionsSynced": {
                                "type": "boolean",
                                "description": "The room follows its category’s permissions after the change"
                              },
                              "override": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/RoomOverride"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The entry after setting / the removed entry (`override_*` only) – only for bots with room.manage in the room, otherwise null"
                              },
                              "actorId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Person or bot user that changed the permissions"
                              }
                            },
                            "required": [
                              "roomId",
                              "spaceId",
                              "change",
                              "permissionsSynced",
                              "override",
                              "actorId"
                            ],
                            "description": "Permission overrides of the room changed (room settings, space settings, bot API). Since 1.6.0"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "roomId": {
                                "type": "string"
                              },
                              "spaceId": {
                                "type": "string"
                              },
                              "accessLost": {
                                "type": "boolean",
                                "const": true,
                                "description": "The bot lost view access to the room through this change"
                              }
                            },
                            "required": [
                              "roomId",
                              "spaceId",
                              "accessLost"
                            ],
                            "description": "To a bot that could view the room before the change and cannot any more – only the ids, never the new name, overrides or other details. Since 1.6.0"
                          }
                        ],
                        "description": "Permission overrides of the room changed (room settings, space settings, bot API). Since 1.6.0 A bot that loses view access through the change gets only `{ roomId, spaceId, accessLost: true }` (since 1.6.0)."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx)"
          },
          "401": {
            "description": "Invalid signature – required: Coviqo checks this when the URL is saved"
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BotToken": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "The bot token with the prefix \"Bot \" – `Authorization: Bot cqb_…` (cqb_ + 43 base64url characters). Postman / Insomnia: API key, header `Authorization`, value `Bot <token>`."
      },
      "WebhookSecretQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "secret",
        "description": "Secret of the incoming webhook (part of the URL shown once)"
      },
      "WebhookSecretHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Coviqo-Webhook-Secret",
        "description": "Secret of the incoming webhook as header instead of the query parameter"
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Requests allowed per minute and token by the HTTP throttler (600); the stricter platform limits (429 RATE_LIMITED) are not reflected",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current window of the HTTP throttler",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Seconds until the window of the HTTP throttler resets",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait (only on 429 TOO_MANY_REQUESTS of the HTTP throttler; RATE_LIMITED carries `details.retryAfter`)",
        "schema": {
          "type": "integer"
        }
      }
    },
    "parameters": {
      "InteractionToken": {
        "name": "X-Coviqo-Interaction-Token",
        "in": "header",
        "required": true,
        "description": "`token` of the interaction payload (valid 15 minutes). Wrong / expired → 404 BOT_INTERACTION_EXPIRED.",
        "schema": {
          "type": "string"
        }
      },
      "InteractionTokenOptional": {
        "name": "X-Coviqo-Interaction-Token",
        "in": "header",
        "required": false,
        "description": "Interaction proof: `token` of the interaction named in `interactionId` (valid 15 minutes). Wrong / expired → 404 BOT_INTERACTION_EXPIRED.",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid bot token: BOT_AUTH_REQUIRED, BOT_TOKEN_INVALID",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "const": 401
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "BOT_AUTH_REQUIRED",
                        "BOT_TOKEN_INVALID"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded: RATE_LIMITED (platform limits, `details: { retryAfter, limit, windowSec, scope }` with scope bot | botspace | space | botdm | botdmuser | botticket | botrooms) or TOO_MANY_REQUESTS (HTTP throttler, header Retry-After)",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "const": 429
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "RATE_LIMITED",
                        "TOO_MANY_REQUESTS"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "WebhookRateLimited": {
        "description": "Rate limit exceeded: RATE_LIMITED (30 / min per webhook, 120 / min per space) or TOO_MANY_REQUESTS (per client IP)",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "const": 429
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "RATE_LIMITED",
                        "TOO_MANY_REQUESTS"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status"
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error code, e.g. `MISSING_PERMISSION`"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message (English)"
          },
          "details": {
            "description": "Extra data of some errors, e.g. `{ permission }`, `{ intent }`, `{ errors }`, `{ retryAfter, limit, windowSec, scope }`"
          }
        },
        "required": [
          "statusCode",
          "code",
          "message"
        ]
      },
      "UserSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User id"
          },
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "description": "Name to show (the per-space name when the person uses one in this space)"
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "bot": {
            "type": "boolean",
            "description": "BOT account"
          },
          "deactivated": {
            "type": "boolean",
            "description": "Deactivated by their organisation"
          },
          "spaceIdentity": {
            "type": "object",
            "properties": {
              "nickname": {
                "const": true
              },
              "pronouns": {
                "type": "string"
              },
              "statusText": {
                "type": "string"
              }
            },
            "description": "Per-space identity details, when present"
          }
        },
        "required": [
          "id",
          "username",
          "displayName",
          "avatarUrl"
        ]
      },
      "BotProfile": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application id"
          },
          "botUser": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "operatorName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who runs the bot"
          },
          "serverLocation": {
            "type": [
              "string",
              "null"
            ]
          },
          "privacyUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "usesAi": {
            "type": "boolean",
            "description": "Messages carry the AI label (EU AI Act Art. 50)"
          },
          "builtinKind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always null for developer bots"
          },
          "disabled": {
            "type": "boolean",
            "description": "Stopped by Coviqo Trust & Safety"
          },
          "verified": {
            "type": "boolean",
            "description": "Operator identity checked by Coviqo (bot directory)"
          }
        },
        "required": [
          "applicationId",
          "botUser",
          "name",
          "description",
          "avatarUrl",
          "operatorName",
          "serverLocation",
          "privacyUrl",
          "usesAi",
          "builtinKind",
          "disabled",
          "verified"
        ]
      },
      "BotMe": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BotProfile"
          },
          {
            "type": "object",
            "properties": {
              "publicKey": {
                "type": "string",
                "description": "Ed25519 public key (raw 32 bytes, hex) – verify interaction and event requests with it",
                "pattern": "^[0-9a-f]{64}$"
              },
              "requestedPermissions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Permission key, e.g. `chat.send`"
                }
              },
              "requestedIntents": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "COMMANDS",
                    "MEMBERS",
                    "MESSAGE_CONTENT",
                    "CONTENT_READ",
                    "PRESENCE",
                    "VOICE_LISTEN",
                    "TRANSCRIPTS",
                    "TICKETS_READ",
                    "TICKETS_WRITE",
                    "ROLES_ASSIGN",
                    "VOICE_ACTIVITY",
                    "LINKED_ACCOUNTS",
                    "ROOMS_MANAGE",
                    "EVENT_RSVPS",
                    "TICKETS_CREATE_ON_BEHALF",
                    "TEAMS_MANAGE",
                    "TEAM_APPLY_ON_BEHALF",
                    "EVENT_RSVP_ON_BEHALF",
                    "TICKETS_REPLY_ON_BEHALF"
                  ],
                  "description": "Data access (intent)"
                }
              }
            },
            "required": [
              "publicKey",
              "requestedPermissions",
              "requestedIntents"
            ]
          }
        ]
      },
      "BotSpace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Space id"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "iconUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "installationId": {
            "type": "string",
            "description": "Installation id"
          },
          "enabled": {
            "type": "boolean",
            "description": "false = paused by a space admin (write calls answer 403 BOT_PAUSED)"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Permission key, e.g. `chat.send`"
            },
            "description": "Permissions of the managed role \"Bot: <name>\""
          },
          "intents": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "COMMANDS",
                "MEMBERS",
                "MESSAGE_CONTENT",
                "CONTENT_READ",
                "PRESENCE",
                "VOICE_LISTEN",
                "TRANSCRIPTS",
                "TICKETS_READ",
                "TICKETS_WRITE",
                "ROLES_ASSIGN",
                "VOICE_ACTIVITY",
                "LINKED_ACCOUNTS",
                "ROOMS_MANAGE",
                "EVENT_RSVPS",
                "TICKETS_CREATE_ON_BEHALF",
                "TEAMS_MANAGE",
                "TEAM_APPLY_ON_BEHALF",
                "EVENT_RSVP_ON_BEHALF",
                "TICKETS_REPLY_ON_BEHALF"
              ],
              "description": "Data access (intent)"
            },
            "description": "Approved privileged intents (standard intents are always granted)"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "iconUrl",
          "installationId",
          "enabled",
          "permissions",
          "intents"
        ]
      },
      "BotRoom": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Room id"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "STANDARD",
              "VOICE",
              "PROJECT",
              "MEETING",
              "EVENT",
              "COMMUNITY",
              "STAGE",
              "LOBBY",
              "FORUM",
              "MAP"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": "integer"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "categoryId",
          "position",
          "description"
        ]
      },
      "BotRole": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Role id"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": "integer"
          },
          "mentionable": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean",
            "description": "The space's default role (@everyone): every member has it automatically – it is never assigned or removed. Since 1.6.0"
          },
          "assignable": {
            "type": "boolean",
            "description": "The bot may assign this role right now (ROLES_ASSIGN intent, allow-list, below the bot role; admin-level roles only with “allow roles with admin rights”)"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "position",
          "mentionable",
          "isDefault"
        ]
      },
      "JoinSource": {
        "type": "object",
        "properties": {
          "via": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "invite",
              "vanity",
              "public",
              "lfg",
              "sso",
              "join_request",
              "handover",
              "onboarding"
            ],
            "description": "How the member joined (null = before tracking)"
          },
          "inviteId": {
            "type": [
              "string",
              "null"
            ]
          },
          "inviteCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "vanityName": {
            "type": [
              "string",
              "null"
            ]
          },
          "inviterId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "via",
          "inviteId",
          "inviteCode",
          "vanityName",
          "inviterId"
        ],
        "description": "Only for bots holding space.invite or space.manage_members"
      },
      "LinkedAccount": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "discord"
            ]
          },
          "id": {
            "type": "string",
            "description": "Provider user id (Discord snowflake)"
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "provider",
          "id",
          "username"
        ],
        "description": "Only with the LINKED_ACCOUNTS intent and the member’s consent in this space"
      },
      "BotPresence": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ONLINE",
              "AWAY",
              "BUSY",
              "FOCUS",
              "OFFLINE",
              "INVISIBLE"
            ]
          }
        },
        "required": [
          "status"
        ],
        "description": "Only with `presence=true` and the PRESENCE intent"
      },
      "BotMember": {
        "type": "object",
        "properties": {
          "memberId": {
            "type": "string",
            "description": "Space member id"
          },
          "user": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "displayName": {
            "type": "string"
          },
          "roleIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isGuest": {
            "type": "boolean"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "timeoutUntil": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timed out until (single member, moderation results)",
            "format": "date-time"
          },
          "presence": {
            "$ref": "#/components/schemas/BotPresence"
          },
          "joinSource": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JoinSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkedAccount"
            }
          }
        },
        "required": [
          "memberId",
          "user",
          "displayName",
          "roleIds",
          "isGuest",
          "joinedAt"
        ]
      },
      "BotMemberPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotMember"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "Button": {
        "type": "object",
        "properties": {
          "type": {
            "const": "button"
          },
          "style": {
            "type": "string",
            "enum": [
              "primary",
              "secondary",
              "success",
              "danger",
              "link"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "customId": {
            "type": "string",
            "description": "Required for every style except `link`",
            "minLength": 1,
            "maxLength": 100
          },
          "url": {
            "type": "string",
            "description": "Only for style `link`: https URL (no customId)",
            "format": "uri",
            "maxLength": 500
          },
          "emoji": {
            "type": "string",
            "maxLength": 64
          },
          "disabled": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "style",
          "label"
        ]
      },
      "SelectOption": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "value": {
            "type": "string",
            "description": "Unique within the menu",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 100
          },
          "emoji": {
            "type": "string",
            "maxLength": 64
          },
          "default": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value"
        ]
      },
      "Select": {
        "type": "object",
        "properties": {
          "type": {
            "const": "select"
          },
          "customId": {
            "type": "string",
            "description": "1–100 printable ASCII characters, unique within the message / form",
            "minLength": 1,
            "maxLength": 100
          },
          "placeholder": {
            "type": "string",
            "maxLength": 150
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SelectOption"
            },
            "minItems": 1,
            "maxItems": 25
          },
          "minValues": {
            "type": "integer",
            "description": "Default 1",
            "minimum": 0,
            "maximum": 25
          },
          "maxValues": {
            "type": "integer",
            "description": "Default 1; at least minValues, at most the number of options",
            "minimum": 1,
            "maximum": 25
          },
          "disabled": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "customId",
          "options"
        ]
      },
      "ActionRow": {
        "type": "object",
        "properties": {
          "type": {
            "const": "row"
          },
          "components": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Button"
                },
                {
                  "$ref": "#/components/schemas/Select"
                }
              ]
            },
            "description": "1–5 buttons or exactly one select menu",
            "minItems": 1,
            "maxItems": 5
          }
        },
        "required": [
          "type",
          "components"
        ]
      },
      "Components": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ActionRow"
        },
        "description": "At most 5 rows",
        "maxItems": 5
      },
      "TextInput": {
        "type": "object",
        "properties": {
          "type": {
            "const": "text"
          },
          "customId": {
            "type": "string",
            "description": "1–100 printable ASCII characters, unique within the message / form",
            "minLength": 1,
            "maxLength": 100
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "style": {
            "type": "string",
            "enum": [
              "short",
              "paragraph"
            ],
            "description": "Default `short`"
          },
          "required": {
            "type": "boolean",
            "description": "Default true"
          },
          "placeholder": {
            "type": "string",
            "maxLength": 150
          },
          "minLength": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4000
          },
          "maxLength": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4000
          },
          "value": {
            "type": "string",
            "description": "Pre-filled value",
            "maxLength": 4000
          }
        },
        "required": [
          "type",
          "customId",
          "label"
        ]
      },
      "FileInput": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file"
            ],
            "description": "File upload field. Since 1.6.0 – `file_upload` / `FILE_UPLOAD` are accepted as aliases"
          },
          "customId": {
            "type": "string",
            "description": "1–100 printable ASCII characters, unique within the message / form",
            "minLength": 1,
            "maxLength": 100
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "required": {
            "type": "boolean",
            "description": "Default true: at least one file"
          },
          "maxFiles": {
            "type": "integer",
            "description": "Files the person may upload, default 1. Alias `max_files`",
            "minimum": 1,
            "maximum": 10
          },
          "maxSizeBytes": {
            "type": "integer",
            "description": "Per file, default and hard cap 26214400 (25 MiB); the upload limit of the space's plan applies too. Alias `max_size_bytes`",
            "minimum": 1,
            "maximum": 26214400
          },
          "allowedTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^(\\.[a-z0-9]{1,16}|[a-z]+/(\\*|[a-z0-9][a-z0-9.+-]{0,100}))$"
            },
            "description": "MIME types (`image/png`), families (`image/*`) or extensions (`.pdf`), lower case – absent = every type. Alias `allowed_types`",
            "minItems": 1,
            "maxItems": 20
          }
        },
        "required": [
          "type",
          "customId",
          "label"
        ],
        "description": "Since 1.6.0. At most 2 per form. The person uploads through the normal upload pipeline (malware scan, storage quota, organisation policy); the submit delivers `files[customId]` (ModalFile) with signed download URLs. Only clean, completely scanned files that fit the limits are accepted – never end-to-end encrypted ones."
      },
      "Modal": {
        "type": "object",
        "properties": {
          "customId": {
            "type": "string",
            "description": "1–100 printable ASCII characters, unique within the message / form",
            "minLength": 1,
            "maxLength": 100
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 45
          },
          "fields": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TextInput"
                },
                {
                  "$ref": "#/components/schemas/FileInput"
                }
              ]
            },
            "description": "Text inputs and (since 1.6.0) at most 2 file upload fields",
            "minItems": 1,
            "maxItems": 5
          }
        },
        "required": [
          "customId",
          "title",
          "fields"
        ]
      },
      "Reaction": {
        "type": "object",
        "properties": {
          "emoji": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "me": {
            "type": "boolean",
            "description": "The bot reacted with this emoji"
          }
        },
        "required": [
          "emoji",
          "count",
          "userIds",
          "me"
        ]
      },
      "ReactionList": {
        "type": "object",
        "properties": {
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reaction"
            }
          }
        },
        "required": [
          "reactions"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Message id"
          },
          "roomId": {
            "type": "string",
            "description": "Room id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "author": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "content": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "DEFAULT",
              "SYSTEM"
            ]
          },
          "replyTo": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "content": {
                "type": "string"
              },
              "author": {
                "$ref": "#/components/schemas/UserSummary"
              }
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            },
            "description": "File attachments"
          },
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reaction"
            }
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Mentioned user ids"
          },
          "mentionEveryone": {
            "type": "boolean"
          },
          "pinned": {
            "type": "boolean"
          },
          "editedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "components": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Components"
              },
              {
                "type": "null"
              }
            ]
          },
          "ai": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "aiGenerated": {
                "const": true
              },
              "aiModel": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "aiGeneratedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "aiGenerated"
            ],
            "description": "AI label (bots with \"uses AI\")"
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ],
            "description": "Posted through an incoming webhook"
          },
          "interaction": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "userId": {
                "type": "string"
              },
              "command": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "userId"
            ],
            "description": "Answer to a slash command: who used which command"
          }
        },
        "required": [
          "id",
          "roomId",
          "spaceId",
          "author",
          "content",
          "type",
          "reactions",
          "mentions",
          "mentionEveryone",
          "createdAt"
        ],
        "additionalProperties": true,
        "description": "MessageDto – the same shape the web app receives. Further optional fields may appear; ignore unknown fields."
      },
      "MessagePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `before` for the next (older) page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "BotMessageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text, at most 4000 characters. Mentions: `<@userId>`, roles `<@&roleId>`, teams `<@team:teamId>`, `@everyone` only with `chat.mention_everyone`.",
            "maxLength": 4000
          },
          "components": {
            "$ref": "#/components/schemas/Components"
          },
          "replyToId": {
            "type": "string",
            "description": "Message to reply to"
          },
          "nonce": {
            "type": "string",
            "description": "Client nonce (idempotency for retries), at most 64 characters",
            "maxLength": 64
          }
        },
        "description": "At least `content` or `components` (400 MESSAGE_EMPTY otherwise). Unknown fields are ignored."
      },
      "BotEditMessageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text, at most 4000 characters. Mentions: `<@userId>`, roles `<@&roleId>`, teams `<@team:teamId>`, `@everyone` only with `chat.mention_everyone`.",
            "maxLength": 4000
          },
          "components": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Components"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "Missing fields stay unchanged; `components: null` removes the components."
      },
      "BotFollowupRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text, at most 4000 characters. Mentions: `<@userId>`, roles `<@&roleId>`, teams `<@team:teamId>`, `@everyone` only with `chat.mention_everyone`.",
            "maxLength": 4000
          },
          "components": {
            "$ref": "#/components/schemas/Components"
          },
          "ephemeral": {
            "type": "boolean",
            "description": "Only the person who used the interaction sees it (not stored). Default: the visibility chosen with DEFERRED_MESSAGE, else false"
          },
          "expiresAfterSeconds": {
            "type": "integer",
            "description": "Ephemeral messages only (400 VALIDATION_FAILED otherwise): the message disappears from the person’s screen after this many seconds (3–3600). Default for the first answer of a deferred interaction: the value given with DEFERRED_MESSAGE. Since 1.7.0",
            "minimum": 3,
            "maximum": 3600
          }
        },
        "description": "At least `content` or `components`."
      },
      "FollowupResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Message id (or ephemeral message id)"
          },
          "ephemeral": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "ephemeral"
        ]
      },
      "EditOriginalResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Edited message id (or ephemeral message id)"
          }
        },
        "required": [
          "id"
        ]
      },
      "OpenModalResult": {
        "type": "object",
        "properties": {
          "opened": {
            "type": "boolean",
            "const": true
          },
          "expiresInSec": {
            "type": "integer",
            "description": "How long the form can be submitted (single use)"
          }
        },
        "required": [
          "opened",
          "expiresInSec"
        ]
      },
      "CommandOption": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "a-z 0-9 _ - (lower case)",
            "pattern": "^[a-z0-9_-]{1,32}$"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "integer",
              "number",
              "boolean",
              "user",
              "room",
              "role"
            ],
            "description": "`user` / `room` / `role` values are ids of this space"
          },
          "required": {
            "type": "boolean",
            "description": "Required options come before optional ones"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "value": {
                  "type": [
                    "string",
                    "number"
                  ]
                }
              },
              "required": [
                "name",
                "value"
              ]
            },
            "description": "Only for string / integer / number; values must respect the limits below",
            "maxItems": 25
          },
          "minValue": {
            "type": "number",
            "description": "integer / number only: smallest allowed value (inclusive; integers for `integer`). Since 1.4.0 – `min_value` is accepted as an alias"
          },
          "maxValue": {
            "type": "number",
            "description": "integer / number only: largest allowed value (inclusive, ≥ minValue). Since 1.4.0 – alias `max_value`"
          },
          "minLength": {
            "type": "integer",
            "description": "string only: at least this many characters after trimming (0–4000). Since 1.4.0 – alias `min_length`",
            "minimum": 0,
            "maximum": 4000
          },
          "maxLength": {
            "type": "integer",
            "description": "string only: at most this many characters (1–4000, ≥ minLength). Since 1.4.0 – alias `max_length`",
            "minimum": 1,
            "maximum": 4000
          },
          "autocomplete": {
            "type": "boolean",
            "description": "string / integer / number only, not together with `choices`: Coviqo sends AUTOCOMPLETE interactions while the person types this option – answer AUTOCOMPLETE_RESULT. Since 1.4.0"
          },
          "channelTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "voice"
              ]
            },
            "description": "room only: which rooms may be chosen – `text` = rooms with chat, `voice` = rooms with their own voice channel (a room with both fits either); absent = every room. The room picker of the app offers only matching rooms, other rooms are refused before delivery (400 BOT_COMMAND_OPTIONS_INVALID). Since 1.6.0 – alias `channel_types`",
            "minItems": 1,
            "maxItems": 2
          }
        },
        "required": [
          "name",
          "description",
          "type"
        ]
      },
      "AutocompleteChoice": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Shown to the person",
            "minLength": 1,
            "maxLength": 100
          },
          "value": {
            "type": [
              "string",
              "number"
            ],
            "description": "Inserted as the option value – must match the option type and limits (invalid entries are dropped)"
          },
          "description": {
            "type": "string",
            "description": "Short secondary line shown under the name – longer than 100 characters is cut off, non-strings are ignored. Since 1.6.0"
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "AutocompleteResultData": {
        "type": "object",
        "properties": {
          "choices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutocompleteChoice"
            },
            "description": "At most 25 (more are cut off)",
            "maxItems": 100
          }
        },
        "required": [
          "choices"
        ],
        "description": "AUTOCOMPLETE_RESULT data (HTTP answer) / body of POST /bot/interactions/{interactionId}/autocomplete (gateway bots). Since 1.4.0"
      },
      "AutocompleteAnswerResult": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "const": true
          },
          "choices": {
            "type": "integer",
            "description": "Choices passed on to the person"
          },
          "dropped": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Why entries were dropped (invalid name / value, cut off) – for debugging"
          }
        },
        "required": [
          "accepted",
          "choices",
          "dropped"
        ]
      },
      "CommandInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "a-z 0-9 _ - (lower case), unique per bot",
            "pattern": "^[a-z0-9_-]{1,32}$"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommandOption"
            },
            "maxItems": 10
          }
        },
        "required": [
          "name",
          "description"
        ]
      },
      "Command": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommandInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Command id"
              },
              "applicationId": {
                "type": "string",
                "description": "Application id"
              }
            },
            "required": [
              "id",
              "applicationId"
            ]
          }
        ]
      },
      "ReplaceCommandsRequest": {
        "type": "object",
        "properties": {
          "commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommandInput"
            },
            "description": "The complete list (replaces all commands), at most 50",
            "maxItems": 50
          }
        },
        "required": [
          "commands"
        ]
      },
      "BotSubscriptions": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string",
            "description": "Installation id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "message.created",
                "message.updated",
                "message.deleted",
                "reaction.added",
                "reaction.removed",
                "member.joined",
                "member.left",
                "member.roles_updated",
                "task.created",
                "task.updated",
                "task.completed",
                "event.created",
                "event.updated",
                "event.canceled",
                "event.rsvp_updated",
                "file.uploaded",
                "voice.joined",
                "voice.left",
                "voice.member_moved",
                "presence.updated",
                "interaction.created",
                "dm.message_created",
                "meeting.transcript_ready",
                "ticket.created",
                "ticket.updated",
                "ticket.message.created",
                "ticket.message.updated",
                "ticket.message.deleted",
                "ticket.rated",
                "ticket.sla.breached",
                "member.banned",
                "member.unbanned",
                "member.kicked",
                "member.timeout",
                "member.linked_account_updated",
                "invite.created",
                "invite.revoked",
                "voice.state_updated",
                "voice.moved_afk",
                "team.application.created",
                "team.application.decided",
                "team.member.added",
                "team.member.removed",
                "forum.post_created",
                "room.created",
                "room.updated",
                "room.deleted",
                "room.permissions_updated"
              ],
              "description": "Event type"
            }
          }
        },
        "required": [
          "installationId",
          "spaceId",
          "events"
        ]
      },
      "SubscriptionsRequest": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event types (400 BOT_EVENTS_INVALID with `details.events` for unknown ones)",
            "maxItems": 96
          }
        },
        "required": [
          "events"
        ]
      },
      "EventUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User id"
          },
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "bot": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "username",
          "displayName",
          "bot"
        ]
      },
      "EventMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Message id"
          },
          "roomId": {
            "type": "string",
            "description": "Room id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "author": {
            "$ref": "#/components/schemas/EventUser"
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "null without MESSAGE_CONTENT – direct messages to the bot always carry the text"
          },
          "replyToId": {
            "type": [
              "string",
              "null"
            ]
          },
          "threadRootId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reply in a thread: id of the root message – in forum rooms the forum post id (null for timeline messages)"
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mentionEveryone": {
            "type": "boolean"
          },
          "attachmentCount": {
            "type": "integer"
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "editedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "roomId",
          "spaceId",
          "author",
          "content",
          "replyToId",
          "mentions",
          "mentionEveryone",
          "attachmentCount",
          "webhook",
          "createdAt",
          "editedAt"
        ]
      },
      "EventMessagePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventMessage"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `before` for the next (older) page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "HistoryMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EventMessage"
          },
          {
            "type": "object",
            "properties": {
              "components": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Components",
                    "description": "Buttons / select menus as stored – null when the message has none. `customId` only on the bot's own messages; messages of other bots carry the same rows without `customId` (their internal state). Since 1.7.0"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "components"
            ]
          }
        ],
        "description": "A message of the history: EventMessage plus its components (Since 1.7.0)."
      },
      "HistoryMessagePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryMessage"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `before` for the next (older) page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "EventMember": {
        "type": "object",
        "properties": {
          "memberId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/EventUser"
          },
          "displayName": {
            "type": "string"
          },
          "isGuest": {
            "type": "boolean"
          },
          "roleIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "linkedAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkedAccount"
            }
          }
        },
        "required": [
          "memberId",
          "user",
          "displayName",
          "isGuest",
          "roleIds",
          "joinedAt"
        ]
      },
      "Invite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Invite id"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "createdBy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "uses": {
            "type": "integer"
          },
          "maxUses": {
            "type": [
              "integer",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "asGuest": {
            "type": "boolean"
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "joinedMembers": {
            "type": "integer",
            "description": "Active members that joined through this invite"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "code",
          "url",
          "createdBy",
          "uses",
          "maxUses",
          "expiresAt",
          "revokedAt",
          "asGuest",
          "roleId",
          "joinedMembers",
          "createdAt"
        ]
      },
      "VoiceState": {
        "type": "object",
        "properties": {
          "selfMuted": {
            "type": "boolean"
          },
          "serverMuted": {
            "type": "boolean"
          },
          "deafened": {
            "type": "boolean"
          },
          "video": {
            "type": "boolean"
          },
          "screenShare": {
            "type": "boolean"
          },
          "onStage": {
            "type": "boolean"
          },
          "inAfkRoom": {
            "type": "boolean"
          }
        },
        "required": [
          "selfMuted",
          "serverMuted",
          "deafened",
          "video",
          "screenShare",
          "onStage",
          "inAfkRoom"
        ]
      },
      "TeamApplication": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Team application id"
          },
          "teamId": {
            "type": "string",
            "description": "Team id"
          },
          "userId": {
            "type": "string",
            "description": "User id"
          },
          "user": {
            "$ref": "#/components/schemas/EventUser"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACCEPTED",
              "DECLINED",
              "WITHDRAWN"
            ]
          },
          "decidedById": {
            "type": [
              "string",
              "null"
            ]
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "decisionNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdByBotId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bot account that applied on behalf of the applicant (\"via <bot>\") – null = applied themselves. Since 1.4.0"
          },
          "withdrawnByBotId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bot account that withdrew the application on behalf of the applicant (status WITHDRAWN, no re-application cooldown) – null = not withdrawn or withdrawn by the person. Since 1.5.0"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "userId",
          "user",
          "message",
          "status",
          "decidedById",
          "decidedAt",
          "decisionNote",
          "createdByBotId",
          "withdrawnByBotId",
          "createdAt"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Task id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "roomId": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "TODO",
              "IN_PROGRESS",
              "DONE",
              "CANCELED"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "URGENT"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ]
          },
          "tabId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Task list (\"tab\") of the room – null = the default tab"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category (task type) of the room – null = none"
          },
          "category": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "null = localized name of the built-in category"
              },
              "builtin": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "FEATURE",
                  "BUG",
                  "IMPROVEMENT",
                  "TASK",
                  "DOCS"
                ]
              },
              "color": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "builtin",
              "color"
            ]
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "spaceId",
          "roomId",
          "title",
          "description",
          "status",
          "priority",
          "dueDate",
          "assigneeId",
          "createdById",
          "tabId",
          "categoryId",
          "category",
          "completedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateTaskRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "User id of a member"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "URGENT"
            ]
          },
          "tabId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Task list (\"tab\") of the room – omitted / null = the default tab"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category (task type) of the room – omitted / null = none"
          }
        },
        "required": [
          "title"
        ]
      },
      "UpdateTaskRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "status": {
            "type": "string",
            "enum": [
              "TODO",
              "IN_PROGRESS",
              "DONE",
              "CANCELED"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "URGENT"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "tabId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Move the task to another task list of its room – null = the default tab"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category (task type) of the room – null = none"
          }
        }
      },
      "CalendarEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Event id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "roomId": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "allDay": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone"
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ]
          },
          "canceledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "spaceId",
          "roomId",
          "title",
          "description",
          "startAt",
          "endAt",
          "allDay",
          "timezone",
          "location",
          "createdById",
          "canceledAt",
          "createdAt"
        ]
      },
      "EventRsvp": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/EventUser"
          },
          "status": {
            "type": "string",
            "enum": [
              "GOING",
              "REGISTERED",
              "MAYBE",
              "DECLINED",
              "INVITED"
            ],
            "description": "GOING / REGISTERED = attending, MAYBE, DECLINED, INVITED = invited without an answer yet"
          },
          "respondedAt": {
            "type": "string",
            "format": "date-time"
          },
          "viaBotId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bot account that gave this answer on behalf of the person (\"via <bot>\") – null = answered themselves. Since 1.4.0"
          }
        },
        "required": [
          "user",
          "status",
          "respondedAt",
          "viaBotId"
        ]
      },
      "PutEventRsvpRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "GOING",
              "MAYBE",
              "DECLINED"
            ],
            "description": "GOING becomes REGISTERED for events with registration"
          },
          "interactionId": {
            "type": "string",
            "description": "Interaction proof: an interaction of this bot by this person – only together with the header X-Coviqo-Interaction-Token; no extra data access needed"
          }
        },
        "required": [
          "status"
        ]
      },
      "EventRsvpResult": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "description": "Event id"
          },
          "userId": {
            "type": "string",
            "description": "User id"
          },
          "status": {
            "type": "string",
            "enum": [
              "GOING",
              "REGISTERED",
              "MAYBE",
              "DECLINED",
              "INVITED"
            ],
            "description": "Effective answer (GOING → REGISTERED for events with registration)"
          },
          "viaBotUserId": {
            "type": "string",
            "description": "The bot account"
          },
          "respondedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "eventId",
          "userId",
          "status",
          "viaBotUserId",
          "respondedAt"
        ]
      },
      "EventRsvpPage": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "description": "Event id"
          },
          "counts": {
            "type": "object",
            "properties": {
              "GOING": {
                "type": "integer"
              },
              "REGISTERED": {
                "type": "integer"
              },
              "MAYBE": {
                "type": "integer"
              },
              "DECLINED": {
                "type": "integer"
              },
              "INVITED": {
                "type": "integer"
              }
            },
            "required": [
              "GOING",
              "REGISTERED",
              "MAYBE",
              "DECLINED",
              "INVITED"
            ],
            "description": "Answers per status (all statuses, independent of the filter)"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventRsvp"
            },
            "description": "Oldest answer first"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "eventId",
          "counts",
          "items",
          "nextCursor"
        ]
      },
      "CreateEventRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 5000
          },
          "allDay": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone, e.g. Europe/Berlin",
            "maxLength": 64
          },
          "recurrenceRule": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 5545 RRULE",
            "maxLength": 500
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "requiresRegistration": {
            "type": "boolean"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000
          },
          "reminderMinutes": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10080
            },
            "description": "Reminders before the start (minutes)",
            "maxItems": 5
          }
        },
        "required": [
          "title",
          "startAt",
          "endAt"
        ]
      },
      "UpdateEventRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 5000
          },
          "allDay": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone, e.g. Europe/Berlin",
            "maxLength": 64
          },
          "recurrenceRule": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 5545 RRULE",
            "maxLength": 500
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "requiresRegistration": {
            "type": "boolean"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000
          },
          "reminderMinutes": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10080
            },
            "description": "Reminders before the start (minutes)",
            "maxItems": 5
          },
          "roomId": {
            "type": "string",
            "description": "Move the event (a recurring series as a whole) to another room of the same space – RSVPs, tickets and reminders stay. Needs `events.manage` in the old and the new room (own events: `events.create` in the new room), the Events module on there, not archived. Rooms only. Since 1.6.0",
            "maxLength": 64
          }
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "File id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "roomId": {
            "type": [
              "string",
              "null"
            ]
          },
          "folderId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "description": "Bytes"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "SCANNING",
              "READY",
              "INFECTED",
              "DELETED"
            ],
            "description": "Not READY while the malware scan runs"
          },
          "uploadedById": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "spaceId",
          "roomId",
          "folderId",
          "name",
          "mimeType",
          "size",
          "status",
          "uploadedById",
          "createdAt",
          "updatedAt"
        ]
      },
      "FileList": {
        "type": "object",
        "properties": {
          "folders": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "parentId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "itemCount": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "parentId",
                "name",
                "itemCount"
              ]
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/File"
            }
          }
        },
        "required": [
          "folders",
          "files"
        ]
      },
      "UploadFileRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "mimeType": {
            "type": "string",
            "description": "e.g. `application/pdf`",
            "pattern": "^[\\w.+-]+/[\\w.+-]+$",
            "maxLength": 255
          },
          "size": {
            "type": "integer",
            "description": "Exact size in bytes (the upload URL accepts at most this many)",
            "minimum": 0
          },
          "folderId": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "mimeType",
          "size"
        ]
      },
      "FileUpload": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/File"
          },
          "uploadUrl": {
            "type": "string",
            "description": "PUT the raw bytes here (no bot token), with `headers`",
            "format": "uri"
          },
          "headers": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "string"
            }
          },
          "expiresInSec": {
            "type": "integer"
          },
          "completeUrl": {
            "type": "string",
            "description": "POST here with the bot token after the upload",
            "format": "uri"
          }
        },
        "required": [
          "file",
          "uploadUrl",
          "headers",
          "expiresInSec",
          "completeUrl"
        ]
      },
      "FileDownload": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Short-lived signed absolute URL (https://…, built from the public base URL of the instance) – no bot token needed",
            "format": "uri"
          },
          "expiresInSec": {
            "type": "integer"
          }
        },
        "required": [
          "url",
          "expiresInSec"
        ]
      },
      "Note": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Note id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "roomId": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text with light Markdown (`#` headings, `-` lists); null in lists"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedById": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": "integer",
            "description": "Pass as `baseVersion` when replacing the text"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "spaceId",
          "roomId",
          "title",
          "content",
          "createdById",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateNoteRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "content": {
            "type": "string",
            "description": "Text with light Markdown (`#` headings, `-` lists, paragraphs)",
            "maxLength": 100000
          }
        },
        "required": [
          "title"
        ]
      },
      "UpdateNoteRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "content": {
            "type": "string",
            "description": "Replaces the whole text as a new version",
            "maxLength": 100000
          },
          "baseVersion": {
            "type": "integer",
            "description": "Optimistic concurrency (409 NOTE_VERSION_CONFLICT); default: the current version",
            "minimum": 1
          }
        }
      },
      "TimeoutRequest": {
        "type": "object",
        "properties": {
          "minutes": {
            "type": "integer",
            "description": "1 minute … 28 days",
            "minimum": 1,
            "maximum": 40320
          },
          "reason": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": [
          "minutes"
        ]
      },
      "KickRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "BanRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 1000
          },
          "durationHours": {
            "type": "integer",
            "description": "Temporary ban; omit for a permanent ban",
            "minimum": 1,
            "maximum": 87600
          },
          "deleteMessageHours": {
            "type": "integer",
            "description": "Delete the member’s messages of the last hours",
            "minimum": 0,
            "maximum": 168
          }
        }
      },
      "DmConversation": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "description": "Id of the conversation (as in `dm.message_created`)"
          },
          "roomId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "canReply": {
            "type": "boolean",
            "description": "The person wrote at least once and no block exists"
          },
          "blocked": {
            "type": "boolean"
          }
        },
        "required": [
          "conversationId",
          "roomId",
          "user",
          "lastMessageAt",
          "canReply",
          "blocked"
        ]
      },
      "DmConversationPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DmConversation"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "`lastMessageAt` of the last item – pass as `before`"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "InteractionDmResult": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string"
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          }
        },
        "required": [
          "conversationId",
          "message"
        ]
      },
      "VoiceJoinRequest": {
        "type": "object",
        "properties": {
          "listen": {
            "type": "boolean",
            "description": "Hear the room – needs VOICE_LISTEN"
          },
          "publish": {
            "type": "boolean",
            "description": "Speak (microphone only) – needs voice.speak"
          }
        },
        "description": "At least one of both must be true"
      },
      "VoiceJoinResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "LiveKit server URL"
          },
          "token": {
            "type": "string",
            "description": "LiveKit access token for the bot identity"
          },
          "roomName": {
            "type": "string"
          },
          "identity": {
            "type": "string"
          },
          "canPublish": {
            "type": "boolean"
          },
          "canSubscribe": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "url",
          "token",
          "roomName",
          "identity",
          "canPublish",
          "canSubscribe",
          "expiresAt"
        ]
      },
      "VoiceParticipant": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "roomId": {
            "type": "string"
          },
          "muted": {
            "type": "boolean"
          },
          "deafened": {
            "type": "boolean"
          },
          "speaking": {
            "type": "boolean"
          },
          "video": {
            "type": "boolean"
          },
          "screenShare": {
            "type": "boolean"
          },
          "onStage": {
            "type": "boolean"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "bot": {
            "type": "boolean"
          },
          "botListening": {
            "type": "boolean"
          }
        },
        "required": [
          "userId",
          "roomId",
          "muted",
          "deafened",
          "speaking",
          "joinedAt"
        ],
        "additionalProperties": true
      },
      "VoiceBot": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "botUser": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "name": {
            "type": "string"
          },
          "listening": {
            "type": "boolean"
          },
          "publishing": {
            "type": "boolean"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "roomId",
          "applicationId",
          "botUser",
          "name",
          "listening",
          "publishing",
          "joinedAt"
        ]
      },
      "VoiceRoom": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceParticipant"
            }
          },
          "self": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VoiceBot"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "roomId",
          "participants",
          "self"
        ]
      },
      "MeetingItem": {
        "type": "object",
        "properties": {
          "meetingId": {
            "type": "string"
          },
          "roomId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "hasTranscript": {
            "type": "boolean"
          },
          "hasSummary": {
            "type": "boolean"
          }
        },
        "required": [
          "meetingId",
          "roomId",
          "title",
          "startedAt",
          "endedAt",
          "hasTranscript",
          "hasSummary"
        ]
      },
      "MeetingList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingItem"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor`"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "TranscriptSegment": {
        "type": "object",
        "properties": {
          "speakerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "speakerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "startMs": {
            "type": "integer"
          },
          "endMs": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "speakerId",
          "speakerName",
          "startMs",
          "endMs",
          "text"
        ]
      },
      "MeetingTranscript": {
        "type": "object",
        "properties": {
          "meetingId": {
            "type": "string"
          },
          "roomId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TranscriptSegment"
            }
          },
          "summary": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "ai": {
                "const": true
              }
            },
            "required": [
              "text",
              "ai"
            ]
          }
        },
        "required": [
          "meetingId",
          "roomId",
          "title",
          "endedAt",
          "segments",
          "summary"
        ]
      },
      "TicketSlaPhase": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "none",
              "running",
              "dueSoon",
              "overdue",
              "paused",
              "met",
              "breached"
            ]
          },
          "due": {
            "type": [
              "string",
              "null"
            ],
            "description": "Effective due time",
            "format": "date-time"
          }
        },
        "required": [
          "state",
          "due"
        ]
      },
      "TicketSla": {
        "type": "object",
        "properties": {
          "firstResponse": {
            "$ref": "#/components/schemas/TicketSlaPhase"
          },
          "resolution": {
            "$ref": "#/components/schemas/TicketSlaPhase"
          },
          "badge": {
            "enum": [
              "overdue",
              "dueSoon",
              null
            ],
            "description": "The worse of both open clocks"
          }
        },
        "required": [
          "firstResponse",
          "resolution",
          "badge"
        ]
      },
      "Ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ticket id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "roomId": {
            "type": "string",
            "description": "Room id"
          },
          "number": {
            "type": "integer",
            "description": "Sequential per room (#42)"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description (Markdown, `<@userId>` mentions) – null in lists"
          },
          "status": {
            "type": "string",
            "enum": [
              "NEW",
              "IN_PROGRESS",
              "WAITING_FOR_REPLY",
              "RESOLVED",
              "CLOSED"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "NORMAL",
              "HIGH",
              "URGENT"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            },
            "description": "Custom field values (field id → value)"
          },
          "creatorId": {
            "type": "string",
            "description": "Reporter – the member when a bot opened the ticket on behalf of someone"
          },
          "createdByBotId": {
            "type": [
              "string",
              "null"
            ],
            "description": "BOT account that opened the ticket on behalf of `creatorId` (shown as \"created by <bot> on behalf of <member>\") – null = opened by the creator"
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigneeRoleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "participantIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastActivityAt": {
            "type": "string",
            "description": "Internal notes count only with tickets.handle",
            "format": "date-time"
          },
          "firstResponseAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "mergedIntoId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sla": {
            "$ref": "#/components/schemas/TicketSla"
          },
          "rating": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1–5 stars – only for bots with tickets.view / handle / manage",
            "minimum": 1,
            "maximum": 5
          }
        },
        "required": [
          "id",
          "spaceId",
          "roomId",
          "number",
          "title",
          "body",
          "status",
          "priority",
          "categoryId",
          "fields",
          "creatorId",
          "createdByBotId",
          "assigneeId",
          "assigneeRoleId",
          "participantIds",
          "createdAt",
          "updatedAt",
          "lastActivityAt",
          "firstResponseAt",
          "resolvedAt",
          "closedAt",
          "mergedIntoId",
          "sla",
          "rating"
        ]
      },
      "TicketMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ticket message id"
          },
          "ticketId": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "INTERNAL"
            ],
            "description": "INTERNAL = note for the team – only for bots with tickets.handle"
          },
          "authorId": {
            "type": "string"
          },
          "author": {
            "$ref": "#/components/schemas/TicketMessageAuthor"
          },
          "body": {
            "type": "string"
          },
          "attachmentCount": {
            "type": "integer",
            "description": "Number of attachments – list / download them via GET /bot/tickets/{ticketId}/attachments"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "editedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "viaBotId": {
            "type": [
              "string",
              "null"
            ],
            "description": "BOT account that posted the reply on behalf of its author (interaction proof or TICKETS_REPLY_ON_BEHALF) – shown as “via <bot>”; null = written by the author. Since 1.7.0"
          }
        },
        "required": [
          "id",
          "ticketId",
          "kind",
          "authorId",
          "author",
          "body",
          "attachmentCount",
          "createdAt",
          "editedAt",
          "viaBotId"
        ]
      },
      "TicketMessageAuthor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "= authorId"
          },
          "displayName": {
            "type": "string",
            "description": "Display name inside the space (space identity / nickname, else the profile name)"
          },
          "isBot": {
            "type": "boolean",
            "description": "BOT account (e.g. this bot)"
          }
        },
        "required": [
          "id",
          "displayName",
          "isBot"
        ],
        "description": "Who wrote the message – id, space display name and BOT flag only (no username, avatar or e-mail). Since 1.6.0."
      },
      "TicketRating": {
        "type": "object",
        "properties": {
          "stars": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "comment": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "stars",
          "comment",
          "createdAt",
          "updatedAt"
        ]
      },
      "TicketDetail": {
        "type": "object",
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/Ticket"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TicketMessage"
            },
            "description": "Oldest first, at most 500"
          },
          "rating": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TicketRating"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ticket",
          "messages",
          "rating"
        ]
      },
      "TicketPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ticket"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "TicketAttachment": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/File"
          },
          "messageId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reply / internal note the file belongs to – null = attachment of the ticket description"
          },
          "createdAt": {
            "type": "string",
            "description": "When the file was attached",
            "format": "date-time"
          }
        },
        "required": [
          "file",
          "messageId",
          "createdAt"
        ],
        "description": "`file.status`: only READY files can be downloaded (still scanning → 409 FILE_NOT_READY, INFECTED → 403 FILE_INFECTED)."
      },
      "TicketAttachmentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TicketAttachment"
            },
            "description": "Oldest first, at most 1000"
          }
        },
        "required": [
          "items"
        ]
      },
      "TicketRatingPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/TicketRating"
                },
                {
                  "type": "object",
                  "properties": {
                    "ticketId": {
                      "type": "string"
                    },
                    "number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "ticketId",
                    "number"
                  ]
                }
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor`"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "TicketCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "position"
        ]
      },
      "TicketField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "null = applies to every category"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "TEXT",
              "LONG_TEXT",
              "NUMBER",
              "SELECT",
              "CHECKBOX",
              "DATE",
              "URL"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "SELECT only"
          },
          "position": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "categoryId",
          "label",
          "type",
          "required",
          "options",
          "position"
        ]
      },
      "TicketCannedResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "description": "Placeholders {name} {ticket} {title} {agent} {room} are not filled in"
          },
          "position": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "title",
          "body",
          "position"
        ]
      },
      "TicketStats": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "open": {
            "type": "integer"
          },
          "byStatus": {
            "type": "object",
            "properties": {
              "NEW": {
                "type": "integer"
              },
              "IN_PROGRESS": {
                "type": "integer"
              },
              "WAITING_FOR_REPLY": {
                "type": "integer"
              },
              "RESOLVED": {
                "type": "integer"
              },
              "CLOSED": {
                "type": "integer"
              }
            },
            "required": [
              "NEW",
              "IN_PROGRESS",
              "WAITING_FOR_REPLY",
              "RESOLVED",
              "CLOSED"
            ]
          },
          "unassigned": {
            "type": "integer"
          },
          "overdue": {
            "type": "integer"
          },
          "ratingAverage": {
            "type": [
              "number",
              "null"
            ]
          },
          "ratingCount": {
            "type": "integer"
          },
          "avgFirstResponseMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Tickets of the last 90 days"
          }
        },
        "required": [
          "total",
          "open",
          "byStatus",
          "unassigned",
          "overdue",
          "ratingAverage",
          "ratingCount",
          "avgFirstResponseMinutes"
        ]
      },
      "TicketChange": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "status | priority | category | assignee | assigneeRole | title | participant | field:<fieldId> | merged | description (since 1.6.0; from / to null – the text is not repeated) | reporter (since 1.6.0; from = bot, to = member)"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category name / field label at the time of the change"
          }
        },
        "required": [
          "field",
          "from",
          "to"
        ]
      },
      "CreateTicketRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "description": "Description (Markdown, `<@userId>` mentions)",
            "maxLength": 20000
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "NORMAL",
              "HIGH",
              "URGENT"
            ],
            "description": "Only with tickets.handle – otherwise NORMAL"
          },
          "fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Custom field values (field id → value); required fields of the category are enforced"
          },
          "attachmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ticket uploads of the bot in this room (POST /bot/rooms/{roomId}/tickets/attachments), not attached yet – at most 10",
            "maxItems": 10
          },
          "interactionId": {
            "type": "string",
            "description": "On behalf of the person of this interaction (interaction proof) – only together with the header X-Coviqo-Interaction-Token of the same interaction; no extra data access needed"
          },
          "onBehalfOfUserId": {
            "type": "string",
            "description": "On behalf of this member – needs the approved data access TICKETS_CREATE_ON_BEHALF (or an interaction of the same person)"
          }
        },
        "required": [
          "title"
        ]
      },
      "UploadTicketAttachmentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "mimeType": {
            "type": "string",
            "description": "e.g. `image/png`",
            "pattern": "^[\\w.+-]+/[\\w.+-]+$",
            "maxLength": 255
          },
          "size": {
            "type": "integer",
            "description": "Exact size in bytes (the upload URL accepts at most this many)",
            "minimum": 0
          }
        },
        "required": [
          "name",
          "mimeType",
          "size"
        ]
      },
      "UpdateTicketRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "description": "Description (Markdown, `<@userId>` mentions; may be empty) – tickets.handle, or the bot’s own ticket (opened as itself or on behalf of the creator). Since 1.6.0.",
            "maxLength": 20000
          },
          "status": {
            "type": "string",
            "enum": [
              "NEW",
              "IN_PROGRESS",
              "WAITING_FOR_REPLY",
              "RESOLVED",
              "CLOSED"
            ],
            "description": "Workflow: tickets.handle any allowed transition; the bot’s own ticket: close / reopen within the window"
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "NORMAL",
              "HIGH",
              "URGENT"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "A person with tickets.handle in the room (never a bot)"
          },
          "assigneeRoleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Role of the space"
          },
          "fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Replaces the custom field values"
          }
        }
      },
      "ReassignTicketReporterRequest": {
        "type": "object",
        "properties": {
          "interactionId": {
            "type": "string",
            "description": "The person of this interaction becomes the reporter (interaction proof) – only together with the header X-Coviqo-Interaction-Token of the same interaction; no extra data access needed"
          },
          "onBehalfOfUserId": {
            "type": "string",
            "description": "This member becomes the reporter – needs the approved data access TICKETS_CREATE_ON_BEHALF (or an interaction of the same person)"
          }
        },
        "description": "Name the member with one of both (both given must name the same person). Since 1.6.0."
      },
      "CreateTicketMessageRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "description": "Markdown, `<@userId>` mentions",
            "minLength": 1,
            "maxLength": 20000
          },
          "kind": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "INTERNAL"
            ],
            "description": "Default PUBLIC; INTERNAL needs tickets.handle"
          },
          "attachmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ticket uploads of the bot in the ticket’s room, not attached yet – at most 10",
            "maxItems": 10
          },
          "interactionId": {
            "type": "string",
            "description": "Reply on behalf of the person of this interaction (interaction proof) – only together with the header X-Coviqo-Interaction-Token of the same interaction; no extra data access needed. Since 1.7.0"
          },
          "onBehalfOfUserId": {
            "type": "string",
            "description": "Reply on behalf of this member – needs the approved data access TICKETS_REPLY_ON_BEHALF (or an interaction of the same person). Since 1.7.0"
          }
        },
        "required": [
          "body"
        ]
      },
      "UpdateTicketMessageRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "description": "The new text (Markdown, `<@userId>` mentions) – may be empty only while the message has attachments",
            "maxLength": 20000
          }
        },
        "required": [
          "body"
        ],
        "description": "Since 1.7.0."
      },
      "IncomingWebhookPayload": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "username": {
            "type": "string",
            "description": "Display name for this one message"
          },
          "avatarUrl": {
            "type": "string",
            "description": "https avatar for this one message (shown through the image proxy)",
            "format": "uri"
          }
        },
        "required": [
          "content"
        ]
      },
      "InteractionPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Interaction id"
          },
          "type": {
            "type": "string",
            "enum": [
              "PING",
              "COMMAND",
              "COMPONENT",
              "MODAL_SUBMIT",
              "AUTOCOMPLETE"
            ],
            "description": "AUTOCOMPLETE (since 1.4.0): the person is typing an `autocomplete` option – answer AUTOCOMPLETE_RESULT"
          },
          "applicationId": {
            "type": "string",
            "description": "Application id"
          },
          "token": {
            "type": "string",
            "description": "Interaction token – header X-Coviqo-Interaction-Token of the follow-up endpoints, valid 15 minutes"
          },
          "spaceId": {
            "type": "string"
          },
          "roomId": {
            "type": "string"
          },
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "username": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "locale": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "displayName",
              "locale"
            ],
            "description": "The person who used the command / component"
          },
          "memberRoleIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Role ids of that person in the space"
          },
          "command": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "options": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "type": [
                    "string",
                    "number",
                    "boolean"
                  ]
                }
              },
              "focused": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The option being typed"
                  },
                  "value": {
                    "type": "string",
                    "description": "Its text so far (raw, may be empty, at most 200 characters)"
                  }
                },
                "required": [
                  "name",
                  "value"
                ],
                "description": "AUTOCOMPLETE only"
              }
            },
            "required": [
              "name",
              "options"
            ],
            "description": "COMMAND: name + checked options (types, choices and limits enforced). AUTOCOMPLETE: the options typed so far (only valid ones) + `focused`"
          },
          "customId": {
            "type": "string",
            "description": "COMPONENT / MODAL_SUBMIT"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "COMPONENT: chosen values of a select menu"
          },
          "fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "string"
            },
            "description": "MODAL_SUBMIT: field customId → value"
          },
          "files": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ModalFile"
              }
            },
            "description": "MODAL_SUBMIT of a form with file upload fields: field customId → the uploaded files (every file field, [] when empty). Since 1.6.0"
          },
          "message": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "content"
            ],
            "description": "COMPONENT: the message with the component – null for ephemeral messages"
          },
          "locale": {
            "type": "string",
            "description": "UI language of the person"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "type",
          "applicationId",
          "token",
          "createdAt"
        ]
      },
      "ModalFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "File id"
          },
          "name": {
            "type": "string",
            "description": "File name as uploaded"
          },
          "size": {
            "type": "integer",
            "description": "Bytes"
          },
          "mimeType": {
            "type": "string",
            "description": "Checked against the first bytes of the file"
          },
          "url": {
            "type": "string",
            "description": "Signed absolute download URL – fetch without the bot token, valid 10 minutes; a fresh one: GET /bot/interactions/{interactionId}/files/{fileId}/download",
            "format": "uri"
          },
          "urlExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "size",
          "mimeType",
          "url",
          "urlExpiresAt"
        ],
        "description": "One file of a submitted file upload field (malware scan passed). Since 1.6.0"
      },
      "MessageData": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text, at most 4000 characters. Mentions: `<@userId>`, roles `<@&roleId>`, teams `<@team:teamId>`, `@everyone` only with `chat.mention_everyone`.",
            "maxLength": 4000
          },
          "components": {
            "$ref": "#/components/schemas/Components"
          },
          "ephemeral": {
            "type": "boolean",
            "description": "Only the person who triggered the interaction sees it; never stored"
          },
          "expiresAfterSeconds": {
            "type": "integer",
            "description": "Ephemeral answers only: the message disappears from the person’s screen after this many seconds (3–3600) – also after a reload, its components stop working then. With DEFERRED_MESSAGE (+ `ephemeral`) it applies to the deferred answer. Edits keep the expiry; UPDATE_MESSAGE of an ephemeral message may set a new one. Since 1.7.0",
            "minimum": 3,
            "maximum": 3600
          }
        }
      },
      "InteractionResponse": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "PONG",
              "MESSAGE",
              "DEFERRED_MESSAGE",
              "UPDATE_MESSAGE",
              "DEFERRED_UPDATE",
              "MODAL",
              "AUTOCOMPLETE_RESULT"
            ]
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageData"
              },
              {
                "$ref": "#/components/schemas/Modal"
              },
              {
                "$ref": "#/components/schemas/AutocompleteResultData"
              }
            ],
            "description": "`MessageData` for MESSAGE / UPDATE_MESSAGE (DEFERRED_MESSAGE: only `ephemeral` and – since 1.7.0 – `expiresAfterSeconds`), `Modal` for MODAL, `AutocompleteResultData` for AUTOCOMPLETE_RESULT (the only valid answer to AUTOCOMPLETE)"
          }
        },
        "required": [
          "type"
        ]
      },
      "EventEnvelope": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Idempotency id – identical for retries, redeliveries and webhook + gateway"
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "message.created",
                  "message.updated",
                  "message.deleted",
                  "reaction.added",
                  "reaction.removed",
                  "member.joined",
                  "member.left",
                  "member.roles_updated",
                  "task.created",
                  "task.updated",
                  "task.completed",
                  "event.created",
                  "event.updated",
                  "event.canceled",
                  "event.rsvp_updated",
                  "file.uploaded",
                  "voice.joined",
                  "voice.left",
                  "voice.member_moved",
                  "presence.updated",
                  "interaction.created",
                  "dm.message_created",
                  "meeting.transcript_ready",
                  "ticket.created",
                  "ticket.updated",
                  "ticket.message.created",
                  "ticket.message.updated",
                  "ticket.message.deleted",
                  "ticket.rated",
                  "ticket.sla.breached",
                  "member.banned",
                  "member.unbanned",
                  "member.kicked",
                  "member.timeout",
                  "member.linked_account_updated",
                  "invite.created",
                  "invite.revoked",
                  "voice.state_updated",
                  "voice.moved_afk",
                  "team.application.created",
                  "team.application.decided",
                  "team.member.added",
                  "team.member.removed",
                  "forum.post_created",
                  "room.created",
                  "room.updated",
                  "room.deleted",
                  "room.permissions_updated"
                ],
                "description": "Event type"
              },
              {
                "const": "PING"
              }
            ]
          },
          "applicationId": {
            "type": "string"
          },
          "spaceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "null for direct messages and PING"
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "description": "Event-specific payload"
          }
        },
        "required": [
          "id",
          "type",
          "applicationId",
          "spaceId",
          "installationId",
          "createdAt",
          "data"
        ]
      },
      "LinkedAccountEntry": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User id"
          },
          "memberId": {
            "type": "string",
            "description": "Space member id"
          },
          "linkedAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkedAccount"
            },
            "description": "Never empty"
          }
        },
        "required": [
          "userId",
          "memberId",
          "linkedAccounts"
        ]
      },
      "LinkedAccountPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkedAccountEntry"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page (a user id)"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Team id"
          },
          "tenantId": {
            "type": "string",
            "description": "Organisation id"
          },
          "spaceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "null = organisation team (read-only for bots)"
          },
          "scope": {
            "type": "string",
            "enum": [
              "SPACE",
              "ORG"
            ]
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parent team id (teams form a tree; members of sub-teams count for every parent team)"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "joinPolicy": {
            "type": "string",
            "enum": [
              "OPEN",
              "INVITE_ONLY",
              "APPLICATION",
              "PASSWORD"
            ],
            "description": "OPEN: members join themselves, INVITE_ONLY: added by leads / managers, APPLICATION: people apply, PASSWORD: people join with a password (since 1.6.0)"
          },
          "applicationPrompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "joinPolicy APPLICATION: question shown in the application dialog"
          },
          "hasJoinPassword": {
            "type": "boolean",
            "description": "joinPolicy PASSWORD only: a join password is set – the password itself is never returned. Since 1.6.0"
          },
          "mentionable": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          },
          "memberCount": {
            "type": "integer",
            "description": "Direct members"
          },
          "leadUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "tenantId",
          "spaceId",
          "scope",
          "parentId",
          "name",
          "joinPolicy",
          "mentionable",
          "position",
          "memberCount",
          "leadUserIds"
        ]
      },
      "TeamList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            },
            "description": "Space teams and the organisation teams usable in the space"
          }
        },
        "required": [
          "items"
        ]
      },
      "TeamMember": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "description": "Team id"
          },
          "userId": {
            "type": "string",
            "description": "User id"
          },
          "user": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "isLead": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "enum": [
              "MANUAL",
              "IDP"
            ],
            "description": "IDP: synced from the identity provider – cannot be removed manually"
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "teamId",
          "userId",
          "user",
          "displayName",
          "isLead",
          "source",
          "addedAt"
        ]
      },
      "TeamMemberList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMember"
            },
            "description": "Leads first"
          }
        },
        "required": [
          "items"
        ]
      },
      "TeamApplicationPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamApplication"
            },
            "description": "Newest first"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "TeamAnnouncement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Announcement id"
          },
          "teamId": {
            "type": "string",
            "description": "Team id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "author": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "content": {
            "type": "string"
          },
          "roomId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Room the announcement was also posted to as a message"
          },
          "messageId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "editedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "spaceId",
          "author",
          "title",
          "content",
          "roomId",
          "messageId",
          "createdAt",
          "editedAt"
        ]
      },
      "TeamAnnouncementPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamAnnouncement"
            },
            "description": "Newest first"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "UpdateTeamRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "joinPolicy": {
            "type": "string",
            "enum": [
              "OPEN",
              "INVITE_ONLY",
              "APPLICATION",
              "PASSWORD"
            ],
            "description": "OPEN is refused (409 TEAM_GRANTS_ABOVE_BOT) while the team or a parent team grants room permissions the bot does not hold"
          },
          "applicationPrompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Question of the application dialog (joinPolicy APPLICATION)",
            "maxLength": 300
          },
          "password": {
            "type": "string",
            "description": "joinPolicy PASSWORD: the join password (6–128 characters, write-only – never returned). Required when switching to PASSWORD; send it alone to change the password of a PASSWORD team; refused (400 TEAM_JOIN_PASSWORD_NOT_APPLICABLE) with any other join policy. Switching away clears it. Since 1.6.0",
            "minLength": 6,
            "maxLength": 128,
            "writeOnly": true,
            "format": "password"
          }
        }
      },
      "CreateTeamApplicationRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "1–1000 characters",
            "minLength": 1,
            "maxLength": 1000
          },
          "onBehalfOfUserId": {
            "type": "string",
            "description": "Apply for this member – needs the approved data access TEAM_APPLY_ON_BEHALF (or an interaction of the same person)"
          },
          "interactionId": {
            "type": "string",
            "description": "Interaction proof: apply for the person of this interaction – only together with the header X-Coviqo-Interaction-Token; no extra data access needed"
          }
        },
        "required": [
          "message"
        ]
      },
      "WithdrawTeamApplicationRequest": {
        "type": "object",
        "properties": {
          "interactionId": {
            "type": "string",
            "description": "Interaction proof: an interaction of this bot by the applicant – only together with the header X-Coviqo-Interaction-Token; no extra data access needed"
          }
        }
      },
      "PutTeamMemberRequest": {
        "type": "object",
        "properties": {
          "isLead": {
            "type": "boolean",
            "description": "Make / unmake a team lead (omitted: unchanged for members, false for new ones)"
          }
        }
      },
      "TeamApplicationDecisionRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "ACCEPTED",
              "DECLINED"
            ]
          },
          "note": {
            "type": "string",
            "description": "Shown to the applicant (≤ 500 characters)",
            "maxLength": 500
          }
        },
        "required": [
          "decision"
        ]
      },
      "CreateTeamAnnouncementRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "≤ 120 characters",
            "maxLength": 120
          },
          "content": {
            "type": "string",
            "description": "1–4000 characters",
            "minLength": 1,
            "maxLength": 4000
          },
          "roomId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Also post it as a message into this room of the team’s space (the bot needs chat.send there)"
          }
        },
        "required": [
          "content"
        ]
      },
      "ForumTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tag id"
          },
          "name": {
            "type": "string",
            "description": "1–24 characters"
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "description": "#rrggbb"
          },
          "emoji": {
            "type": [
              "string",
              "null"
            ]
          },
          "moderatorsOnly": {
            "type": "boolean",
            "description": "Only with forum.manage (403 FORUM_TAG_RESTRICTED otherwise)"
          },
          "position": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "emoji",
          "moderatorsOnly",
          "position"
        ]
      },
      "Forum": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "description": "Room id"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForumTag"
            },
            "description": "In display order"
          },
          "requireTag": {
            "type": "boolean",
            "description": "Every new post needs at least one tag (400 FORUM_TAG_REQUIRED)"
          },
          "defaultSort": {
            "type": "string",
            "enum": [
              "activity",
              "newest",
              "reactions"
            ]
          },
          "maxTagsPerPost": {
            "type": "integer"
          },
          "canPost": {
            "type": "boolean",
            "description": "chat.send, room not archived, bot not timed out"
          },
          "canManage": {
            "type": "boolean",
            "description": "forum.manage: moderator tags, solve / pin / lock any post, reply to locked posts"
          }
        },
        "required": [
          "roomId",
          "tags",
          "requireTag",
          "defaultSort",
          "maxTagsPerPost",
          "canPost",
          "canManage"
        ]
      },
      "ForumPost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Post (= id of its first message – edit / delete the body with PATCH / DELETE /bot/messages/{messageId}) id"
          },
          "roomId": {
            "type": "string",
            "description": "Room id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "null: deleted post, or no MESSAGE_CONTENT (events; write answers about posts of others)"
          },
          "excerpt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Plain text beginning of the first message (≈ 280 characters); null like `title`"
          },
          "author": {
            "$ref": "#/components/schemas/EventUser"
          },
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "replyCount": {
            "type": "integer"
          },
          "reactionCount": {
            "type": "integer",
            "description": "Reactions on the first message"
          },
          "solved": {
            "type": "boolean"
          },
          "solvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "acceptedAnswerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reply marked as the answer"
          },
          "pinned": {
            "type": "boolean"
          },
          "locked": {
            "type": "boolean",
            "description": "Only forum.manage may still reply"
          },
          "deleted": {
            "type": "boolean",
            "description": "The first message was deleted – the post stays as placeholder while it has replies"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "editedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "roomId",
          "spaceId",
          "title",
          "excerpt",
          "author",
          "tagIds",
          "replyCount",
          "reactionCount",
          "solved",
          "solvedAt",
          "acceptedAnswerId",
          "pinned",
          "locked",
          "deleted",
          "createdAt",
          "lastActivityAt",
          "editedAt"
        ]
      },
      "ForumPostPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForumPost"
            },
            "description": "Pinned first, then by `sort`"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "ForumPostDetail": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/ForumPost"
          },
          "message": {
            "$ref": "#/components/schemas/EventMessage"
          },
          "acceptedAnswer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventMessage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "post",
          "message",
          "acceptedAnswer"
        ]
      },
      "CreateForumPostRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "3–200 characters (whitespace is collapsed)",
            "maxLength": 250
          },
          "content": {
            "type": "string",
            "description": "First message (optional – the title is the post). Markdown text, at most 4000 characters. Mentions: `<@userId>`, roles `<@&roleId>`, teams `<@team:teamId>`, `@everyone` only with `chat.mention_everyone`.",
            "maxLength": 4000
          },
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Tag id"
            },
            "description": "At most 5 tags of this forum",
            "maxItems": 5
          },
          "components": {
            "$ref": "#/components/schemas/Components"
          },
          "nonce": {
            "type": "string",
            "description": "Client nonce (idempotency for retries), at most 64 characters",
            "maxLength": 64
          }
        },
        "required": [
          "title"
        ]
      },
      "ForumReplyRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text, at most 4000 characters. Mentions: `<@userId>`, roles `<@&roleId>`, teams `<@team:teamId>`, `@everyone` only with `chat.mention_everyone`.",
            "maxLength": 4000
          },
          "components": {
            "$ref": "#/components/schemas/Components"
          },
          "replyToId": {
            "type": "string",
            "description": "Quote a message of this post (its first message or a reply)",
            "maxLength": 64
          },
          "nonce": {
            "type": "string",
            "description": "Client nonce (idempotency for retries), at most 64 characters",
            "maxLength": 64
          }
        },
        "description": "At least `content` or `components` (400 MESSAGE_EMPTY otherwise)."
      },
      "UpdateForumPostRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "3–200 characters",
            "maxLength": 250
          },
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Tag id"
            },
            "description": "Replaces the tags (at most 5)",
            "maxItems": 5
          }
        },
        "description": "Missing fields stay unchanged."
      },
      "ForumSolvedRequest": {
        "type": "object",
        "properties": {
          "solved": {
            "type": "boolean"
          },
          "answerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "A reply of this post (400 FORUM_ANSWER_INVALID otherwise)",
            "maxLength": 64
          }
        },
        "required": [
          "solved"
        ]
      },
      "ForumFlagRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "boolean"
          }
        },
        "required": [
          "value"
        ]
      },
      "BotRoomDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Room id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "STANDARD",
              "VOICE",
              "PROJECT",
              "MEETING",
              "EVENT",
              "COMMUNITY",
              "STAGE",
              "LOBBY",
              "FORUM",
              "MAP"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "PRIVATE",
              "RESTRICTED",
              "INVITE_ONLY"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Room colour token"
          },
          "userLimit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Voice user limit"
          },
          "position": {
            "type": "integer"
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Enabled module keys"
          },
          "archivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "permissionsSynced": {
            "type": "boolean",
            "description": "The room follows the permissions of its category"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "spaceId",
          "categoryId",
          "name",
          "type",
          "visibility",
          "description",
          "tags",
          "icon",
          "color",
          "userLimit",
          "position",
          "modules",
          "archivedAt",
          "permissionsSynced",
          "createdAt"
        ]
      },
      "RoomCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Category id"
          },
          "spaceId": {
            "type": "string",
            "description": "Space id"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "spaceId",
          "name",
          "position"
        ]
      },
      "RoomOverride": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Override id"
          },
          "roomId": {
            "type": "string",
            "description": "Room id"
          },
          "targetType": {
            "type": "string",
            "enum": [
              "ROLE",
              "MEMBER",
              "TEAM"
            ],
            "description": "TEAM entries can be changed by bots since 1.6.0 (PUT / DELETE …/overrides/teams/{teamId})"
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Member overrides: user id of the member"
          },
          "teamId": {
            "type": [
              "string",
              "null"
            ]
          },
          "allow": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Permission key, e.g. `chat.send`"
            }
          },
          "deny": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Permission key, e.g. `chat.send`"
            },
            "description": "Deny wins over allow"
          }
        },
        "required": [
          "id",
          "roomId",
          "targetType",
          "roleId",
          "userId",
          "teamId",
          "allow",
          "deny"
        ]
      },
      "CreateRoomRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "1–64 characters",
            "minLength": 1,
            "maxLength": 64
          },
          "type": {
            "type": "string",
            "enum": [
              "STANDARD",
              "VOICE",
              "PROJECT",
              "EVENT",
              "COMMUNITY",
              "STAGE",
              "FORUM"
            ],
            "description": "Not MEETING, LOBBY or MAP"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "PRIVATE",
              "RESTRICTED",
              "INVITE_ONLY"
            ],
            "description": "Default PUBLIC; PRIVATE / INVITE_ONLY add the bot as room member"
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "categoryId": {
            "type": "string",
            "description": "Create inside this category – needs room.manage in the space; the room starts synced with the category’s permissions"
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "VOICE",
                "CHAT",
                "NOTES",
                "FILES",
                "TASKS",
                "EVENTS",
                "WHITEBOARD",
                "FORUM",
                "TICKETS",
                "DECISIONS",
                "MEETINGS"
              ]
            },
            "description": "Default: the modules of the room type. Not WEBPAGES / FEED (configured by people only)"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32
            },
            "maxItems": 10
          },
          "icon": {
            "type": "string",
            "maxLength": 64
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "blue",
              "cyan",
              "green",
              "yellow",
              "orange",
              "red",
              "pink",
              "purple"
            ]
          },
          "userLimit": {
            "type": "integer",
            "description": "Voice user limit",
            "minimum": 1,
            "maximum": 500
          }
        },
        "required": [
          "name",
          "type"
        ]
      },
      "UpdateRoomRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "visibility": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "PRIVATE",
              "RESTRICTED",
              "INVITE_ONLY"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32
            },
            "maxItems": 10
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "blue",
              "cyan",
              "green",
              "yellow",
              "orange",
              "red",
              "pink",
              "purple"
            ]
          },
          "userLimit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 500
          },
          "type": {
            "type": "string",
            "enum": [
              "STANDARD",
              "VOICE",
              "PROJECT",
              "EVENT",
              "COMMUNITY",
              "STAGE",
              "FORUM"
            ],
            "description": "Lobby and map rooms keep their type"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Move to this category (null = no category) – needs room.manage in the space"
          },
          "permissions": {
            "type": "string",
            "enum": [
              "category",
              "keep"
            ],
            "description": "With a category move: `category` takes over the category’s permissions, `keep` keeps the room’s own (default rules when omitted)"
          }
        }
      },
      "CategoryRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "1–48 characters",
            "minLength": 1,
            "maxLength": 48
          }
        },
        "required": [
          "name"
        ]
      },
      "PutOverrideRequest": {
        "type": "object",
        "properties": {
          "allow": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Permission key, e.g. `chat.send`"
            },
            "description": "Room-scoped permissions (≤ 64)",
            "maxItems": 64
          },
          "deny": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Permission key, e.g. `chat.send`"
            },
            "description": "Room-scoped permissions (≤ 64); deny wins over allow",
            "maxItems": 64
          }
        },
        "required": [
          "allow",
          "deny"
        ]
      },
      "VoiceMoveRequest": {
        "type": "object",
        "properties": {
          "targetRoomId": {
            "type": "string",
            "description": "Voice room to move the person to (same space)"
          }
        },
        "required": [
          "targetRoomId"
        ]
      },
      "RoleAssignRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Audit reason (≤ 512 characters)",
            "maxLength": 512
          }
        }
      },
      "RolesPatchRequest": {
        "type": "object",
        "properties": {
          "add": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Role id"
            },
            "description": "Roles to add (≤ 25)",
            "maxItems": 25
          },
          "remove": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Role id"
            },
            "description": "Roles to remove (≤ 25)",
            "maxItems": 25
          },
          "reason": {
            "type": "string",
            "description": "Audit reason (≤ 512 characters)",
            "maxLength": 512
          }
        }
      },
      "InviteList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invite"
            },
            "description": "Newest first"
          },
          "vanity": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Vanity name (coviqo.example/<name>)"
              },
              "enabled": {
                "type": "boolean",
                "description": "false = switched off or inactive"
              },
              "joinedMembers": {
                "type": "integer",
                "description": "Active members that joined through the vanity link"
              }
            },
            "required": [
              "name",
              "enabled",
              "joinedMembers"
            ]
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page (an invite id)"
          }
        },
        "required": [
          "items",
          "vanity",
          "nextCursor"
        ]
      },
      "Ban": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User id"
          },
          "user": {
            "$ref": "#/components/schemas/EventUser"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "null = permanent",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "bannedBy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventUser"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "userId",
          "user",
          "reason",
          "expiresAt",
          "createdAt",
          "bannedBy"
        ]
      },
      "BanPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ban"
            },
            "description": "Active bans ordered by user id"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page (a user id)"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "ModerationAction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Moderation action id"
          },
          "type": {
            "type": "string",
            "enum": [
              "WARN",
              "KICK",
              "BAN",
              "UNBAN",
              "TIMEOUT",
              "REMOVE_TIMEOUT",
              "VOICE_MUTE",
              "DELETE_MESSAGE"
            ]
          },
          "userId": {
            "type": "string",
            "description": "Target user id"
          },
          "moderatorId": {
            "type": [
              "string",
              "null"
            ],
            "description": "null = automatic (e.g. an expired ban)"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "TIMEOUT: minutes; BAN: until expiry; else null"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "type",
          "userId",
          "moderatorId",
          "reason",
          "durationMinutes",
          "expiresAt",
          "createdAt"
        ]
      },
      "ModerationActionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModerationAction"
            },
            "description": "Newest first"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "VoiceStates": {
        "type": "object",
        "properties": {
          "afkRoomId": {
            "type": [
              "string",
              "null"
            ],
            "description": "AFK room while the AFK detection is on"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "roomId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "bot": {
                  "type": "boolean"
                },
                "joinedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "state": {
                  "$ref": "#/components/schemas/VoiceState"
                }
              },
              "required": [
                "roomId",
                "userId",
                "bot",
                "joinedAt",
                "state"
              ]
            },
            "description": "Everybody in a voice room the bot can see"
          }
        },
        "required": [
          "afkRoomId",
          "items"
        ]
      },
      "VoiceActivityItem": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "sessions": {
            "type": "integer",
            "description": "Sessions counted (overlapping the range; AFK-room sessions only with includeAfkRoom)"
          },
          "totalSec": {
            "type": "integer",
            "description": "Time in voice rooms within [from, to) – without the AFK room unless includeAfkRoom"
          },
          "presentSec": {
            "type": "integer",
            "description": "totalSec − deafenedSec"
          },
          "activeSec": {
            "type": "integer",
            "description": "totalSec − deafenedSec − mutedSec"
          },
          "mutedSec": {
            "type": "integer",
            "description": "Muted (self or server) but not deafened – the first mutedGraceMinutes of each muted interval do not count"
          },
          "deafenedSec": {
            "type": "integer"
          },
          "afkRoomSec": {
            "type": "integer",
            "description": "Time in the AFK room (always reported separately)"
          },
          "firstJoinedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Join time of the earliest counted session (may be before `from`)",
            "format": "date-time"
          },
          "lastLeftAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Leave time of the latest counted session; null while one is still open",
            "format": "date-time"
          },
          "rooms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "roomId": {
                  "type": "string"
                },
                "totalSec": {
                  "type": "integer"
                }
              },
              "required": [
                "roomId",
                "totalSec"
              ]
            },
            "description": "Per room, longest first"
          }
        },
        "required": [
          "userId",
          "sessions",
          "totalSec",
          "presentSec",
          "activeSec",
          "mutedSec",
          "deafenedSec",
          "afkRoomSec",
          "firstJoinedAt",
          "lastLeftAt",
          "rooms"
        ]
      },
      "VoiceActivity": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "afkRoomId": {
            "type": [
              "string",
              "null"
            ]
          },
          "mutedGraceMinutes": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceActivityItem"
            },
            "description": "One per person with a session in the range, ordered by userId"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page (a user id)"
          }
        },
        "required": [
          "from",
          "to",
          "afkRoomId",
          "mutedGraceMinutes",
          "items",
          "nextCursor"
        ]
      },
      "VoiceSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Voice session id"
          },
          "userId": {
            "type": "string"
          },
          "roomId": {
            "type": "string"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "leftAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "null = still connected",
            "format": "date-time"
          },
          "durationSec": {
            "type": [
              "integer",
              "null"
            ],
            "description": "null while connected"
          },
          "intervals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "MUTED",
                    "DEAFENED"
                  ]
                },
                "serverMuted": {
                  "type": "boolean",
                  "description": "MUTED by a moderator"
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "endedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "null = still open",
                  "format": "date-time"
                }
              },
              "required": [
                "kind",
                "serverMuted",
                "startedAt",
                "endedAt"
              ]
            },
            "description": "Muted / deafened intervals, oldest first"
          }
        },
        "required": [
          "id",
          "userId",
          "roomId",
          "joinedAt",
          "leftAt",
          "durationSec",
          "intervals"
        ]
      },
      "VoiceSessionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceSession"
            },
            "description": "Oldest first"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page (a session id)"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "MemberStats": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "description": "First day (YYYY-MM-DD, UTC)",
            "format": "date"
          },
          "to": {
            "type": "string",
            "description": "Last day (YYYY-MM-DD, UTC)",
            "format": "date"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "YYYY-MM-DD (UTC)",
                  "format": "date"
                },
                "members": {
                  "type": "integer",
                  "description": "Active members (no guests, no bots) at the snapshot"
                },
                "guests": {
                  "type": "integer",
                  "description": "Active guests at the snapshot"
                },
                "joined": {
                  "type": "integer",
                  "description": "Joins (incl. re-joins) on that day"
                },
                "left": {
                  "type": "integer",
                  "description": "Leaves, kicks and bans on that day"
                }
              },
              "required": [
                "day",
                "members",
                "guests",
                "joined",
                "left"
              ]
            },
            "description": "Only days with a snapshot (daily at 00:15 UTC from the deploy on – no backfill)"
          }
        },
        "required": [
          "from",
          "to",
          "days"
        ]
      }
    }
  }
}
