# Auth.md — MaltaCleaners

MaltaCleaners (`https://malta-cleaners.com`) is a home-cleaning booking site.
This document tells AI agents how to authenticate with our APIs.

## TL;DR

Most of our public API is **unauthenticated**. You do not need a token to get a
quote, validate a coupon, or create a booking request. There is **no OAuth2 /
OIDC authorization server** on this domain.

## Public endpoints (no auth)

| Method | Path | Purpose |
|--------|------|---------|
| `POST` | `/api/bookings` | Create a cleaning booking request (async, returns `{ok:true}` `202`). |
| `GET`  | `/api/bookings/{id}/public-summary` | Non-PII booking summary (SHA-256 hashed contact fields) for conversion tracking. |
| `POST` | `/api/coupons/validate` | Validate a discount coupon code for a customer. |
| `GET`  | `/api/status` | Liveness probe. |
| `GET`  | `/.well-known/api-catalog` | Machine-readable API catalog (RFC 9727 `application/linkset+json`). |
| `GET`  | `/.well-known/openapi.json` | OpenAPI 3.1 description of the public API. |

You can call these directly. Prefer reading the
[API catalog](https://malta-cleaners.com/.well-known/api-catalog) and the
[OpenAPI spec](https://malta-cleaners.com/.well-known/openapi.json) for exact
request/response shapes.

## Protected endpoints

Operational APIs under `/api/admin/*` and `/api/employee/*` are **not** exposed
for autonomous agent use. They are protected by:

- **Session cookies** for human operators in the web console, and
- **Personal Access Tokens (PAT)** — bearer tokens (`Authorization: Bearer
  malt_…`) issued per-user inside the admin console.

We do not currently run an OAuth2 authorization server, so there is no
`/authorize`, `/token`, or JWKS endpoint to discover, and no client-credentials
or authorization-code flow available to agents. See
[`/.well-known/oauth-protected-resource`](https://malta-cleaners.com/.well-known/oauth-protected-resource)
for the formal resource metadata (it intentionally lists no authorization
servers).

## Becoming a trusted automation partner

If you are building an integration that needs automated access to operational
endpoints (e.g. a property-management system creating recurring bookings), we
issue scoped PATs manually after review:

1. Email **bookings@malta-cleaners.com** describing the integration.
2. We provision an operator account and issue a PAT bound to it.
3. Send the PAT as `Authorization: Bearer <token>`.

We treat automation access as privileged and review each request. Do not
attempt to brute-force, scrape, or enumerate protected resources.

## Rate limits & courtesy

Public endpoints are cached and rate-limited at the edge. For exploratory
agents: prefer one quote/coupon lookup per user intent, and never submit test
bookings. Creating bookings sends real notifications to our team and cleaners.

## Contact

- Bookings / support: **bookings@malta-cleaners.com**
- WhatsApp: **+356 9996 2381** (Mon–Sat 07:00–21:00 CET)
- Human-readable site docs: [`/llms.txt`](https://malta-cleaners.com/llms.txt)
