---
title: "Issue a certificate"
method: POST
path: "/v1/ssl/certificates"
tags: ["SSL"]
---

# Issue a certificate

`POST /v1/ssl/certificates`

## Request

- Base URL: `https://developers.servera.co.uk`
- URL: `https://developers.servera.co.uk/v1/ssl/certificates`
- Auth: HTTP bearer

Issue a managed Let's Encrypt certificate for domains you own. We auto-pick the
validation method (see `preflight`). `dry_run=true` runs against Let's Encrypt
**staging** — it exercises the whole flow (real DNS challenge) but issues an
untrusted cert and consumes **no** production budget; always dry-run first. Issuance
runs in the background: poll `GET /v1/ssl/certificates/{id}` for status.

## Request body

- SslIssueBody
  - `domains` string[], required: Domain(s) for the certificate. First is the primary CN; use *.example.com for a wildcard.
  - `dry_run` boolean: Run against Let's Encrypt STAGING (validates everything, consumes NO production budget). Always dry-run first.
  - `install_target` 'auto' | 'download' | 'edge' | 'cpanel' | 'deploy_agent'
  - `csr` string, nullable: Optional PEM CSR — keeps the private key on YOUR side (we never see it).

## Response `200`

Successful Response

- SslCertificateItem
  - `id` integer, required
  - `domain` string, required
  - `sans` string[]
  - `method` string, required
  - `install_target` string, required
  - `status` string, required
  - `environment` string, required
  - `key_custody` string, required
  - `not_before` string, nullable
  - `not_after` string, nullable
  - `last_error_code` string, nullable
  - `created_at` string, nullable
  - `updated_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/servera/apis/servera-developers-api.md) · [All operations](https://skmtc.dev/servera/apis/servera-developers-api/llms.txt) · [OpenAPI document](https://skmtc.dev/servera/apis/servera-developers-api/revisions/a196f94eee59?raw)
