---
title: "Publish a site to the web"
method: POST
path: "/api/v1/sites/{id}/publish"
tags: ["Publishing"]
---

# Publish a site to the web

`POST /api/v1/sites/{id}/publish`

## Request

- Base URL: `https://app.mondovo.com`
- URL: `https://app.mondovo.com/api/v1/sites/{id}/publish`
- Auth: HTTP bearer

Compiles and deploys the site to its platform address (e.g. `https://<subdomain>.mondovo.com`; the exact URL is returned as `deployment_url`), or to its custom domain once one is attached and verified in the dashboard. Requires scope `sites:publish`.

**Billing:** taking a site live adds the standard per-site monthly charge to the subscription. The account owner must confirm that charge **once, in the Mondovo editor** — the API cannot consent to new recurring billing, so the first publish of a billable site returns `402 billing_confirmation_required`. After the charge is confirmed (or on plans/sites where no new charge applies), API publishes go straight through.

## Request body

- PublishSiteInput
  - `subdomain` string: Desired subdomain (the site goes live at its platform address, e.g. https://<subdomain>.mondovo.com — the exact URL is returned as `deployment_url`). Only applied if the site has no subdomain yet; omitted → auto-derived from the site name.
  - `confirm_contact_info` boolean: Publishing is paused (422 contact_info_needs_confirmation) while the site still carries AI-generated placeholder contact details. Set true to acknowledge the warning and publish anyway — retrying without it never clears the guard.

## Response `200`

Published.

- object
  - `site_id` string, uuid, required
  - `status` 'published', required
  - `deployment_url` string, uri, required
  - `message` string

## Other responses

- `400`: Error codes: `validation_error` (bad subdomain), `no_content` (site not generated yet), `too_many_pages_in_site` (abuse guard — not a plan limit).
- `401`: Authentication failed. Error codes: `invalid_api_key` (missing/unknown key), `key_revoked`, `key_expired`.
- `402`: Two distinct billing errors: - `billing_confirmation_required` — publishing starts a monthly per-site charge; includes `price_per_site_monthly`. The owner must publish once from the Mondovo editor to confirm billing. The API cannot approve new recurring charges. - `plan_limit_reached` with `limit_type: "published_sites"` — the plan’s live-site limit is reached; includes `current`, `maximum`, `upgrade_url`.
- `403`: Authenticated but not allowed. Error codes: `addon_required` (the API key’s workspace no longer has the Agency add-on — checked on every request, not just at key creation) and `missing_scope` (the key lacks the scope this endpoint needs).
- `404`: `site_not_found`.
- `409`: Error codes: `site_busy` (still generating) or `subdomain_taken`.
- `422`: `contact_info_needs_confirmation` — the site still carries AI-generated placeholder contact details (may include `placeholders` and `missing_fields`). Fix them via refine, or resend with `confirm_contact_info: true` to acknowledge and publish. Retrying unchanged never clears this.
- `429`: Rate limit exceeded (`rate_limit_exceeded`). The body includes `retry_after_seconds`, `limit`, and `window` ("minute" or "hour"); a `Retry-After` header is also set.
- `500`: Error codes: `publish_failed`, `configuration_error`, `internal_error`.

---

[API](https://skmtc.dev/mondovo/apis/mondovo-public-api.md) · [All operations](https://skmtc.dev/mondovo/apis/mondovo-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mondovo/apis/mondovo-public-api/revisions/1baa3e2865ba?raw)
