Tenants
Create a tenant
Create a new tenant and an associated organization for the specified owner organization. The request body uses a type discriminator with exclusive routes: tenant (END CUSTOMER) and organization (PARTNER/WHOLESALER).
POST
/
v2
/
organizations
/
{organization_id}
/
tenants
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "tenant",
"name": "Tenant de producción",
"tenant_config": {
"product_config_id": "507f1f77bcf86cd799439030",
"analyzer": "existing"
},
"policy_id": "507f1f77bcf86cd799439050",
"organization_email": "[email protected]",
"organization_language": "en",
"organization_country": "US",
"organization_industry": "Tecnología"
}
'{
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"region": "<string>",
"product_id": "<string>",
"policy_id": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}Authorizations
Path Parameters
Body
application/json
Unique creation body with conditional fields by type: if type=tenant, requires tenant_config; if type=organization, requires organization_config.
Response
Tenant and associated organization successfully created. Returns the created tenant resource.
⌘I
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "tenant",
"name": "Tenant de producción",
"tenant_config": {
"product_config_id": "507f1f77bcf86cd799439030",
"analyzer": "existing"
},
"policy_id": "507f1f77bcf86cd799439050",
"organization_email": "[email protected]",
"organization_language": "en",
"organization_country": "US",
"organization_industry": "Tecnología"
}
'{
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"region": "<string>",
"product_id": "<string>",
"policy_id": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}