Docs

Comprehensive guides and references for FiraForm.

Browse docs

Form Sites API

Read site status, upload zip deploys, roll back versions, unpublish, and manage custom domains for Form Sites.

One static site per form, hosted by FiraForm at https://{slug}.firaform.page.

A site is created by the first successful upload; index.html must be at the archive root, and only static file types are accepted. Reads are available to every team member; writes need owner, admin, or manager.

Site limits come from the team owner’s plan (max_form_sites, max_site_files, max_site_size_mb, max_site_file_size_mb, max_site_deploys_per_day, max_site_custom_domains, max_site_custom_domains_total); null means unlimited. See Form Sites for the plan table and the publishing workflow.

All endpoints use https://a.firaform.com/api and a Sanctum bearer token. See the API Reference for conventions.

Site status

GET /api/forms/{form_id}/site

Any member. Before the first publish this returns published: false and the limits, which is what the dashboard uses to show the “not published yet” state.

{
  "data": {
    "form_uuid": "V1StGXR8_Z5jdHi6B-myT",
    "published": true,
    "slug": "bakery-contact",
    "host": "bakery-contact.firaform.page",
    "url": "https://bakery-contact.firaform.page",
    "status": "live",
    "is_live": true,
    "is_suspended": false,
    "branding_hidden": false,
    "can_hide_branding": true,
    "live_deploy": {
      "id": 12,
      "status": "ready",
      "source": "api",
      "file_count": 3,
      "total_bytes": 18422,
      "error": null,
      "is_live": true,
      "uploaded_by": { "id": 4, "name": "Dino" },
      "files": [
        { "path": "index.html", "size": 1820, "content_type": "text/html; charset=utf-8" }
      ],
      "published_at": "2026-12-01T10:00:00.000000Z",
      "created_at": "2026-12-01T09:59:50.000000Z"
    },
    "limits": {
      "max_form_sites": 10,
      "max_site_files": 100,
      "max_site_size_mb": 25,
      "max_site_file_size_mb": 5,
      "max_site_deploys_per_day": 50,
      "max_site_custom_domains": 2,
      "max_site_custom_domains_total": 25,
      "form_site_branding": false
    },
    "usage": { "sites_used": 2, "deploys_today": 1 },
    "permissions": { "manage": true }
  }
}

PATCH /api/forms/{form_id}/site

Owner, admin, or manager. Changes the subdomain. 404 before the first publish, 422 when the slug is reserved, taken, or not 3–40 characters of a-z, 0-9, and single hyphens.

Branding is not set here: it is changed in the dashboard’s Branding card, and the payload only reports branding_hidden and can_hide_branding.

{ "slug": "bakery-contact" }

Deploys

GET /api/forms/{form_id}/site/deploys

Any member. Newest first. per_page defaults to 25 (max 100). Same meta shape as other lists.

POST /api/forms/{form_id}/site/deploys

Owner, admin, or manager. Multipart upload, field archive (a .zip).

Returns 202 with the deploy in pending; poll the deploy until ready or failed.

Rejections return 422 and name the file and rule (too many files, too large, ../ path, disallowed type, missing index.html).

curl -X POST https://a.firaform.com/api/forms/$FORM/site/deploys \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" \
  -F "[email protected]"

GET /api/forms/{form_id}/site/deploys/{deploy_id}

Any member. One deploy’s status, files, and error. A deploy that belongs to another form returns 404.

POST /api/forms/{form_id}/site/deploys/{deploy_id}/rollback

Owner, admin, or manager. Makes an older ready deploy live again. A failed deploy or another form’s deploy returns 404/422.

POST /api/forms/{form_id}/site/unpublish

Owner, admin, or manager. Takes the site offline (visitors get 404) without deleting files or deploy history.

DELETE /api/forms/{form_id}/site

Owner, admin, or manager. Deletes the site, every deploy, its stored files, and its hostname records.

{ "message": "Form site and all its deploys have been deleted." }

Upload from a shell

Large sites are easier to publish as a zip from a shell than as JSON through an AI agent. The MCP tool create_form_site_upload_url returns a short-lived, single-use signed URL:

{
  "upload_url": "https://a.firaform.com/api/form-site-uploads/V1StGXR8_Z5jdHi6B-myT/nonce?...",
  "method": "POST",
  "field": "archive",
  "content_type": "multipart/form-data",
  "expires_in": 600,
  "single_use": true
}

POST the zip to that URL:

curl -X POST "$UPLOAD_URL" \
  -H "Accept: application/json" \
  -F "[email protected]"

The link expires after 10 minutes, can be used once, and still enforces the same plan limits and file rules. It returns 202 with the pending deploy.

Custom domains

Business and Premium plans can serve a site from the user’s own hostname through Cloudflare for SaaS. Reads need any team member; writes need owner, admin, or manager. Limits apply twice: per site and across the owner’s account.

GET /api/forms/{form_id}/site/domains

Lists the site’s custom domains with their status and the DNS records the user must create.

{
  "data": [
    {
      "id": 7,
      "hostname": "register.mybakery.com",
      "status": "pending",
      "ssl_status": "pending_validation",
      "is_active": false,
      "is_primary": false,
      "is_root_domain": false,
      "dns_instructions": {
        "is_root_domain": false,
        "record_type": "CNAME",
        "record_name": "register",
        "record_value": "customers.firaform.page",
        "note": "Add a CNAME record for register.mybakery.com pointing to customers.firaform.page."
      },
      "verification_records": []
    }
  ]
}

A root domain such as mybakery.com returns record_type: "ALIAS or ANAME" and record_name: "@", because a CNAME cannot live at the apex.

POST /api/forms/{form_id}/site/domains

Adds a domain and creates the Cloudflare custom hostname. Returns 201 with the same shape as above. The domain stays pending until DNS and the certificate are ready.

{ "hostname": "register.mybakery.com" }

POST /api/forms/{form_id}/site/domains/{domain_id}/refresh

Asks Cloudflare for the current status now. Rate limited to 6 requests per minute per user.

POST /api/forms/{form_id}/site/domains/{domain_id}/primary

Makes an active domain the site’s primary address. The default {slug}.firaform.page then redirects to it.

DELETE /api/forms/{form_id}/site/domains/{domain_id}

Removes the domain from Cloudflare, the site’s KV records, and the form’s whitelist.

{ "message": "Custom domain removed." }