Skip to main content

Create Custom Domain

POST /v1/custom-domains

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"domain": {
"type": "string",
"title": "Domain",
"description": "Custom domain to map (e.g., example.com)"
},
"share_id": {
"type": "string",
"title": "Share Id",
"description": "Share ID to route this domain to"
},
"dns_provider": {
"type": "string",
"title": "Dns Provider",
"description": "ACME DNS provider name (e.g., cloudflare) for lego"
},
"dns_credentials": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Dns Credentials",
"description": "DNS provider credentials as env var mapping (e.g., CLOUDFLARE_API_TOKEN)"
}
},
"type": "object",
"required": [
"domain",
"share_id",
"dns_provider"
],
"title": "CustomDomainCreateRequest"
}

Field details:

FieldTypeRequiredDescriptionConstraints
domainstringYesCustom domain to map (e.g., example.com)
share_idstringYesShare ID to route this domain to
dns_providerstringYesACME DNS provider name (e.g., cloudflare) for lego
dns_credentialsobject<string, string> | nullNoDNS provider credentials as env var mapping (e.g., CLOUDFLARE_API_TOKEN)nullable
dns_credentials.*stringNo

Responses

200

Successful Response

application/json

Resolved schema:

{}

422

Validation Error

application/json

Resolved schema:

{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo