{
  "openapi": "3.1.0",
  "info": {
    "title": "Obey Tickets — endpoints públicos",
    "version": "1.0.0",
    "summary": "Superfície pública, somente leitura e sem autenticação, para descoberta por agentes.",
    "description": "Superfície pública e somente leitura de https://obeytickets.com.br: página inicial com negociação de conteúdo, sitemaps, guias para IA e metadados de recurso protegido. Compra e venda de ingressos acontecem na interface web e não fazem parte desta API.\n\n**Permissões:** todos os endpoints usam o único escopo `public:read`, que não exige token (ver `/.well-known/oauth-protected-resource`, RFC 9728).\n\n**Versionamento:** a versão atual é 1, informada no header `X-API-Version` de toda resposta. Mudanças incompatíveis só entram em uma nova versão major (`X-API-Version: 2`); a versão anterior continua disponível por, no mínimo, 90 dias.\n\n**Depreciação:** recursos obsoletos passam a enviar os headers `Deprecation` e `Sunset` (RFC 8594) com antecedência mínima de 90 dias, e o aviso é registrado em https://obeytickets.com.br/llms.txt.\n\n**Limite de taxa:** 600 requisições por minuto por IP. As respostas dos endpoints de descoberta trazem `RateLimit-Limit` e `RateLimit-Policy`; ao exceder, a resposta é 429 com `Retry-After` (segundos).\n\n**Erros:** sempre no formato JSON do schema `Error` (código, mensagem e dica).",
    "contact": {
      "name": "Suporte Obey Tickets",
      "email": "suporte@obeytickets.com.br",
      "url": "https://obeytickets.com.br/contact"
    },
    "x-api-versioning": {
      "scheme": "header",
      "header": "X-API-Version",
      "current": "1",
      "supported": [
        "1"
      ],
      "min_deprecation_notice_days": 90,
      "deprecation_signals": [
        "Deprecation",
        "Sunset"
      ]
    },
    "x-rate-limit": {
      "limit": 600,
      "window_seconds": 60,
      "headers": [
        "RateLimit-Limit",
        "RateLimit-Policy",
        "Retry-After"
      ]
    }
  },
  "servers": [
    {
      "url": "https://obeytickets.com.br",
      "description": "Produção"
    },
    {
      "url": "https://dev.obeytickets.com.br",
      "description": "Desenvolvimento e testes, sem garantia de estabilidade nem de dados."
    }
  ],
  "security": [
    {}
  ],
  "tags": [
    {
      "name": "discovery",
      "description": "Arquivos e páginas de descoberta, todos públicos."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getHomepage",
        "summary": "Página inicial",
        "description": "Retorna a página inicial. Com Accept: text/markdown devolve Markdown; caso contrário devolve HTML. A resposta inclui Vary: Accept.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Página inicial no formato negociado.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Documento HTML."
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "Documento Markdown."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        },
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": false,
            "description": "Formato desejado: text/markdown ou text/html.",
            "schema": {
              "type": "string",
              "enum": [
                "text/markdown",
                "text/html"
              ]
            }
          }
        ]
      }
    },
    "/sitemap.xml": {
      "get": {
        "operationId": "getSitemapIndex",
        "summary": "Sitemap geral",
        "description": "Índice de sitemaps do site em XML (protocolo sitemaps.org).",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Sitemap XML.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Urlset"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/sitemap-eventos.xml": {
      "get": {
        "operationId": "getEventsSitemap",
        "summary": "Sitemap de eventos",
        "description": "Lista as URLs públicas de eventos (/eventos/{slug}) em XML.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Sitemap XML de eventos.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Urlset"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/sitemap-produtoras.xml": {
      "get": {
        "operationId": "getProducersSitemap",
        "summary": "Sitemap de produtoras",
        "description": "Lista as URLs públicas de produtoras (/{slug}) em XML.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Sitemap XML de produtoras.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Urlset"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/sitemap-artistas.xml": {
      "get": {
        "operationId": "getArtistsSitemap",
        "summary": "Sitemap de artistas",
        "description": "Lista as URLs públicas de artistas (/artistas/{slug}) em XML.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Sitemap XML de artistas.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Urlset"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "Guia para agentes de IA",
        "description": "Descreve o produto, quando um agente deve indicar a Obey Tickets e onde estão os recursos legíveis por máquina.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Texto em Markdown com o guia para agentes.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Texto em Markdown com o guia para agentes.",
                  "minLength": 1
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "operationId": "getRobotsTxt",
        "summary": "Regras para crawlers",
        "description": "Regras de rastreamento e endereços dos sitemaps.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Regras de rastreamento em texto simples.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Regras de rastreamento em texto simples.",
                  "minLength": 1
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiDocument",
        "summary": "Especificação OpenAPI",
        "description": "Este documento OpenAPI 3.1.",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Documento OpenAPI.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Documento OpenAPI 3.1.",
                  "required": [
                    "openapi",
                    "info",
                    "paths"
                  ],
                  "properties": {
                    "openapi": {
                      "type": "string",
                      "description": "Versão do OpenAPI."
                    },
                    "info": {
                      "type": "object",
                      "description": "Metadados da API."
                    },
                    "paths": {
                      "type": "object",
                      "description": "Operações disponíveis."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "operationId": "getProtectedResourceMetadata",
        "summary": "Metadados de recurso protegido (RFC 9728)",
        "description": "Declara o recurso, a documentação e os escopos suportados (`public:read`, que não exige token).",
        "tags": [
          "discovery"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Metadados do recurso.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/XApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceMetadata"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "XApiVersion": {
        "description": "Versão major da API que respondeu.",
        "schema": {
          "type": "string",
          "examples": [
            "1"
          ]
        }
      },
      "RateLimitLimit": {
        "description": "Requisições permitidas por janela de 60 segundos.",
        "schema": {
          "type": "integer",
          "examples": [
            600
          ]
        }
      },
      "RetryAfter": {
        "description": "Segundos de espera antes de tentar de novo.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "responses": {
      "NotFound": {
        "description": "Recurso inexistente (404 real; corpo em JSON, Markdown ou HTML conforme Accept).",
        "headers": {
          "X-API-Version": {
            "$ref": "#/components/headers/XApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "text/markdown": {
            "schema": {
              "type": "string",
              "description": "Mensagem de erro em Markdown com links para llms.txt e sitemap."
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Limite de taxa excedido.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "X-API-Version": {
            "$ref": "#/components/headers/XApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UnexpectedError": {
        "description": "Erro inesperado.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Formato de erro em JSON para caminhos /api/, 404 e 429.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "status",
              "message",
              "hint"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Código estável do erro.",
                "enum": [
                  "not_found",
                  "rate_limited"
                ]
              },
              "status": {
                "type": "integer",
                "description": "Status HTTP.",
                "examples": [
                  404
                ]
              },
              "message": {
                "type": "string",
                "description": "Explicação legível do erro."
              },
              "hint": {
                "type": "string",
                "description": "Como resolver ou onde achar o endereço correto."
              },
              "docs": {
                "type": "string",
                "format": "uri",
                "description": "Link para a documentação."
              }
            }
          }
        }
      },
      "Urlset": {
        "type": "object",
        "description": "Sitemap no protocolo sitemaps.org.",
        "xml": {
          "name": "urlset",
          "namespace": "http://www.sitemaps.org/schemas/sitemap/0.9"
        },
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "array",
            "description": "URLs do sitemap.",
            "items": {
              "type": "object",
              "required": [
                "loc"
              ],
              "properties": {
                "loc": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL absoluta da página."
                },
                "lastmod": {
                  "type": "string",
                  "format": "date",
                  "description": "Data da última alteração."
                },
                "changefreq": {
                  "type": "string",
                  "description": "Frequência de mudança.",
                  "enum": [
                    "always",
                    "hourly",
                    "daily",
                    "weekly",
                    "monthly",
                    "yearly",
                    "never"
                  ]
                },
                "priority": {
                  "type": "string",
                  "description": "Prioridade de 0.0 a 1.0."
                }
              }
            }
          }
        }
      },
      "ProtectedResourceMetadata": {
        "type": "object",
        "description": "Metadados de recurso protegido (RFC 9728).",
        "required": [
          "resource",
          "scopes_supported"
        ],
        "properties": {
          "resource": {
            "type": "string",
            "format": "uri",
            "description": "Identificador do recurso."
          },
          "resource_name": {
            "type": "string",
            "description": "Nome legível do recurso."
          },
          "resource_documentation": {
            "type": "string",
            "format": "uri",
            "description": "Documentação do recurso."
          },
          "scopes_supported": {
            "type": "array",
            "description": "Escopos declarados.",
            "items": {
              "type": "string",
              "enum": [
                "public:read"
              ]
            }
          },
          "bearer_methods_supported": {
            "type": "array",
            "description": "Formas de enviar token, se houver.",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Obey Tickets API: documentação para desenvolvedores",
    "url": "https://obeytickets.com.br/developers"
  }
}
