POST /tenants
{{base-api-url}}/tenants
Headers#
Name | Content |
---|---|
Authorization | {{your-api-key}} |
Content-Type | application/json |
Body#
{
"name": "My tenant name"
}
Example request#
curl --location -g --request POST '{{base-api-url}}/tenants' \
--header 'Authorization: Bearer {{your-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Your new Tenant\'s name"
}'
Example response#
{
"tenant": {
"id": "X",
"name": "Your new Tenant's name",
"owner": {
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com"
},
"slug": "your-new-tenants-name",
"createdAt": "2021-06-21T10:02:40Z",
"updatedAt": "2021-06-21T10:02:40Z",
"members": {
"nodes": [
{
"user": {
"lastName": "Doe",
"firstName": "John",
"email": "john@doe.com"
}
}
]
},
"works": {
"totalCount": 0,
"edges": []
}
}
}