# Auth.md

How agents authenticate with Hoy en Cancún — and where they do not need to.

## Summary
| | |
|---|---|
| Read access | **Public. No authentication, no registration.** |
| Write access (submit an event) | Public. Anonymous submissions accepted; all go to human review. |
| OAuth 2.0 / OpenID Connect | **Not supported.** No authorization server exists. |
| Optional credential | `x-api-key` header, for a higher rate limit only. |

## Registration
Registration is **optional**. An agent can call the REST API and the MCP server
right now without registering, without an account and without identifying
itself. Rate limits then apply per IP address.

Register only if you need a higher quota:

1. Email hola@hoyencancun.mx with the agent or product name, the intended use
   and a technical contact.
2. You receive an API key of the form `hec_…`. Send it in the `x-api-key`
   request header. The key is shown once; only its SHA-256 hash is stored.
3. A key can be revoked at any time. Revoked keys fall back to the per-IP limit
   rather than failing.

An API key raises the request-per-minute quota. It does not unlock different
data, extra endpoints or private fields — there are none.

Please send a descriptive `User-Agent` containing a contact URL, honour
[/robots.txt](https://hoyencancun.mx/robots.txt) and respect its `Content-Signal`
(`ai-train=no`).

## Developer portal
[https://hoyencancun.mx/developers](https://hoyencancun.mx/developers) — quickstart, worked examples, rate limits and error format.

## Endpoints
- REST: `https://hoyencancun.mx/api/v1` — OpenAPI 3.1 at [https://hoyencancun.mx/api/openapi.json](https://hoyencancun.mx/api/openapi.json)
- MCP: [https://hoyencancun.mx/mcp](https://hoyencancun.mx/mcp) — Streamable HTTP, stateless, **no authentication**
- Submit an event: [https://hoyencancun.mx/publicar](https://hoyencancun.mx/publicar) or the `enviar_evento` MCP tool

---

## Autenticación (español)

**La lectura es pública y no requiere credenciales.** Cualquier agente puede
consultar la API REST, el servidor MCP y las versiones `.md`/`.json` de cada
página sin registrarse.

El registro es **opcional** y sólo sube la cuota de peticiones por minuto:
escribe a hola@hoyencancun.mx indicando el uso previsto y recibirás una clave
`hec_…` que se envía en la cabecera `x-api-key`. Se muestra una sola vez; en la
base sólo queda su hash. Revocarla devuelve el límite por IP, no un error.

Publicar es gratis y tampoco necesita credenciales: los envíos anónimos se
aceptan y pasan por revisión humana.

**No existe OAuth 2.0 ni OpenID Connect**, ni recursos protegidos por token. Si
un documento de descubrimiento sugiere lo contrario, está equivocado.
