Assign Endpoint Certificate

PUT /v1/endpoints/{uuid}/certificate

Override the TLS certificate served on an endpoint that uses a custom domain. By default the platform serves a Let's Encrypt cert it manages itself (auto-renewed via ACME); this endpoint lets you swap in a certificate you've uploaded via POST /v1/certificates/self instead.

Restricted to custom-domain endpoints only (the linked domain must be one you own — shared domains always use platform-managed certs). Also gated behind the custom_ssl entitlement on your plan.

Set use_default: true (or omit certificate_uuid) to revert to the auto-managed cert. The previous custom certificate row is detached but not deleted from your library — it's still available to assign to another endpoint.

Path parameters

uuid string (uuid) Req
Endpoint UUID. Must use a custom domain.

Request body

certificate_uuid string (uuid)
The uuid of a certificate from /certificates/assignable. This is one of your uploaded certificates, or a certificate provided by ngris for your account. Must be active and not expired. Omit it together with use_default: true to revert.
use_default boolean
true = revert to platform-managed ACME cert. false = use the supplied certificate_uuid. Either explicit certificate_uuid with use_default: false or use_default: true works.

Deprecated: certificate_id (integer) is still accepted until the sunset. Send certificate_uuid; sending both for different objects is a 400 id_uuid_mismatch.

Response (200 OK)

ok boolean
Always true on success.
certificate_uuid string (uuid) | null
The uuid of the newly attached certificate, or null if reverted to default.
certificate_name string
Name of the attached certificate. Present only when a certificate is assigned (omitted on revert-to-default).

Deprecated: until the sunset this response also carries the legacy integer certificate_id. Don't use it; read certificate_uuid.

Errors

400 Bad Request
Unknown fields (strict decoding), invalid JSON, endpoint isn't on a custom domain, certificate isn't active, certificate is expired, certificate domain doesn't match the endpoint, the certificate doesn't cover the endpoint hostname, a malformed certificate_uuid, or certificate_id and certificate_uuid naming different certificates (id_uuid_mismatch).
401 Unauthorized
Missing auth.
403 Forbidden
Plan doesn't include the custom_ssl entitlement.
404 Not Found
endpoint not found or certificate not found — an unknown uuid and one you can't use read the same.
Request — assign custom cert
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/certificate" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"certificate_uuid": "019be236-c4fb-72c2-b153-1eefef23705b", "use_default": false}'
Request — revert to ACME
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/certificate" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"use_default": true}'
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client.endpoints.assign_certificate( "<endpoint_uuid>", certificate_uuid="019be236-c4fb-72c2-b153-1eefef23705b", ) # Revert to platform-managed: client.endpoints.assign_certificate( "<endpoint_uuid>", use_default=True, )
Response — 200 OK
{ "ok": true, "certificate_uuid": "019be236-c4fb-72c2-b153-1eefef23705b", "certificate_name": "acme.example.com" }
Was this helpful?
Was this helpful?