POST - /api/domains
CURL
curl -X POST "https://servr.app/api/domains" \
-H "Authorization: Bearer ymmi922wQwFW1hpm3NImOotRVWG8yrTQ2IoScQFl" \
-H "Content-Type: application/json; charset=utf-8" \
-d "{'domain':'YOUR-DOMAIN.COM','target':'SUB.YOUR-DOMAIN.COM','loadBalancer':true}"
Tip: Remember that before serving a domain through our service, you or your users need to add a DNS record for it pointing to our global endpoint. Check the Getting Started section for more information.
Header Parameters
- Authorization should respect the following schema:
{
"type": "string",
"enum": [
"Bearer ymmi922wQwFW1hpm3NImOotRVWG8yrTQ2IoScQFl"
],
"default": "Bearer ymmi922wQwFW1hpm3NImOotRVWG8yrTQ2IoScQFl"
}
- Content-Type should respect the following schema:
{
"type": "string",
"enum": [
"application/json; charset=utf-8"
],
"default": "application/json; charset=utf-8"
}
Body Parameters
- Data all fields are required:
{
"domain": "string",
"target": "string",
"loadBalancer": "boolean"
}
Response
- body should respect the following schema:
{
"data": {
"id": 24,
"uuid": "010e9f1d-3664-4876-964d-8dff343fd3d1",
"domain": "test4.wartner.io",
"target": "wartner.io",
"is_authorized": null,
"status_message": "STATUS_AWAITING_STATUS_CHECK",
"type": "NORMAL"
}
}