Domains /
Add subdomain
Required permission
Account > Domains > General > Update
Path parameters
domain
string requiredName of the domain
Request body
- {object}
subdomain
string requiredA subdomain to be added.
pattern^\*|^@$|^([0-9a-z]([0-9a-z\-]*[0-9a-z])?\.)*[0-9a-z]([0-9a-z\-]*[0-9a-z])?$cdn
{object}Optional CDN configuration. Currently only available for select users.
cloudfront
{object}enabled
boolean required
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 subdomain
content
string requiredThe content to set the DNS record to
verified
boolean requiredWhether the subdomain has been verified successfully and can be used.
POST /v1/domains/{domain}/subdomains
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"subdomain":"site"}' \
https://api.northflank.com/v1/domains/{domain}/subdomains
Example 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