Domains /
Create new domain
Required permission
Account > Domains > General > Create
Request body
- {object}
domain
string requiredThe domain name to register.
pattern^((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+$redirect
{object}Optional configuration regarding the domain redirect set up.
mode
stringDomain redirect mode to be used.
one ofwildcard, defaultregion
stringNorthflank PaaS region the wildcard redirect should be pointed at.
cluster
stringBYOC cluster the wildcard redirect should be pointed at.
certificates
{object}Optional configuration regarding the domain certificate set up.
mode
stringCertificate provisioning mode to be used.
one ofwildcard, wildcard-import, defaultcertificateInput
{object}certificateInput
{object}Certificate data - required when
mode
is set towildcard-import
is
one ofwildcard-importthen
{object} requiredprivateKey
string requiredCertificate private key.
certificateChain
string requiredCertificate chain. May consist of one or more certificates.
Response body
- {object}
Response object.
data
{object} requiredResult data.
name
string requiredThe domain name.
status
string requiredThe status of the domain verification.
one ofpending, verifiedhostname
stringThe hostname to add to your domain's DNS records as a TXT record to verify the domain.
token
stringThe token to add as the content of the TXT record to verify the domain.
redirect
{object}Configuration regarding the domain redirect set up.
mode
string requiredDomain redirect mode.
target
{object}record
stringExpected CNAME target of the wildcard redirect.
certificates
{object}Configuration regarding the domain certificate set up.
mode
string requiredDomain certificate mode.
dcvRecord
stringDCV CNAME record used to provision wildcard certificates.
dcvTarget
{object}record
stringExpected CNAME target of the dcvRecord.
POST /v1/domains
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"domain":"example.com","redirect":{"mode":"default"},"certificates":{"mode":"default"}}' \
https://api.northflank.com/v1/domains
Example response
200 OK
JSON
{
"data": {
"name": "example.com",
"status": "pending",
"hostname": "nfverify1608026055",
"token": "e596987b52855a4a773ef580ce2985d7746b37ce8b2a443d20fa27b913d8f57",
"redirect": {
"mode": "default"
},
"certificates": {
"mode": "default"
}
}
}
Example response
400 Bad Request
Example response
409 Conflict