Get your free beta license ↗
API operation · certificates group
PUT

/domains/{name}/certificate/custom

First published 3 Oct 20260.1.0Unchanged since publication

Install a custom TLS certificate for a domain

Who may call it
AdministratorResellerCustomer
Token scope, any of
certificatesall
Answers200 OK

Supply the certificate and matching private key as PEM text in cert and key. The certificate must cover the domain and still be valid. Supply the optional certificate chain as PEM text in chain. An empty chain is treated as omitted.

The API returns 400 if cert or key is missing or if cert, key, or a nonempty chain lacks a -----BEGIN marker. It returns 500 if UrbeStack cannot prepare the PEM data for installation.

UrbeStack continues installation with a warning if the certificate omits other configured names or is self-signed. For certificates that are not self-signed, UrbeStack also warns and continues if the chain is missing or fails verification.

UrbeStack sets the domain's certificate mode to custom and excludes it from automatic renewal. The 200 response returns the installed certificate record in certificate. Use DELETE /domains/{name}/certificate to remove it.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired

Request body

JSON ·CustomCertificate· 3 fields
certstring, up to 65536 charactersRequired
Certificate in PEM format.
keystring, up to 65536 charactersRequired
Certificate's private key in PEM format. UrbeStack restricts access to the stored key to root and never returns it.
chainstring, up to 131072 characters
Optional intermediate certificates in PEM format. UrbeStack checks the chain and warns about problems.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PUT "$API/domains/example.com/certificate/custom" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "cert": "text",
    "chain": "text",
    "key": "panel.port"
  }'
Response · 200 OK
{
  "certificate": {
    "fingerprint": "text",
    "issuer": "text",
    "kind": "profile",
    "name": "alice",
    "names": [
      "text"
    ],
    "not_after": "text",
    "not_before": "text",
    "reload": {},
    "warnings": [
      "text"
    ]
  }
}

Errors

10 errors, each a status and a sentence
400--<what> is required
400--<what> may not contain ..
400--<what> must be an absolute plain path
400Cannot read <p>: $!
400Domain name required
400Domain name too long
400Invalid domain name
400The <part> must be in PEM form
401Authentication required
404Domain '<name>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/put-domains-name-certificate-custom/