Skip to content

Create a tenant — provision its DB, migrate, register it

POST
/admin/tenants
curl --request POST \
--url http://localhost:3000/admin/tenants \
--header 'Content-Type: application/json' \
--header 'X-Admin-Key: <X-Admin-Key>' \
--data '{ "id": "acme", "name": "Acme Inc" }'
Media typeapplication/json
object
id
required
string
Example
acme
name
required
string
Example
Acme Inc

Created. The only time api_secret is ever returned.

Media typeapplication/json
object
id
string
name
string
api_key
string
api_secret
string
Examplegenerated
{
"id": "example",
"name": "example",
"api_key": "example",
"api_secret": "example"
}

Tenant already exists

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED UNAUTHENTICATED FORBIDDEN NOT_FOUND CONFLICT RATE_LIMITED INTERNAL
message
required
string
requestId
required
string
fields

Present only for VALIDATION_FAILED.

Array<object>
object
path
string
message
string
Example
{
"error": {
"code": "VALIDATION_FAILED"
}
}