Buy a domain
import requests
url = "https://platform.ankra.app/api/v1/org/domains/purchase"
payload = {
"name": "<string>",
"years": 5,
"registrant": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"organisation": "<string>"
},
"accept_registration_agreement": True
}
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>',
years: 5,
registrant: {
name: '<string>',
email: '<string>',
phone: '<string>',
street: '<string>',
city: '<string>',
postal_code: '<string>',
country_code: '<string>',
organisation: '<string>'
},
accept_registration_agreement: true
})
};
fetch('https://platform.ankra.app/api/v1/org/domains/purchase', 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/domains/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"years": 5,
"registrant": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"organisation": "<string>"
},
"accept_registration_agreement": true
}
'{
"purchase": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"auto_renew": true,
"use_as_ankra_domain": true,
"root_status": "not_requested",
"root_failure": "<string>",
"cloud_domain_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}DNS
Buy a domain
Buy a domain through Ankra for the organisation (organisation admin only), billed to its Ankra Cloud account and served by Ankra’s nameservers. With use_as_ankra_domain the domain then replaces the organisation’s default Ankra root domain once it is registered and delegated, moving cluster DNS zones and records onto it; the purchase’s root_status follows that. Available to organisations with domain purchase enabled; answers 404 otherwise.
POST
/
api
/
v1
/
org
/
domains
/
purchase
Buy a domain
import requests
url = "https://platform.ankra.app/api/v1/org/domains/purchase"
payload = {
"name": "<string>",
"years": 5,
"registrant": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"organisation": "<string>"
},
"accept_registration_agreement": True
}
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>',
years: 5,
registrant: {
name: '<string>',
email: '<string>',
phone: '<string>',
street: '<string>',
city: '<string>',
postal_code: '<string>',
country_code: '<string>',
organisation: '<string>'
},
accept_registration_agreement: true
})
};
fetch('https://platform.ankra.app/api/v1/org/domains/purchase', 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/domains/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"years": 5,
"registrant": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"organisation": "<string>"
},
"accept_registration_agreement": true
}
'{
"purchase": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"auto_renew": true,
"use_as_ankra_domain": true,
"root_status": "not_requested",
"root_failure": "<string>",
"cloud_domain_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}Authorizations
Body
application/json
A domain purchase.
Response
Created
The purchase a POST /api/v1/org/domains/purchase made.