# Sites and banner config

Register sites, verify domains, version banner configs and publish them to the CDN.

## GET, POST and PATCH /v1/sites

Registers sites, reads site metadata (including live_config_version and loader snippet details on GET /v1/sites/{id}), and updates site settings.

## POST /v1/sites/{id}/domains and POST /v1/sites/{id}/domains/{domain}/verify

Adds domains and triggers SSRF-safe domain ownership verification via DNS TXT or HTTPS well-known file at /verify.

## GET, POST /v1/sites/{id}/configs and GET /v1/sites/{id}/configs/{ref}

Lists and creates versioned banner configurations (position, WCAG AA colours, withdraw control, material_version, and editable strings) and fetches a specific version or live ref.

## POST /v1/sites/{id}/configs/{n}/publish

Publishes banner config version n (a number such as 1; latest and live are read-only refs for GET) to cdn.policygrain.com and updates the site's live_config_version. Send an Idempotency-Key. Answers 202 while uploading and 200 once live.
