finalize_certificate
Finalize and issue a certificate order in one call: validates the DNS challenges, waits for Let's Encrypt, and returns the issued cert. Step 3 of issuance - call after check_certificate_propagation reports all_found.
STRONGLY PREFER passing csr_pem (generate the key + CSR locally with openssl so the private key never leaves the machine). Returns leaf_pem/chain_pem/fullchain_pem. If you must, pass a passphrase instead to get a PKCS#12 bundle - but a CSR is safer.
If it replies "still validating", DNS hasn't fully propagated: re-check check_certificate_propagation and call again.
Needs a locally-generated CSR (csr_pem) - requires a local shell with openssl. On a surface without one (e.g. a Claude.ai custom connector) this can't complete; it returns guidance to finish in Claude Code/Cowork or the web form. Scanning and monitoring work everywhere.
On success the structuredContent carries a handoff object - relay handoff.message to the user and do NOT separately call add_monitor; the cert→monitoring handoff is automatic and server-side.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csr_pem | No | PEM CERTIFICATE REQUEST covering exactly {domain, www.domain}. Preferred - key stays local. | |
| order_id | Yes | The order_id from create_certificate. | |
| passphrase | No | Fallback only: ≥8 chars, protects a returned PKCS#12 bundle. Omit when using csr_pem. | |
| resume_token | No | Optional. The resume_token from create_certificate; pass it to finalize an order whose row Beacon already purged (~24h). | |
| max_wait_seconds | No | How long to wait for validation server-side. Default 60, capped at 75. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| state | No | ||
| handoff | No | Cert->monitoring handoff; relay handoff.message and do not call add_monitor. | |
| leaf_pem | No | ||
| chain_pem | No | ||
| not_after | No | ||
| fullchain_pem | No | Full certificate chain (PEM), present on success. |