v1
Double column
API
CLI
JS Client

Domains /

Create new domain

Registers a new domain

Required permission

Account > Domains > General > Create

Request body

  • {object}
    • domain

      string required

      The domain name to register.

      pattern
      ^((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+$

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • name

        string required

        The domain name.

      • status

        string required

        The status of the domain verification.

        one of
        pending, verified
      • hostname

        string required

        The hostname to add to your domain's DNS records as a TXT record to verify the domain.

      • token

        string required

        The token to add as the content of the TXT record to verify the domain.

API
CLI
JS Client

POST /v1/domains

Example request

Request body
curl
curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
  --request POST \
  --data '{"domain":"example.com"}' \
  http://api.northflank.com/v1/domains

Example response

200 OK

Details about the newly added domain.

JSON

{
  "data": {
    "name": "example.com",
    "status": "pending",
    "hostname": "nfverify1608026055",
    "token": "e596987b52855a4a773ef580ce2985d7746b37ce8b2a443d20fa27b913d8f57"
  }
}

Example response

400 Bad Request

The domain is not valid, possibly because it is too long.

Example response

409 Conflict

The domain is already registered with this account.

© 2022 Northflank Ltd. All rights reserved.