> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinn.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Autenticação

> Cada pedido é autenticado por uma chave API no header X-API-Key.

Todos os pedidos (exceto `/api/status`) exigem a sua chave API no header **`X-API-Key`**.

```bash theme={null}
curl https://api.apinn.io/api/sports \
  -H "X-API-Key: pnk_sua_chave"
```

## Obter e gerir a sua chave

A sua chave é emitida no registo e visível no seu [espaço de cliente](https://www.apinn.io/account). Pode **regenerá-la** a qualquer momento — a antiga é então invalidada imediatamente.

<Warning>
  Nunca partilhe a sua chave nem a exponha no lado do navegador. Chame a API a partir do seu servidor.
</Warning>

## Respostas de erro

| Código | Significado                                          |
| ------ | ---------------------------------------------------- |
| `401`  | Chave em falta, inválida ou revogada.                |
| `429`  | Quota horária excedida — ver o header `Retry-After`. |
| `422`  | Parâmetro obrigatório em falta (ex. `event_id`).     |

```json 401 theme={null}
{ "detail": "Not authenticated" }
```

Ver [Quotas e limites](/pt/rate-limits) para o detalhe do header `Retry-After` e da contagem.
