Create Tenant
POST
/v1/tenants
const url = 'https://api.uavcrew.ai/v1/tenants';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","external_id":"example","contact_email":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CreateTenantRequest
object
name
required
Name
string
external_id
required
External Id
string
contact_email
Contact Email
string
Responses
Section titled “Responses”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>
ValidationErrorobject
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": {} } ]}