Skip to content

Create Tenant

POST
/v1/tenants
curl --request POST \
--url https://api.uavcrew.ai/v1/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "external_id": "example", "contact_email": "" }'

Create a tenant and issue a tenant-scoped API key (K1).

The raw API key is returned once — store it securely.

Media typeapplication/json
CreateTenantRequest
object
name
required
Name
string
external_id
required
External Id
string
contact_email
Contact Email
string
""

Successful Response

Media typeapplication/json
TenantWithKeyResponse

Returned on create — includes the raw K1 API key (shown once).

object
id
required
Id
string
name
required
Name
string
external_id
required
External Id
string
contact_email
required
Contact Email
string
status
required
Status
string
created_at
required
Created At
string
updated_at
required
Updated At
string
api_key
required
Api Key
string

Example generated

{
"id": "example",
"name": "example",
"external_id": "example",
"contact_email": "example",
"status": "example",
"created_at": "example",
"updated_at": "example",
"api_key": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}