Create a tenant
POST
/v1/tenantscurl -X POST 'https://api.embodiflow.io/v1/tenants' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"storageKey": "string"
}'Authorization
Send a personal access token with every request.
- Authorization: Bearer PAT
Header parameters
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
Request body
Content-Typeapplication/json
- namestringrequired
Display name for the new tenant.
- storageKeystring
Optional storage naming identity (1–20 ASCII letters/digits). Server trims and lowercases to [a-z0-9]{1,20}. Omitted → server generates a 20-char key. Immutable after create. Do not send COS appId or physical bucket names.
Responses
Success
- dataobjectrequired
- tenantobjectrequired
- membershipobjectrequired
- metaobjectrequired
Response example
{
"data": {
"tenant": {
"id": "00000000-0000-0000-0000-000000000000",
"slug": "string",
"name": "string",
"status": "string",
"storageKey": "string"
},
"membership": {
"id": "00000000-0000-0000-0000-000000000000",
"tenantId": "00000000-0000-0000-0000-000000000000",
"tenant": {
"id": "00000000-0000-0000-0000-000000000000",
"slug": "string",
"name": "string",
"status": "string",
"storageKey": "string"
},
"role": "string",
"status": "string",
"joinedAt": "string"
}
},
"meta": {
"requestId": "018f0000-0000-7000-8000-0000000000aa"
}
}Servershttps://api.embodiflow.io/v1https://api.embodiflow.dev/v1