Create Cloudflare Dns Record
import requests
url = "https://platform.ankra.app/api/v1/org/cloudflare/domains/{zone_id}/records"
payload = {
"name": "<string>",
"content": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', content: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/cloudflare/domains/{zone_id}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/cloudflare/domains/{zone_id}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"content": "<string>"
}
'{
"id": "<string>",
"zone_id": "<string>",
"zone_name": "<string>",
"name": "<string>",
"record_type": "<string>",
"content": "<string>",
"ttl": 123,
"is_ttl_automatic": true,
"proxied": true,
"proxiable": true,
"tags": [
"<string>"
],
"managed_by": "ankra",
"priority": 123,
"comment": "<string>",
"created_on": "<string>",
"modified_on": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cloudflare
Create Cloudflare Dns Record
POST
/
api
/
v1
/
org
/
cloudflare
/
domains
/
{zone_id}
/
records
Create Cloudflare Dns Record
import requests
url = "https://platform.ankra.app/api/v1/org/cloudflare/domains/{zone_id}/records"
payload = {
"name": "<string>",
"content": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', content: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/cloudflare/domains/{zone_id}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/cloudflare/domains/{zone_id}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"content": "<string>"
}
'{
"id": "<string>",
"zone_id": "<string>",
"zone_name": "<string>",
"name": "<string>",
"record_type": "<string>",
"content": "<string>",
"ttl": 123,
"is_ttl_automatic": true,
"proxied": true,
"proxiable": true,
"tags": [
"<string>"
],
"managed_by": "ankra",
"priority": 123,
"comment": "<string>",
"created_on": "<string>",
"modified_on": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Which connected Cloudflare credential to use. Omit when the organisation has exactly one.
Body
application/json
Record name. A bare label is qualified against the domain; '@' means the apex.
Available options:
A, AAAA, CNAME, MX, NS, TXT TTL in seconds, or 1 for automatic. Omit for automatic.
Required for MX records; rejected for every other supported type.
Response
Successful Response
Available options:
ankra, external