Add a DNS provider account; its token is checked first and kept sealed.
POST
/api/v1/dns-providers
const url = 'https://example.com/api/v1/dns-providers';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"cloudflare","kind":"example","token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/dns-providers \ --header 'Content-Type: application/json' \ --data '{ "name": "cloudflare", "kind": "example", "token": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
Example
cloudflarekind
required
cloudflare.
string
token
required
An API token that may edit the zones’ DNS (write-only).
string
Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string format: uuid
name
required
string
kind
required
cloudflare.
string
createdBy
required
string
createdAt
required
string
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "kind": "example", "createdBy": "example", "createdAt": "example"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Unknown kind, or the provider refused the token
Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}