Getting started
Change TLS mode
Choose managed or external TLS where the domain is eligible. Verification and certificate status remain controlled by the server.
PATCH
/api/customer/v1/projects/{projectId}/domains/{domainId}/tlsPath parameters
| Name | Value |
|---|---|
projectId | Required resource ID from an earlier API response. |
domainId | Required resource ID from an earlier API response. |
Request body
Send JSON with Content-Type: application/json. Nested fields and accepted values are listed in the schema.
| Field | Type | Required |
|---|---|---|
mode | "managed" | "external" | Yes |
Full request schema
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"managed",
"external"
]
}
},
"required": [
"mode"
],
"additionalProperties": false
}Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request PATCH "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}/domains/${DOMAIN_ID}/tls" \
--header "Authorization: Bearer $HCODE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"mode": "managed"
}' Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"operationId": {
"type": "string"
},
"operation": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"operationId": {
"type": "string"
},
"status": {
"type": "string"
},
"errorMessage": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"startedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finishedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status"
],
"additionalProperties": true
},
"deploymentId": {
"type": "string"
},
"projectId": {
"type": "string"
},
"status": {
"type": "string"
},
"operations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"href": {
"type": "string"
}
},
"required": [
"id",
"status",
"href"
]
}
}
},
"required": [],
"additionalProperties": true
}See errors and retries for failure responses.