---
title: "Request a free certificate (wildcards allowed) for your verified domains at any DNS provider. Returns the _acme-challenge CNAME record(s) to add once"
method: POST
path: "/certificates/acme"
tags: ["Certificates"]
---

# Request a free certificate (wildcards allowed) for your verified domains at any DNS provider. Returns the _acme-challenge CNAME record(s) to add once

`POST /certificates/acme`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/certificates/acme`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Query parameters

- `orgId` string: Organization id (required when you belong to several)

## Request body

- object
  - `names` string[], required: your verified domains; "*.example.com" needs example.com verified first

## Response `201`

Requested

- object
  - `id` string, uuid, required
  - `organizationId` string, uuid, required
  - `names` string[], required
  - `state` 'awaiting_dns' | 'ready' | 'issuing' | 'issued' | 'failed' | 'canceled', required
  - `delegations` object[], required
    - `name` string, required: the name whose control is delegated (a wildcard shares its base name)
    - `record` object, required
      - `type` 'CNAME', required
      - `name` string, required: fully qualified: _acme-challenge.<name>
      - `value` string, required
    - `status` 'verified' | 'missing' | 'mismatch' | 'unchecked' | 'not_needed', required: not_needed: a name inside the platform's own zone
    - `observed` string[], required
    - `checkedAt` string, nullable, required: ISO-8601 timestamp
  - `certificateId` string, uuid, nullable, required
  - `renewalOf` string, uuid, nullable, required
  - `attempts` integer, required
  - `nextAttemptAt` string, nullable, required: ISO-8601 timestamp
  - `lastError` string, nullable, required
  - `createdAt` string, required: ISO-8601 timestamp
  - `updatedAt` string, required: ISO-8601 timestamp
  - `finishedAt` string, nullable, required: ISO-8601 timestamp

## Other responses

- `400`: Invalid request (code invalid_request); details.problems lists every certificate problem
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Authenticated but not permitted (code forbidden)
- `404`: Not found or not visible to the caller (code not_found)
- `409`: Conflicting state (code conflict)
- `429`: Too many requests (code rate_limited); see Retry-After
- `501`: Not available on this server (code not_configured)
- `503`: Certificate provider unavailable (code provider_unavailable)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
