Create a route
curl --request POST \
--url https://api.awardee.com/v1/custom-domain-routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"chatbot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kb_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_default": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
slug: '<string>',
chatbot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
kb_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
page_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_default: true
})
};
fetch('https://api.awardee.com/v1/custom-domain-routes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.awardee.com/v1/custom-domain-routes"
payload = {
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"chatbot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kb_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_default": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "custom_domain_route",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"type": "chatbot",
"chatbot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kb_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_default": true,
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}Endpoints
Create a route
Attaches a resource (chatbot, knowledge base, or page) to a path on a custom domain. The parent domain doesn’t need to be verified yet — routes can be configured ahead of DNS propagation. Exactly one of chatbot_id, kb_id, or page_id must be set and must match type.
POST
/
custom-domain-routes
Create a route
curl --request POST \
--url https://api.awardee.com/v1/custom-domain-routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"chatbot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kb_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_default": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
slug: '<string>',
chatbot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
kb_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
page_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_default: true
})
};
fetch('https://api.awardee.com/v1/custom-domain-routes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.awardee.com/v1/custom-domain-routes"
payload = {
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"chatbot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kb_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_default": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "custom_domain_route",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"type": "chatbot",
"chatbot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kb_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_default": true,
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}Authorizations
Send your API key as Authorization: Bearer aw_live_…. Manage keys in the dashboard under Settings → API Keys.
Headers
Opaque key that makes this POST safe to retry. Responses are cached for 24h per API key.
Maximum string length:
255Body
application/json
Response
Route created
Allowed value:
"custom_domain_route"Available options:
chatbot, kb, page Public vanity URL — null until the parent domain is verified.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
