Create Domain
Description
Create a new domain
Only administrators has access to this function.
When a new device is added, its device ID will be:
Note: Depending on your contract, individual sub-domains may incur additional basestation license charges. Please confirm in your contract or contact Nabto support or your account manager for questions.
Request
POST /v1/domains
{
domain: string,
tags?: {
[key: string]: string
},
expiresAt?: string|null
}
Response
Successful response contains the following JSON formated body:
{
domain: string,
organizationId: string,
tags: {
[key: string]: string
},
allowSelfSigned: boolean,
created: string,
currentBatchId: number,
expiresAt: string,
deleted: boolean
}
Response Status codes:
- 200 on success
Request headers
This request must have the following headers:
Authorization: bearer <ApiKey>
X-Nabto-Organization: <organizationId>
Content-Type: application/json
Example
Request
curl -XPOST "https://api.cloud.nabto.com/v1/domains" \
-H "Authorization: Bearer <ApiKey>" \
-H "X-Nabto-Organization: <OrganizationId>" \
-H "Content-Type: application/json" \
-d '{ domain: "mydomain.example.net", tags: {"foo": "bar" }, expiresAt: "2022-10-18T10:17:24.299Z"}'
Response
{
domain: "mydomain.example.net",
organizationId: "or-lmnopqrs",
tags: {
"foo": "bar"
},
allowSelfSigned: true,
created: "2022-10-18T10:17:24.299Z",
currentBatchId: 42,
expiresAt: "2022-10-18T10:17:24.299Z",
deleted: true
}