Required permission
Account > Networking > Subdomains > Update
Path parameters
domain
string requiredName of the domain
Request body
- {object}
name
string requiredSubdomain prepended to the domain nameoptions
{object}Optional advanced configuration for the subdomain.tlsMode
stringDesired TLS mode for the subdomain.one ofdefault, passthroughminTlsProtocolVersion
stringMinimum TLS protocol version for the subdomain. Only applicable for non-wildcard subdomains.one ofTLSV1_1, TLSV1_2, TLSV1_3autoVerify
booleanThe domain will be automatically verified on creation. Only configurable if the relevant feature flag is enabled for you account.aliasDomains
[array]Alias domains which should be routable. Only configurable if the relevant feature flag is enabled for you account.- string
cdn
{object}northflank
{object}enabled
booleanoptions
{object}service
{object}forceTlsEnableHsts
booleanhstsDuration
numberHSTS duration. Required when `forceTlsEnableHsts` is `true`.min300staleIfError
booleanstaleIfErrorTtl
numberdefaultTtl
numberpassThrough
booleanbypassCredentialedRequests
booleanlogging
{object}enabled
booleanhttp3
{object}enabled
booleanwebsockets
{object}enabled
booleanddosProtection
{object}enabled
booleancompression
{object}enabled
booleanmode
stringCompression options. Required when `enabled` is `true`.one ofgzip, brotlivclSnippets
[array]- {object}
id
stringname
string requiredmin length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$type
string requiredone ofinit, recv, hash, hit, miss, pass, fetch, error, deliver, log, nonedynamic
string requiredone of0, 1priority
(multiple options: oneOf)- numbermin1max100
- numbermin0max100
content
string requiredcacheSettings
[array]- {object}
id
stringname
string requiredmin length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$action
stringone ofpass, cache, restartcacheCondition
string requiredmin length1max length512staleTtl
number requiredttl
number required
OR
Response body
- {object}Response object.
data
{object} requiredResult data.recordType
string requiredThe record type to use for the DNS record to verify the subdomain - always CNAME for subdomains.name
string requiredThe subdomain.fullName
string requiredThe full domain name with subdomaincontent
string requiredThe content to set the DNS record toverified
boolean requiredWhether the subdomain has been verified successfully and can be used.options
{object}Optional advanced configuration for the subdomain.tlsMode
stringDesired TLS mode for the subdomain.one ofdefault, passthroughminTlsProtocolVersion
stringMinimum TLS protocol version for the subdomain. Only applicable for non-wildcard subdomains.one ofTLSV1_1, TLSV1_2, TLSV1_3autoVerify
booleanThe domain will be automatically verified on creation. Only configurable if the relevant feature flag is enabled for you account.aliasDomains
[array]Alias domains which should be routable. Only configurable if the relevant feature flag is enabled for you account.- string
routingMode
stringThe routing mode for the subdomain.one ofpaths, geoRouting, loadBalancerSubdomain
PUT /v1/domains/{domain}/subdomains
PUT /v1/teams/{teamId}/domains/{domain}/subdomains
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PUT \
--data '{"name":"site"}' \
https://api.northflank.com/v1/domains/{domain}/subdomainsExample response
200 OK
JSON
{
"data": {
"recordType": "CNAME",
"name": "site",
"fullName": "site.example.com",
"content": "site.example.com.user-1234.dns.northflank.app",
"verified": false
}
}Example response
400 Bad Request
Example response
409 Conflict