Create a Tenant

Create a new tenant by providing a tenant name. Tenant names must be unique within a database.

Create Tenant Request
cURL
POST- /workspaces/:workspaceSlug/databases/:databaseName/tenants
curl 'https://api.thenile.dev/workspaces/<string>/databases/<string>/tenants' \
--header 'Authorization: Bearer <string>' \
--data '{
  "name": "<string>"
}'

The response includes the generated tenant id and the name you provided.

Create Tenant Response
201
{
  "id": "018b61ec-af9e-77e5-b27f-77239cd4a0bc",
  "name": "Tenant Zero"
}