{
  "openapi": "3.1.0",
  "info": {
    "title": "API do NextChat",
    "version": "1.1.0",
    "description": "Conversas, mensagens, contatos, atendimentos, equipe, relatórios, webhooks e Kanban com uma única chave `nck_…`, com permissões por escopo."
  },
  "servers": [
    {
      "url": "https://app.nextchat.nextsistem.dev.br/api/integrations/v1",
      "description": "Substitua pela URL da sua instalação, incluindo eventual subcaminho."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "getIntegration",
        "summary": "Identificar a integração",
        "description": "Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Chave"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": ""
      }
    },
    "/channels": {
      "get": {
        "summary": "Listar números de WhatsApp",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "conversations:read"
      }
    },
    "/conversations": {
      "get": {
        "summary": "Listar conversas",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Nome, telefone ou trecho da última mensagem.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "archived",
            "in": "query",
            "description": "true ou false.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "true = só não lidas.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "direct ou group.",
            "schema": {
              "type": "string",
              "enum": [
                "direct",
                "group"
              ]
            }
          },
          {
            "name": "channel",
            "in": "query",
            "description": "UUID do número.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee",
            "in": "query",
            "description": "none, me ou UUID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "description": "UUID do setor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "UUID da etiqueta.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Itens por página.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Quantos pular.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-required-scope": "conversations:read"
      },
      "post": {
        "summary": "Abrir conversa com um telefone ou contato",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "x-required-scope": "conversations:write"
      }
    },
    "/conversations/{id}": {
      "get": {
        "summary": "Detalhar conversa",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "conversations:read"
      },
      "patch": {
        "summary": "Alterar conversa (arquivar, fixar, silenciar, nome, etiquetas)",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "archived": {
                    "type": "boolean"
                  },
                  "pinned": {
                    "type": "boolean"
                  },
                  "muted": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string"
                  },
                  "label_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": []
              }
            }
          }
        },
        "x-required-scope": "conversations:write"
      }
    },
    "/conversations/{id}/read": {
      "post": {
        "summary": "Marcar como lida",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "conversations:write"
      }
    },
    "/conversations/{id}/transfer": {
      "post": {
        "summary": "Transferir para pessoa e/ou setor",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sector_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": []
              }
            }
          }
        },
        "x-required-scope": "conversations:write"
      }
    },
    "/conversations/{id}/sector": {
      "put": {
        "summary": "Definir o setor",
        "tags": [
          "Conversas"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sector_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": []
              }
            }
          }
        },
        "x-required-scope": "conversations:write"
      }
    },
    "/conversations/{id}/messages": {
      "get": {
        "summary": "Ler mensagens",
        "tags": [
          "Mensagens"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Itens (1 a 100).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Cursor para mensagens mais antigas.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor para mensagens mais novas.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-required-scope": "messages:read"
      },
      "post": {
        "summary": "Enviar mensagem (idempotente por client_id)",
        "tags": [
          "Mensagens"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID escolhido por você; repetir não reenvia."
                  },
                  "text": {
                    "type": "string"
                  },
                  "media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reply_to_external_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "client_id"
                ]
              }
            }
          }
        },
        "x-required-scope": "messages:send"
      }
    },
    "/messages/{id}": {
      "get": {
        "summary": "Uma mensagem",
        "tags": [
          "Mensagens"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "messages:read"
      }
    },
    "/media": {
      "post": {
        "summary": "Enviar arquivo (multipart/form-data, campo file)",
        "tags": [
          "Mensagens"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-required-scope": "media:write"
      }
    },
    "/media/{id}/url": {
      "get": {
        "summary": "Link temporário da mídia",
        "tags": [
          "Mensagens"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "messages:read"
      }
    },
    "/contacts": {
      "get": {
        "summary": "Listar contatos",
        "tags": [
          "Contatos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Nome ou telefone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "UUID da etiqueta.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "description": "UUID do número.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Itens.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Quantos pular.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-required-scope": "contacts:read"
      },
      "post": {
        "summary": "Criar contato",
        "tags": [
          "Contatos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "company": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "channel_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "name",
                  "phone"
                ]
              }
            }
          }
        },
        "x-required-scope": "contacts:write"
      }
    },
    "/contacts/{id}": {
      "get": {
        "summary": "Detalhar contato",
        "tags": [
          "Contatos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "contacts:read"
      },
      "patch": {
        "summary": "Editar contato",
        "tags": [
          "Contatos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "company": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "label_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "blocked": {
                    "type": "boolean"
                  }
                },
                "required": []
              }
            }
          }
        },
        "x-required-scope": "contacts:write"
      }
    },
    "/labels": {
      "get": {
        "summary": "Listar etiquetas",
        "tags": [
          "Contatos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "contacts:read"
      }
    },
    "/attendances": {
      "get": {
        "summary": "Listar atendimentos (protocolos)",
        "tags": [
          "Atendimentos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "open ou closed.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "closed"
              ]
            }
          },
          {
            "name": "assignee",
            "in": "query",
            "description": "UUID ou none.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "description": "UUID do setor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "query",
            "description": "UUID da conversa.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "protocol",
            "in": "query",
            "description": "Número do protocolo, com ou sem NC-.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Abertos a partir de (RFC 3339 ou AAAA-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Abertos antes de.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Itens por página (1 a 100).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "next_cursor da página anterior.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-required-scope": "attendances:read"
      }
    },
    "/attendances/{id}": {
      "get": {
        "summary": "Detalhar atendimento",
        "tags": [
          "Atendimentos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "attendances:read"
      }
    },
    "/conversations/{id}/attendance": {
      "get": {
        "summary": "Atendimento atual da conversa",
        "tags": [
          "Atendimentos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "attendances:read"
      }
    },
    "/conversations/{id}/assignments": {
      "get": {
        "summary": "Histórico de responsáveis",
        "tags": [
          "Atendimentos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "attendances:read"
      }
    },
    "/conversations/{id}/attendance/close": {
      "post": {
        "summary": "Finalizar atendimento",
        "tags": [
          "Atendimentos"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                },
                "required": []
              }
            }
          }
        },
        "x-required-scope": "attendances:write"
      }
    },
    "/team": {
      "get": {
        "summary": "Equipe",
        "tags": [
          "Equipe"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "team:read"
      }
    },
    "/sectors": {
      "get": {
        "summary": "Setores",
        "tags": [
          "Equipe"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "team:read"
      }
    },
    "/company/attendance": {
      "get": {
        "summary": "Regras de atendimento da empresa",
        "tags": [
          "Equipe"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "team:read"
      }
    },
    "/reports/attendance": {
      "get": {
        "summary": "Relatório do gestor",
        "tags": [
          "Relatórios"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Início (AAAA-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Fim (AAAA-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "description": "UUID do setor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user",
            "in": "query",
            "description": "UUID da pessoa.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/integrations/webhooks": {
      "get": {
        "summary": "Listar webhooks",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "webhooks:manage"
      },
      "post": {
        "summary": "Cadastrar webhook (devolve o segredo uma vez)",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "message.received",
                        "message.sent",
                        "conversation.updated",
                        "attendance.opened",
                        "attendance.closed"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "url",
                  "events"
                ]
              }
            }
          }
        },
        "x-required-scope": "webhooks:manage"
      }
    },
    "/integrations/webhooks/events": {
      "get": {
        "summary": "Eventos disponíveis",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "x-required-scope": "webhooks:manage"
      }
    },
    "/integrations/webhooks/{id}": {
      "patch": {
        "summary": "Editar ou reativar webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "message.received",
                        "message.sent",
                        "conversation.updated",
                        "attendance.opened",
                        "attendance.closed"
                      ]
                    }
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": []
              }
            }
          }
        },
        "x-required-scope": "webhooks:manage"
      },
      "delete": {
        "summary": "Apagar webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/integrations/webhooks/{id}/rotate-secret": {
      "post": {
        "summary": "Redefinir o segredo de assinatura",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/integrations/webhooks/{id}/test": {
      "post": {
        "summary": "Enviar evento de teste",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/integrations/webhooks/{id}/deliveries": {
      "get": {
        "summary": "Últimas entregas",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada."
          },
          "403": {
            "description": "A chave não tem a permissão (escopo) exigida."
          },
          "429": {
            "description": "Limite de uso atingido; veja Retry-After."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identificador (UUID)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/kanban/boards": {
      "get": {
        "operationId": "listBoards",
        "summary": "Listar quadros",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Board"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "read"
      }
    },
    "/kanban/boards/{id}": {
      "get": {
        "operationId": "getBoard",
        "summary": "Consultar quadro",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Board"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "read"
      }
    },
    "/kanban/cards": {
      "get": {
        "operationId": "listCards",
        "summary": "Buscar cartões",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "board_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "urgent"
              ]
            }
          },
          {
            "name": "label",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "due",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "today",
                "week",
                "overdue",
                "none"
              ]
            }
          },
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "America/Sao_Paulo"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "open",
                "closed"
              ]
            }
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "updated",
                "created",
                "due"
              ],
              "default": "updated"
            }
          },
          {
            "name": "stage_id",
            "in": "query",
            "description": "Só cartões desta etapa.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee",
            "in": "query",
            "description": "UUID, none ou me.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Alterados a partir de (RFC 3339).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "view",
            "in": "query",
            "description": "compact corta a descrição em 200 caracteres e tira checklist e campos.",
            "schema": {
              "type": "string",
              "enum": [
                "compact"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardPage"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "read"
      }
    },
    "/kanban/cards/{id}": {
      "get": {
        "operationId": "getCard",
        "summary": "Consultar cartão e checklist",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "read"
      },
      "patch": {
        "operationId": "updateCard",
        "summary": "Editar cartão",
        "description": "Permissão: update. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Ex.: \"v1\". Obrigatório se o JSON não tiver version."
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCard"
              }
            }
          }
        },
        "x-required-scope": "update"
      }
    },
    "/kanban/boards/{id}/cards": {
      "post": {
        "operationId": "createCard",
        "summary": "Criar cartão",
        "description": "Permissão: create. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "description": "Única por operação; repetir com mesmo corpo por até 7 dias. Reservas pendentes retornam 409 e nunca reexecutam."
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCard"
              }
            }
          }
        },
        "x-required-scope": "create"
      }
    },
    "/kanban/cards/{id}/move": {
      "post": {
        "operationId": "moveCard",
        "summary": "Mover cartão",
        "description": "Permissão: move. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "description": "Única por operação; repetir com mesmo corpo por até 7 dias. Reservas pendentes retornam 409 e nunca reexecutam."
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Ex.: \"v1\". Obrigatório se o JSON não tiver version."
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveCard"
              }
            }
          }
        },
        "x-required-scope": "move"
      }
    },
    "/kanban/cards/{id}/comments": {
      "post": {
        "operationId": "addComment",
        "summary": "Adicionar comentário",
        "description": "Permissão: comments:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "description": "Única por operação; repetir com mesmo corpo por até 7 dias. Reservas pendentes retornam 409 e nunca reexecutam."
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddComment"
              }
            }
          }
        },
        "x-required-scope": "comments:write"
      },
      "get": {
        "operationId": "listComments",
        "summary": "Ler comentários do cartão",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CommentEntry"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Só a partir deste instante (RFC 3339).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "id do último comentário lido.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Até 100.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/kanban/cards/{id}/checklist": {
      "post": {
        "operationId": "addChecklist",
        "summary": "Adicionar checklist",
        "description": "Permissão: checklist:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "description": "Única por operação; repetir com mesmo corpo por até 7 dias. Reservas pendentes retornam 409 e nunca reexecutam."
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChecklistItem"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddChecklist"
              }
            }
          }
        },
        "x-required-scope": "checklist:write"
      }
    },
    "/kanban/checklist/{id}": {
      "patch": {
        "operationId": "updateChecklist",
        "summary": "Editar checklist",
        "description": "Permissão: checklist:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "tags": [
          "Kanban"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Versão do cartão quando aplicável."
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "boolean"
                },
                "description": "true em repetição de POST concluído."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChecklistItem"
                }
              }
            }
          },
          "400": {
            "description": "Requisição inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida, expirada ou revogada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Permissão insuficiente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito de versão, idempotência ou regra",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Corpo maior que 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "Versão obrigatória",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos até repetir."
              }
            }
          },
          "503": {
            "description": "Falha temporária ou resultado incerto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChecklist"
              }
            }
          }
        },
        "x-required-scope": "checklist:write"
      },
      "delete": {
        "operationId": "deleteChecklistItem",
        "summary": "Apagar item da checklist",
        "description": "Permissão: checklist:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "checklist:write",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/kanban/labels": {
      "get": {
        "operationId": "listLabels",
        "summary": "Listar etiquetas",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        }
      }
    },
    "/kanban/boards/{id}/members": {
      "get": {
        "operationId": "listBoardMembers",
        "summary": "Quem pode ser responsável no quadro",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/kanban/boards/{id}/fields": {
      "get": {
        "operationId": "listBoardFields",
        "summary": "Campos personalizados do quadro",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "options": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/kanban/boards/{id}/templates": {
      "get": {
        "operationId": "listBoardTemplates",
        "summary": "Modelos de cartão do quadro",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/kanban/events": {
      "get": {
        "operationId": "listChanges",
        "summary": "Feed de mudanças dos cartões",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChangeEvent"
                      }
                    },
                    "next_cursor": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "\"latest\" para começar de agora; depois, o next_cursor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Sem cursor: a partir deste instante (padrão: última hora).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "board_id",
            "in": "query",
            "description": "Restringe a um quadro.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Até 200.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/kanban/cards/{id}/comments/{commentId}": {
      "patch": {
        "operationId": "editComment",
        "summary": "Editar comentário da própria chave",
        "description": "Permissão: comments:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "comments:write",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 10000
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteComment",
        "summary": "Apagar comentário da própria chave",
        "description": "Permissão: comments:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "comments:write",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ]
      }
    },
    "/kanban/cards/{id}/activity": {
      "get": {
        "operationId": "cardActivity",
        "summary": "Histórico do cartão (criou, editou, moveu)",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/kanban/cards/{id}/archive": {
      "post": {
        "operationId": "archiveCard",
        "summary": "Arquivar cartão (sem exigir versão)",
        "description": "Permissão: update. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "update",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ]
      }
    },
    "/kanban/cards/{id}/restore": {
      "post": {
        "operationId": "restoreCard",
        "summary": "Restaurar cartão arquivado",
        "description": "Permissão: update. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "update",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ]
      }
    },
    "/kanban/cards/{id}/attachments": {
      "post": {
        "operationId": "attachFiles",
        "summary": "Anexar arquivos (multipart, campo file, até 10)",
        "description": "Permissão: attachments:write. Somente quadros permitidos; cartões privados e de canais privados são excluídos. Corpo multipart/form-data com o campo file (até 10 arquivos).",
        "x-required-scope": "attachments:write",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Attachment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "get": {
        "operationId": "listAttachments",
        "summary": "Listar anexos do cartão (link assinado de 5 minutos)",
        "description": "Permissão: read. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "read",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Attachment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        }
      }
    },
    "/kanban/cards/{id}/attachments/{attachmentId}": {
      "delete": {
        "operationId": "removeAttachment",
        "summary": "Remover anexo",
        "description": "Permissão: attachments:delete. Somente quadros permitidos; cartões privados e de canais privados são excluídos.",
        "x-required-scope": "attachments:delete",
        "tags": [
          "Kanban"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "Sucesso"
          },
          "401": {
            "description": "Chave inválida"
          },
          "403": {
            "description": "Sem a permissão"
          },
          "404": {
            "description": "Não encontrado"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Chave de integração `nck_…` no cabeçalho Authorization (Bearer). Criada em Configurações › Integrações."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "Label": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      },
      "ChecklistItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "text": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          },
          "position": {
            "type": "number"
          },
          "done_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Stage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "board_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "open",
              "won",
              "lost"
            ]
          },
          "card_count": {
            "type": "integer"
          },
          "overdue_count": {
            "type": "integer"
          }
        }
      },
      "Board": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "archived": {
            "type": "boolean"
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stage"
            }
          },
          "card_count": {
            "type": "integer"
          },
          "overdue_count": {
            "type": "integer"
          }
        }
      },
      "Card": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "board_id": {
            "type": "string",
            "format": "uuid"
          },
          "board_name": {
            "type": "string"
          },
          "stage_id": {
            "type": "string",
            "format": "uuid"
          },
          "stage_name": {
            "type": "string"
          },
          "stage_kind": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Label"
            }
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "archived": {
            "type": "boolean"
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checklist_total": {
            "type": "integer"
          },
          "checklist_done": {
            "type": "integer"
          },
          "checklist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChecklistItem"
            }
          },
          "assignee_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assignee_name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Link do cartão no app."
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_by_name": {
            "type": "string"
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "updated_by_name": {
            "type": "string",
            "description": "Quem fez a última alteração; \"API · nome\" quando foi uma chave."
          },
          "attachment_count": {
            "type": "integer"
          },
          "attachments": {
            "type": "array",
            "description": "Só no GET de um cartão e na criação.",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "custom_values": {
            "type": "object",
            "additionalProperties": true,
            "description": "Campos personalizados: id do campo → valor."
          }
        }
      },
      "CardPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      },
      "Identity": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "board_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Comment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateCard": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "description": {
            "type": "string",
            "x-max-bytes": 10000,
            "description": "Máximo de 10.000 bytes em UTF-8."
          },
          "stage_id": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "label_ids": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "checklist": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "assignee_id": {
            "type": "string",
            "format": "uuid"
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "custom_values": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "title"
        ]
      },
      "UpdateCard": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "description": {
            "type": "string",
            "x-max-bytes": 10000,
            "description": "Máximo de 10.000 bytes em UTF-8."
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "label_ids": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "assignee_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "custom_values": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "MoveCard": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "stage_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "before_id": {
            "type": "string",
            "format": "uuid"
          },
          "after_id": {
            "type": "string",
            "format": "uuid"
          },
          "place": {
            "type": "string",
            "enum": [
              "start",
              "end"
            ]
          }
        },
        "required": [
          "stage_id"
        ]
      },
      "AddComment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "notify": {
            "type": "boolean",
            "description": "Avisa no NextChat quem criou o cartão e o responsável."
          },
          "mentions": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "text"
        ]
      },
      "AddChecklist": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "description": "Vários itens de uma vez, no lugar de text."
          }
        },
        "required": []
      },
      "UpdateChecklist": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "done": {
            "type": "boolean"
          },
          "position": {
            "type": "integer",
            "description": "Nova posição na lista."
          }
        }
      },
      "Attachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "file_name": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "added_at": {
            "type": "string",
            "format": "date-time"
          },
          "added_by_name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Link assinado e temporário (5 minutos) para baixar."
          }
        }
      },
      "CommentEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "text": {
            "type": "string"
          },
          "author": {
            "type": "object",
            "description": "Pessoa {id,name} ou, para chave, {id:null,name:\"API · …\",integration_id}."
          },
          "origin": {
            "type": "string",
            "enum": [
              "user",
              "integration"
            ]
          },
          "own": {
            "type": "boolean",
            "description": "Escrito por esta mesma chave."
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "edited_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ChangeEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "type": "string",
            "description": "card_created, card_moved, comment_added, card_archived, card_restored, attachment_added, attachment_removed ou o tipo interno."
          },
          "card_id": {
            "type": "string",
            "format": "uuid"
          },
          "board_id": {
            "type": "string",
            "format": "uuid"
          },
          "stage_id": {
            "type": "string",
            "format": "uuid"
          },
          "from_stage_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "to_stage_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "actor_name": {
            "type": "string"
          },
          "origin": {
            "type": "string",
            "enum": [
              "user",
              "integration"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "x-scopes": [
    {
      "id": "conversations:read",
      "description": "Listar e abrir conversas e ver os números de WhatsApp."
    },
    {
      "id": "conversations:write",
      "description": "Iniciar conversa, transferir, trocar o setor, arquivar e marcar como lida."
    },
    {
      "id": "messages:read",
      "description": "Ler as mensagens de uma conversa e o link dos arquivos."
    },
    {
      "id": "messages:send",
      "description": "Enviar mensagem de texto ou com anexo pelo WhatsApp."
    },
    {
      "id": "media:write",
      "description": "Enviar um arquivo para anexar à mensagem."
    },
    {
      "id": "contacts:read",
      "description": "Consultar contatos e etiquetas."
    },
    {
      "id": "contacts:write",
      "description": "Criar e editar contatos e as etiquetas deles."
    },
    {
      "id": "attendances:read",
      "description": "Atendimentos (protocolos), atendimento da conversa e histórico de responsáveis."
    },
    {
      "id": "attendances:write",
      "description": "Finalizar o atendimento de uma conversa."
    },
    {
      "id": "team:read",
      "description": "Equipe, setores e regras de atendimento."
    },
    {
      "id": "reports:read",
      "description": "Relatório de atendimento do gestor."
    },
    {
      "id": "webhooks:manage",
      "description": "Cadastrar, testar, redefinir o segredo e apagar webhooks."
    },
    {
      "id": "read",
      "description": "Consultar quadros, etapas e cartões."
    },
    {
      "id": "create",
      "description": "Criar cartões nos quadros selecionados."
    },
    {
      "id": "update",
      "description": "Editar título, descrição, prioridade, prazo e etiquetas."
    },
    {
      "id": "move",
      "description": "Mover cartões entre etapas do mesmo quadro."
    },
    {
      "id": "comments:write",
      "description": "Adicionar comentários ao cartão."
    },
    {
      "id": "checklist:write",
      "description": "Adicionar itens e atualizar seu texto ou conclusão."
    },
    {
      "id": "attachments:write",
      "description": "Anexar arquivos e textos aos cartões (até 10 por chamada)."
    },
    {
      "id": "attachments:delete",
      "description": "Remover anexos de um cartão."
    }
  ]
}
