hosting
POST /v1/sites/{siteId}/ssl/external
Install an SSL certificate the customer obtained elsewhere.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền sites.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/ssl/external \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "certificate": <string>, "key": <string>, "ca": <string> }'Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
Installs a third-party certificate against one of the domain names on the site's hosting package, and returns the site's whole TLS state so the client re-renders from the server's answer. The free certificate (`enableSiteFreeSsl`) covers most customers; this is for one they already bought, or an EV/OV certificate their compliance requires. **This endpoint is deliberately stricter than the hosting platform behind it.** The upstream accepts an expired certificate, and one whose names do not include the domain it is installed against, answering success to both — after which every visitor to the site is shown a security warning. Measured against the live platform, 2026-08-21. Both are refused here, `422`, before the upstream is called, because nothing downstream refuses them. Also refused `422`, each in its own words: a private key that does not belong to the certificate, a missing or malformed CA chain, and a certificate that is not yet valid. The upstream reports every one of those as a single undifferentiated server error, which is not something a customer can act on. **The CA chain is required, not optional** — it is the `intermediate` or `chain` file the certificate authority supplies alongside the certificate, and an install without it fails. Unlike the free certificate this is **not** gated on the domain being delegated to us: a supplied certificate needs no validation challenge, so a customer whose DNS lives elsewhere can still use it. That is often exactly why they are here. There is no removal operation, because the platform has none. To go back, request the free certificate again with `enableSiteFreeSsl` — it replaces what is stored. `404` for a site with no vendor hosting package. Requires `sites.manage`.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
siteId (path) | Uuid | Có | Site ID (UUIDv7). |
Nội dung yêu cầu
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
name | string | Có | The domain name on the package to install against. It must already be one of the site's names; anything else is refused `422` naming the names that are available, rather than pa… |
certificate | string | Có | The certificate, PEM-encoded, including its `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` lines. Surrounding whitespace is normalised rather than rejected — the… |
key | string | Có | The certificate's private key, PEM-encoded. **Write-only and never returned by any operation**: it is passed to the hosting platform, which stores the bundle, and is not persist… |
ca | string | Có | The CA chain — the `intermediate` or `chain` file from the certificate authority. May contain several concatenated certificates, and all of them are checked. Required. |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
available | boolean | Có | Whether the package type exposes a certificate surface at all. False renders an explanation rather than an empty list, so "nothing has been issued yet" and "not part of this pla… |
certificates | SiteSslCertificate[] | Có | The certificates installed on the package. |
force_https | boolean | Có | Whether plain HTTP is redirected to HTTPS, or null when the package does not report the setting. Null is a third state the client must render as unknown: an unchecked toggle wou… |
free_ssl_permitted | boolean | Có | Whether this package type permits requesting the free certificate. An absent vendor capability means **refused**, never "probably on" — the refusal is ours, in our words, before… |
force_ssl_permitted | boolean | Có | Whether this package type permits changing HTTPS enforcement. |
external_ssl_permitted | boolean | Có | Whether this package type permits installing a certificate the customer obtained elsewhere (`installSiteExternalSsl`). Reported separately from `free_ssl_permitted` because they… |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 409 · 422 · 429 · 503