{
  "openapi": "3.0.3",
  "info": {
    "title": "TomTicket API",
    "version": "2.0",
    "description": "Referência da API V2.0. Em **Authorize**, informe o token padrão da API TomTicket, sem o prefixo Bearer."
  },
  "servers": [
    {
      "url": "/",
      "description": "Servidor da API"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Chat"
    },
    {
      "name": "Campos personalizados"
    },
    {
      "name": "Clientes"
    },
    {
      "name": "Departamentos"
    },
    {
      "name": "Base de conhecimento"
    },
    {
      "name": "Organizações"
    },
    {
      "name": "Carteiras"
    },
    {
      "name": "Chamados"
    }
  ],
  "paths": {
    "/v2.0/chat/detail": {
      "get": {
        "tags": ["Chat"],
        "summary": "Consultar um atendimento de chat",
        "operationId": "chat_detail",
        "parameters": [
          {
            "name": "chat_id",
            "in": "query",
            "description": "Identificador do atendimento de chat.",
            "required": true,
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/chat/list": {
      "get": {
        "tags": ["Chat"],
        "summary": "Listar atendimentos de chat",
        "operationId": "chat_list",
        "parameters": [
          {"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1, "default": 1}},
          {
            "name": "customer_type_id",
            "in": "query",
            "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
            "schema": {"type": "string", "enum": ["I", "E"], "default": "I"}
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Identificador do cliente.",
            "schema": {"type": "string"}
          },
          {
            "name": "department_id",
            "in": "query",
            "description": "Identificador do departamento.",
            "schema": {"type": "string"}
          },
          {
            "name": "organization_id",
            "in": "query",
            "description": "Identificador da organização.",
            "schema": {"type": "string"}
          },
          {"name": "min_protocol", "in": "query", "schema": {"type": "integer"}},
          {"name": "max_protocol", "in": "query", "schema": {"type": "integer"}},
          {
            "name": "creation_date_le",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "creation_date_ge",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/option/add": {
      "post": {
        "tags": ["Campos personalizados"],
        "summary": "Adicionar uma opção a um campo personalizado",
        "operationId": "custom_field_option_add",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["custom_field_id", "value"],
                "properties": {
                  "custom_field_id": {"description": "Identificador do campo personalizado.", "type": "string"},
                  "value": {"description": "Valor da opção.", "type": "string"},
                  "sort": {"description": "Use 1 para ordenar as opções.", "type": "integer", "enum": [0, 1]}
                }
              },
              "example": {"custom_field_id": "identificador-do-campo", "value": "Opção de exemplo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/option/remove": {
      "post": {
        "tags": ["Campos personalizados"],
        "summary": "Remover uma opção de um campo personalizado",
        "operationId": "custom_field_option_remove",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["custom_field_id", "value"],
                "properties": {
                  "custom_field_id": {"description": "Identificador do campo personalizado.", "type": "string"},
                  "value": {"description": "Valor da opção.", "type": "string"}
                }
              },
              "example": {"custom_field_id": "identificador-do-campo", "value": "Opção de exemplo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/general/list": {
      "get": {
        "tags": ["Campos personalizados"],
        "summary": "Listar os campos personalizados da conta",
        "operationId": "custom_field_general_list",
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/customer/list": {
      "get": {
        "tags": ["Campos personalizados"],
        "summary": "Listar os campos personalizados de clientes",
        "operationId": "custom_field_customer_list",
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/organization/list": {
      "get": {
        "tags": ["Campos personalizados"],
        "summary": "Listar os campos personalizados de organizações",
        "operationId": "custom_field_organization_list",
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/ticket/list": {
      "get": {
        "tags": ["Campos personalizados"],
        "summary": "Listar os campos personalizados de chamados",
        "operationId": "custom_field_ticket_list",
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/custom_field/department/list": {
      "get": {
        "tags": ["Campos personalizados"],
        "summary": "Listar os campos personalizados de um departamento",
        "operationId": "custom_field_department_list",
        "parameters": [
          {
            "name": "department_id",
            "in": "query",
            "description": "Identificador do departamento.",
            "required": true,
            "schema": {"type": "string"}
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Identificador da categoria.",
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/access/new": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Gerar um link de acesso para um cliente",
        "operationId": "customer_access_new",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "customer_type_id": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  }
                }
              },
              "example": {"customer_id": "cliente-exemplo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "access_token": {"type": "string"},
                    "url": {"type": "string", "format": "uri"}
                  }
                }
              }
            }
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/new": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Cadastrar um cliente",
        "operationId": "customer_new",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id", "name"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "name": {"description": "Nome.", "type": "string"},
                  "email": {"description": "Endereço de e-mail.", "type": "string", "format": "email"},
                  "create_tickets": {"type": "integer", "enum": [0, 1]},
                  "phone": {"type": "string"},
                  "language": {"description": "Código do idioma do cliente.", "type": "string"},
                  "organization_id": {"description": "Identificador da organização.", "type": "string"},
                  "portfolio_id": {"description": "Identificador da carteira.", "type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"},
                  "password": {"type": "string", "format": "password"}
                }
              },
              "example": {"customer_id": "cliente-exemplo", "name": "Nome de exemplo"},
              "encoding": {"custom_field": {"style": "deepObject", "explode": true}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/update": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Atualizar um cliente",
        "operationId": "customer_update",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "customer_type_id": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  },
                  "name": {"description": "Nome.", "type": "string"},
                  "email": {
                    "description": "Endereço de e-mail. Use uma string vazia para remover o endereço.",
                    "anyOf": [{"type": "string", "format": "email"}, {"type": "string", "enum": [""]}]
                  },
                  "phone": {"type": "string"},
                  "language": {"description": "Código do idioma do cliente.", "type": "string"},
                  "internal_id": {"description": "Novo identificador do cliente.", "type": "string"},
                  "organization_id": {"description": "Identificador da organização.", "type": "string"},
                  "portfolio_id": {"description": "Identificador da carteira.", "type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"},
                  "password": {"type": "string", "format": "password"}
                }
              },
              "example": {"customer_id": "cliente-exemplo"},
              "encoding": {"custom_field": {"style": "deepObject", "explode": true}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/permissions/create_ticket": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Alterar a permissão de abertura de chamados de um cliente",
        "operationId": "customer_permissions_create_ticket",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id", "configuration"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "customer_type_id": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  },
                  "configuration": {
                    "description": "Use 0 para permitir a abertura de chamados e 1 para bloquear.",
                    "type": "integer",
                    "enum": [0, 1]
                  }
                }
              },
              "example": {"customer_id": "cliente-exemplo", "configuration": 1}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/permissions/access": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Alterar a permissão de acesso de um cliente",
        "operationId": "customer_permissions_access",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id", "configuration"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "customer_type_id": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  },
                  "configuration": {"description": "Use 0 para desativar o acesso e 1 para ativá-lo.", "type": "integer", "enum": [0, 1]}
                }
              },
              "example": {"customer_id": "cliente-exemplo", "configuration": 1}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/department/link": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Vincular um cliente a um departamento",
        "operationId": "customer_department_link",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id", "department_id"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "customer_type_id": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  },
                  "department_id": {"description": "Identificador do departamento.", "type": "string"}
                }
              },
              "example": {"customer_id": "cliente-exemplo", "department_id": "identificador-do-departamento"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/department/unlink": {
      "post": {
        "tags": ["Clientes"],
        "summary": "Desvincular um cliente de um departamento",
        "operationId": "customer_department_unlink",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id", "department_id"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "customer_type_id": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  },
                  "department_id": {"description": "Identificador do departamento.", "type": "string"}
                }
              },
              "example": {"customer_id": "cliente-exemplo", "department_id": "identificador-do-departamento"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/hourcontract": {
      "get": {
        "tags": ["Clientes"],
        "summary": "Consultar o contrato de horas de um cliente",
        "operationId": "customer_hourcontract",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "description": "Identificador do cliente.",
            "required": true,
            "schema": {"type": "string"}
          },
          {
            "name": "customer_type_id",
            "in": "query",
            "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
            "schema": {"type": "string", "enum": ["I", "E"], "default": "I"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/list": {
      "get": {
        "tags": ["Clientes"],
        "summary": "Listar clientes",
        "operationId": "customer_list",
        "parameters": [
          {"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1, "default": 1}},
          {
            "name": "order",
            "in": "query",
            "description": "Direção da ordenação.",
            "schema": {"type": "string", "enum": ["ASC", "DESC"], "default": "ASC"}
          },
          {
            "name": "column",
            "in": "query",
            "description": "Campo usado na ordenação.",
            "schema": {"type": "string", "default": "name"}
          },
          {
            "name": "show_custom_fields",
            "in": "query",
            "description": "Use 1 para incluir campos personalizados na listagem.",
            "schema": {"type": "integer", "enum": [0, 1]}
          },
          {
            "name": "search_by_organization_mother",
            "in": "query",
            "description": "Use 1 para pesquisar pela organização matriz.",
            "schema": {"type": "integer", "enum": [0, 1]}
          },
          {
            "name": "organization_id",
            "in": "query",
            "description": "Identificador da organização.",
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/exists": {
      "get": {
        "tags": ["Clientes"],
        "summary": "Verificar se um cliente existe",
        "operationId": "customer_exists",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "description": "Identificador do cliente.",
            "required": true,
            "schema": {"type": "string"}
          },
          {
            "name": "customer_type_id",
            "in": "query",
            "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
            "schema": {"type": "string", "enum": ["I", "E"], "default": "I"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "exists": {"type": "boolean"}
                  }
                }
              }
            }
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/permissions/basic": {
      "get": {
        "tags": ["Clientes"],
        "summary": "Consultar as permissões básicas de um cliente",
        "operationId": "customer_permissions_basic",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "description": "Identificador do cliente.",
            "required": true,
            "schema": {"type": "string"}
          },
          {
            "name": "customer_type_id",
            "in": "query",
            "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
            "schema": {"type": "string", "enum": ["I", "E"], "default": "I"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "exists": {"type": "boolean"}
                  }
                }
              }
            }
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/blacklist/search": {
      "get": {
        "tags": ["Clientes"],
        "summary": "Consultar um e-mail na lista de bloqueio",
        "operationId": "customer_blacklist_search",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "Endereço de e-mail.",
            "required": true,
            "schema": {"type": "string", "format": "email"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "exists": {"type": "boolean"}
                  }
                }
              }
            }
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/customer/details": {
      "get": {
        "tags": ["Clientes"],
        "summary": "Consultar os detalhes de um cliente",
        "operationId": "customer_details",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "description": "Identificador do cliente.",
            "required": true,
            "schema": {"type": "string"}
          },
          {
            "name": "customer_type_id",
            "in": "query",
            "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
            "schema": {"type": "string", "enum": ["I", "E"], "default": "I"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "data": {"type": "object"}
                  }
                }
              }
            }
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/department/list": {
      "get": {
        "tags": ["Departamentos"],
        "summary": "Listar departamentos",
        "operationId": "department_list",
        "parameters": [
          {
            "name": "show_nested_items",
            "in": "query",
            "description": "Use 0 para retornar apenas os dados básicos dos departamentos.",
            "schema": {"type": "integer", "enum": [0, 1]}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/department/status/list": {
      "get": {
        "tags": ["Departamentos"],
        "summary": "Listar os status de um departamento",
        "operationId": "department_status_list",
        "parameters": [
          {
            "name": "department_id",
            "in": "query",
            "description": "Identificador do departamento.",
            "required": true,
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/department/operator/list": {
      "get": {
        "tags": ["Departamentos"],
        "summary": "Listar os atendentes de um departamento",
        "operationId": "department_operator_list",
        "parameters": [
          {
            "name": "department_id",
            "in": "query",
            "description": "Identificador do departamento.",
            "required": true,
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/department/category/list": {
      "get": {
        "tags": ["Departamentos"],
        "summary": "Listar as categorias de um departamento",
        "operationId": "department_category_list",
        "parameters": [
          {
            "name": "department_id",
            "in": "query",
            "description": "Identificador do departamento.",
            "required": true,
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/kb/search": {
      "get": {
        "tags": ["Base de conhecimento"],
        "summary": "Buscar artigos na base de conhecimento",
        "operationId": "kb_search",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "Termo de busca.",
            "required": true,
            "schema": {"type": "string", "minLength": 3}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/kb/category/list": {
      "get": {
        "tags": ["Base de conhecimento"],
        "summary": "Listar categorias da base de conhecimento",
        "operationId": "kb_category_list",
        "parameters": [
          {"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1, "default": 1}}
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/kb/article/list": {
      "get": {
        "tags": ["Base de conhecimento"],
        "summary": "Listar artigos da base de conhecimento",
        "operationId": "kb_article_list",
        "parameters": [
          {
            "name": "category_id",
            "in": "query",
            "description": "Identificador da categoria.",
            "schema": {"type": "string"}
          },
          {"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1, "default": 1}}
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/kb/article/read": {
      "get": {
        "tags": ["Base de conhecimento"],
        "summary": "Consultar um artigo da base de conhecimento",
        "operationId": "kb_article_read",
        "parameters": [
          {
            "name": "article_id",
            "in": "query",
            "description": "Identificador do artigo.",
            "required": true,
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/kb/article/new": {
      "post": {
        "tags": ["Base de conhecimento"],
        "summary": "Criar um artigo na base de conhecimento",
        "operationId": "kb_article_new",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["title", "content", "visibility", "category_id"],
                "properties": {
                  "title": {"type": "string"},
                  "content": {"type": "string"},
                  "visibility": {"type": "string", "enum": ["customers_and_agents", "registered_customers_and_agents", "agents"]},
                  "category_id": {"description": "Identificador da categoria.", "type": "string"},
                  "display_order": {"type": "integer"}
                }
              },
              "example": {
                "title": "Título do artigo",
                "content": "Conteúdo do artigo",
                "visibility": "agents",
                "category_id": "identificador-da-categoria"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "data": {
                      "type": "object",
                      "properties": {"article_id": {"type": "string"}, "title": {"type": "string"}}
                    }
                  }
                }
              }
            }
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/kb/article/update": {
      "post": {
        "tags": ["Base de conhecimento"],
        "summary": "Atualizar um artigo da base de conhecimento",
        "operationId": "kb_article_update",
        "description": "Informe o identificador do artigo e os campos que deseja atualizar.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["article_id"],
                "properties": {
                  "article_id": {"description": "Identificador do artigo.", "type": "string"},
                  "title": {"type": "string"},
                  "content": {"type": "string"},
                  "visibility": {"type": "string", "enum": ["customers_and_agents", "registered_customers_and_agents", "agents"]},
                  "category_id": {"description": "Identificador da categoria.", "type": "string"},
                  "display_order": {"type": "integer"},
                  "friendly_url": {"description": "Identificador amigável na URL do artigo.", "type": "string"}
                }
              },
              "example": {"article_id": "identificador-do-artigo", "title": "Título do artigo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/organization/new": {
      "post": {
        "tags": ["Organizações"],
        "summary": "Cadastrar uma organização",
        "operationId": "organization_new",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {"description": "Nome.", "type": "string"},
                  "email": {"description": "Endereço de e-mail.", "type": "string", "format": "email"},
                  "portfolio_id": {"description": "Identificador da carteira.", "type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"},
                  "create_tickets": {"type": "integer", "enum": [0, 1]},
                  "team_see_all_tickets": {"type": "integer", "enum": [0, 1]},
                  "monthly_tickets_quota": {"type": "integer"},
                  "mother_organization_id": {"description": "Identificador da organização matriz.", "type": "string"},
                  "manager_see_all_tickets": {"type": "integer", "enum": [0, 1]},
                  "strict_name": {"type": "integer", "enum": [0, 1]},
                  "strict_mail": {"type": "integer", "enum": [0, 1]},
                  "return_id_if_exists": {"type": "integer", "enum": [0, 1]},
                  "phone": {"type": "string"},
                  "site": {"type": "string"}
                }
              },
              "example": {"name": "Nome de exemplo"},
              "encoding": {"custom_field": {"style": "deepObject", "explode": true}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/organization/list": {
      "get": {
        "tags": ["Organizações"],
        "summary": "Listar organizações",
        "operationId": "organization_list",
        "parameters": [
          {"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1, "default": 1}},
          {
            "name": "order",
            "in": "query",
            "description": "Direção da ordenação.",
            "schema": {"type": "string", "enum": ["ASC", "DESC"], "default": "ASC"}
          },
          {
            "name": "column",
            "in": "query",
            "description": "Campo usado na ordenação.",
            "schema": {"type": "string", "default": "name"}
          },
          {
            "name": "show_custom_fields",
            "in": "query",
            "description": "Use 1 para incluir campos personalizados na listagem.",
            "schema": {"type": "integer", "enum": [0, 1]}
          },
          {
            "name": "organization_mother_id",
            "in": "query",
            "description": "Identificador da organização matriz.",
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/organization/update": {
      "post": {
        "tags": ["Organizações"],
        "summary": "Atualizar uma organização",
        "operationId": "organization_update",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["name", "organization_id"],
                "properties": {
                  "name": {"description": "Nome.", "type": "string"},
                  "organization_id": {"description": "Identificador da organização.", "type": "string"},
                  "email": {"description": "Endereço de e-mail.", "type": "string", "format": "email"},
                  "portfolio_id": {"description": "Identificador da carteira.", "type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"},
                  "create_tickets": {"type": "integer", "enum": [0, 1]},
                  "team_see_all_tickets": {"type": "integer", "enum": [0, 1]},
                  "monthly_tickets_quota": {"type": "integer"},
                  "mother_organization_id": {"description": "Identificador da organização matriz.", "type": "string"},
                  "manager_see_all_tickets": {"type": "integer", "enum": [0, 1]},
                  "strict_name": {"type": "integer", "enum": [0, 1]},
                  "strict_mail": {"type": "integer", "enum": [0, 1]},
                  "phone": {"type": "string"},
                  "site": {"type": "string"}
                }
              },
              "example": {"name": "Nome de exemplo", "organization_id": "identificador-da-organizacao"},
              "encoding": {"custom_field": {"style": "deepObject", "explode": true}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/portfolio/list": {
      "get": {
        "tags": ["Carteiras"],
        "summary": "Listar carteiras de clientes",
        "operationId": "portfolio_list",
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/new": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Criar um chamado",
        "operationId": "ticket_new",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["customer_id", "department_id", "subject", "message"],
                "properties": {
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "department_id": {"description": "Identificador do departamento.", "type": "string"},
                  "subject": {"type": "string"},
                  "message": {"type": "string"},
                  "category_id": {"description": "Identificador da categoria.", "type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"},
                  "customer_id_type": {
                    "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
                    "type": "string",
                    "enum": ["I", "E"],
                    "default": "I"
                  },
                  "priority": {"type": "integer", "enum": [1, 2, 3, 4], "default": 1},
                  "attachment[]": {
                    "description": "Arquivos anexos. Envie cada arquivo em uma parte attachment[].",
                    "type": "array",
                    "items": {"type": "string", "format": "binary"}
                  }
                }
              },
              "example": {
                "customer_id": "cliente-exemplo",
                "department_id": "identificador-do-departamento",
                "subject": "Assunto de exemplo",
                "message": "Mensagem de exemplo"
              },
              "encoding": {"custom_field": {"style": "deepObject", "explode": true}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/update": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Atualizar um chamado",
        "operationId": "ticket_update",
        "description": "Informe o identificador do chamado e pelo menos um dos campos a atualizar.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "customer_id": {"description": "Identificador do cliente.", "type": "string"},
                  "department_id": {"description": "Identificador do departamento.", "type": "string"},
                  "category_id": {"description": "Identificador da categoria.", "type": "string"},
                  "subject": {"type": "string"},
                  "custom_field_open": {"$ref": "#/components/schemas/CustomFields"},
                  "custom_field_close": {"$ref": "#/components/schemas/CustomFields"}
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "subject": "Assunto de exemplo"},
              "encoding": {
                "custom_field_open": {"style": "deepObject", "explode": true},
                "custom_field_close": {"style": "deepObject", "explode": true}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/reply/customer": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Adicionar uma resposta de cliente a um chamado",
        "operationId": "ticket_reply_customer",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "message"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "message": {"type": "string"},
                  "attachment[]": {
                    "description": "Arquivos anexos. Envie cada arquivo em uma parte attachment[].",
                    "type": "array",
                    "items": {"type": "string", "format": "binary"}
                  }
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "message": "Mensagem de exemplo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/reply/operator": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Adicionar uma resposta de atendente a um chamado",
        "operationId": "ticket_reply_operator",
        "description": "Informe start_date e end_date em conjunto para registrar o período de trabalho.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "message"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "message": {"type": "string"},
                  "start_date": {
                    "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
                    "type": "string",
                    "example": "2026-01-01 00:00:00-0300"
                  },
                  "end_date": {
                    "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
                    "type": "string",
                    "example": "2026-01-01 00:00:00-0300"
                  },
                  "attachment[]": {
                    "description": "Arquivos anexos. Envie cada arquivo em uma parte attachment[].",
                    "type": "array",
                    "items": {"type": "string", "format": "binary"}
                  }
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "message": "Mensagem de exemplo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/status/open": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Alterar o status de um chamado para aberto",
        "operationId": "ticket_status_open",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "status_id"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "status_id": {"description": "Identificador do status.", "type": "string"},
                  "comment": {"type": "string"}
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "status_id": "identificador-do-status"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/status/close": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Encerrar o status de um chamado",
        "operationId": "ticket_status_close",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id"],
                "properties": {"ticket_id": {"description": "Identificador do chamado.", "type": "string"}}
              },
              "example": {"ticket_id": "identificador-do-chamado"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/comment": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Adicionar um comentário a um chamado",
        "operationId": "ticket_comment",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "comment"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "comment": {"type": "string"},
                  "attachment[]": {
                    "description": "Arquivos anexos. Envie cada arquivo em uma parte attachment[].",
                    "type": "array",
                    "items": {"type": "string", "format": "binary"}
                  }
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "comment": "Comentário de exemplo"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/finish": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Finalizar um chamado",
        "operationId": "ticket_finish",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "message"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "message": {"type": "string"},
                  "time_work": {"description": "Tempo de trabalho em segundos.", "type": "integer"},
                  "startup_justification": {"type": "string"},
                  "deadline_justification": {"type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"},
                  "attachment[]": {
                    "description": "Arquivos anexos. Envie cada arquivo em uma parte attachment[].",
                    "type": "array",
                    "items": {"type": "string", "format": "binary"}
                  }
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "message": "Mensagem de exemplo"},
              "encoding": {
                "custom_field": {"style": "deepObject", "explode": true}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/operator/link": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Vincular um atendente a um chamado",
        "operationId": "ticket_operator_link",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "operator_id"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "operator_id": {"description": "Identificador do atendente.", "type": "string"}
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "operator_id": "identificador-do-atendente"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/transfer": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Transferir um chamado",
        "operationId": "ticket_transfer",
        "description": "Informe pelo menos um destino em department_id ou operator_id.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "operator_id": {"description": "Identificador do atendente.", "type": "string"},
                  "department_id": {"description": "Identificador do departamento.", "type": "string"}
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "department_id": "identificador-do-departamento"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/list": {
      "get": {
        "tags": ["Chamados"],
        "summary": "Listar chamados",
        "operationId": "ticket_list",
        "parameters": [
          {"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1, "default": 1}},
          {
            "name": "customer_type_id",
            "in": "query",
            "description": "Tipo do identificador do cliente. I para identificador interno, E para e-mail.",
            "schema": {"type": "string", "enum": ["I", "E"], "default": "I"}
          },
          {
            "name": "order",
            "in": "query",
            "description": "Direção da ordenação.",
            "schema": {"type": "string", "enum": ["ASC", "DESC"], "default": "DESC"}
          },
          {
            "name": "column",
            "in": "query",
            "description": "Campo usado na ordenação.",
            "schema": {"type": "string", "default": "protocol"}
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Identificador do cliente.",
            "schema": {"type": "string"}
          },
          {"name": "status_id", "in": "query", "description": "Identificador do status.", "schema": {"type": "string"}},
          {
            "name": "department_id",
            "in": "query",
            "description": "Identificador do departamento.",
            "schema": {"type": "string"}
          },
          {
            "name": "organization_id",
            "in": "query",
            "description": "Identificador da organização.",
            "schema": {"type": "string"}
          },
          {"name": "min_protocol", "in": "query", "schema": {"type": "integer"}},
          {"name": "max_protocol", "in": "query", "schema": {"type": "integer"}},
          {
            "name": "creation_date_le",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "creation_date_ge",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "last_situation_ge",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "last_situation_le",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "lastupdate_ge",
            "in": "query",
            "description": "Nome alternativo de last_update_ge. Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "last_update_ge",
            "in": "query",
            "description": "Data e hora no formato AAAA-MM-DD HH:MM:SS±HHMM.",
            "schema": {"type": "string", "example": "2026-01-01 00:00:00-0300"}
          },
          {
            "name": "situation",
            "in": "query",
            "description": "Identificadores de situações, separados por vírgula.",
            "schema": {"type": "string"}
          },
          {
            "name": "priority",
            "in": "query",
            "description": "Uma prioridade de 1 a 4 ou várias prioridades separadas por vírgula.",
            "schema": {
              "anyOf": [{"type": "integer", "minimum": 1, "maximum": 4}, {"type": "string", "pattern": "^[1-4](,[1-4])*$"}]
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Identificador da categoria.",
            "schema": {"type": "string"}
          },
          {
            "name": "operator_id",
            "in": "query",
            "description": "Identificador do atendente.",
            "schema": {"type": "string"}
          },
          {
            "name": "truncate_body",
            "in": "query",
            "description": "Use 1 para truncar o corpo do chamado.",
            "schema": {"type": "integer", "enum": [0, 1]}
          },
          {"name": "show_stopwatch", "in": "query", "schema": {"type": "integer", "enum": [0, 1]}},
          {"name": "show_tags", "in": "query", "schema": {"type": "integer", "enum": [0, 1]}}
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListResult"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/detail": {
      "get": {
        "tags": ["Chamados"],
        "summary": "Consultar os detalhes de um chamado",
        "operationId": "ticket_detail",
        "parameters": [
          {
            "name": "ticket_id",
            "in": "query",
            "description": "Identificador do chamado.",
            "required": true,
            "schema": {"type": "string"}
          },
          {"name": "show_stopwatch", "in": "query", "schema": {"type": "integer", "enum": [0, 1]}},
          {"name": "show_staggered_tickets", "in": "query", "schema": {"type": "integer", "enum": [0, 1]}},
          {"name": "show_tags", "in": "query", "schema": {"type": "integer", "enum": [0, 1]}}
        ],
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "error": {"type": "boolean", "example": false},
                    "message": {"type": "string"},
                    "data": {"type": "object"}
                  }
                }
              }
            }
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    },
    "/v2.0/ticket/evaluation": {
      "post": {
        "tags": ["Chamados"],
        "summary": "Registrar a avaliação de um chamado finalizado",
        "operationId": "ticket_evaluation",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["ticket_id", "problem_solved", "grade"],
                "properties": {
                  "ticket_id": {"description": "Identificador do chamado.", "type": "string"},
                  "problem_solved": {"description": "Y para problema resolvido e N para não resolvido.", "type": "string", "enum": ["Y", "N"]},
                  "grade": {"type": "integer", "minimum": 1, "maximum": 5},
                  "comment": {"type": "string"},
                  "custom_field": {"$ref": "#/components/schemas/CustomFields"}
                }
              },
              "example": {"ticket_id": "identificador-do-chamado", "problem_solved": "Y", "grade": 5},
              "encoding": {"custom_field": {"style": "deepObject", "explode": true}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da operação em JSON.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Success"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequest"},
          "401": {"$ref": "#/components/responses/Unauthorized"},
          "403": {"$ref": "#/components/responses/Forbidden"},
          "404": {"$ref": "#/components/responses/NotFound"},
          "409": {"$ref": "#/components/responses/Conflict"},
          "422": {"$ref": "#/components/responses/Unprocessable"},
          "429": {"$ref": "#/components/responses/RateLimit"},
          "500": {"$ref": "#/components/responses/ServerError"}
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Token padrão da API TomTicket."
      }
    },
    "schemas": {
      "CustomFields": {
        "type": "object",
        "description": "Valores indexados pelo identificador de cada campo. No formulário multipart, envie cada valor como nome_do_campo[identificador]. Para múltiplas opções, use texto separado por vírgulas.",
        "additionalProperties": {
          "anyOf": [
            {"type": "string", "nullable": true},
            {"type": "number"},
            {"type": "boolean"}
          ]
        },
        "example": {"identificador_do_campo": "Valor"}
      },
      "Success": {
        "type": "object",
        "properties": {
          "success": {"type": "boolean", "example": true},
          "error": {"type": "boolean", "example": false},
          "message": {"type": "string"}
        }
      },
      "ListResult": {
        "type": "object",
        "properties": {
          "success": {"type": "boolean", "example": true},
          "error": {"type": "boolean", "example": false},
          "message": {"type": "string"},
          "data": {"type": "array", "items": {"type": "object"}},
          "size": {"type": "integer"}
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {"type": "boolean"},
          "message": {"type": "string"},
          "success": {"type": "boolean"},
          "erro": {"type": "boolean"},
          "mensagem": {"type": "string"},
          "errorcode": {"type": "integer"}
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Parâmetro obrigatório ausente ou requisição inválida.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      },
      "Unauthorized": {
        "description": "Token da API ausente, inválido ou expirado.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      },
      "Forbidden": {
        "description": "Acesso à operação recusado.",
        "content": {
          "application/json": {"schema": {"$ref": "#/components/schemas/Error"}},
          "text/plain": {"schema": {"type": "string"}}
        }
      },
      "NotFound": {
        "description": "Recurso não encontrado.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      },
      "Conflict": {
        "description": "A operação conflita com o estado atual do recurso.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      },
      "Unprocessable": {
        "description": "Um ou mais campos não passaram pela validação.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      },
      "RateLimit": {
        "description": "Limite de requisições excedido.",
        "content": {"text/plain": {"schema": {"type": "string"}}}
      },
      "ServerError": {
        "description": "Falha interna ao processar a operação.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      }
    }
  }
}
