Install SSL certificate on hosting
POST/api/v3/hostings/:hosting_id/ssl-certificates
Required scopes: hosting:write
Installs a purchased SSL certificate on the hosting, or issues and installs a Let's Encrypt certificate, with the rules of the control panel. With DNS that are not on our nameservers, Let's Encrypt requires the CNAME record that delegates its DNS validation: GET /api/v3/hostings/{hosting_id}/ssl-certificates/can-install tells whether the installation can start, and which record to create. 409 when a certificate is already installed on the destination, the CNAME record is missing, the limit of Let's Encrypt installations is reached, the hosting is not active yet or an operation is running; 403 when the mail server of the hosting does not accept certificates
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 409
- 429
- 500
Accepted: the operation goes on in the background, as the returned Task
Response Headers
URL of the Task: /api/v3/tasks/{task_id}. Reading it requires the purchases:read scope
The request is not valid: error 1000 with the errors for each field in meta.errors, error 1001 (or 1) for other invalid input
The access token is missing, invalid, expired or revoked (error 1100): request a new token and retry once
The access token is valid but not enough: missing scope (error 1101), token for the other API (error 1102), missing permission, feature not included in the plan, operation not available to sub-accounts, internal API without administrator privileges or IP address not allowed (error 1601). A new token does not change the result
The resource does not exist or does not belong to the account (error 1200)
The request conflicts with a business rule or with the current state of the resource (error 1400)
Too many requests (error 1300): retry after the seconds in the Retry-After header
Response Headers
Seconds to wait before retrying
Unexpected server error (error 1500)