Import a certificate for a subdomain of a domain using individual certificates.
Required permission
Account > Networking > Subdomains > Update
Path parameters
domain
string requiredName of the domainsubdomain
string requiredName of the subdomain
Request body
- {object}
certificate
{object} requiredCertificate to import.privateKey
string requiredCertificate private key.certificateChain
string requiredCertificate chain. May consist of one or more certificates.
Response body
- {object}Response object.
data
{object} requiredResult data.
API
CLI
JS Client
POST /v1/domains/{domain}/subdomains/{subdomain}/certificate/import
POST /v1/teams/{teamId}/domains/{domain}/subdomains/{subdomain}/certificate/import
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"certificate":{"privateKey":"string","certificateChain":"string"}}' \
https://api.northflank.com/v1/domains/{domain}/subdomains/{subdomain}/certificate/importExample response
200 OK
The operation was performed successfully.
JSON
{
"data": {}
}Example response
400 Bad Request
Could not parse certificate.
Example response
409 Conflict
The certificate does not cover the subdomain, its expiry is under a month away, or the subdomain inherits its certificate from the parent domain.