Pular para o conteúdo principal
POST
/
v1
/
organizations
/
{organization_id}
/
tenants
curl --request POST \
  --url https://api.flexxible.net/v1/organizations/{organization_id}/tenants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Tenant de producción",
  "product_config_id": "507f1f77bcf86cd799439030",
  "organization_email": "[email protected]",
  "organization_language": "en",
  "organization_country": "US",
  "organization_industry": "Tecnología"
}
'
{
  "id": "<string>",
  "organization_id": "<string>",
  "create_date": "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>"
}
}

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parâmetros de caminho

organization_id
string
obrigatório

O identificador único da organização proprietária que criará o tenant

Maximum string length: 24
Pattern: ^[0-9a-f]{24}$

Corpo

application/json
name
string
obrigatório
Maximum string length: 512
product_config_id
string
obrigatório
Maximum string length: 24
Pattern: ^[0-9a-f]{24}$
organization_email
string
obrigatório
Maximum string length: 512
organization_language
string
obrigatório
Maximum string length: 512
organization_country
string
obrigatório
Maximum string length: 512
organization_industry
string
obrigatório
Maximum string length: 512
policy_id
string
Maximum string length: 24
Pattern: ^[0-9a-f]{24}$

Resposta

Tenant e organização associados criados corretamente. Retorna o recurso tenant criado.

id
string
obrigatório
organization_id
string
obrigatório

ID da organização do tenant

create_date
string<date-time>
obrigatório
name
string
obrigatório
region
string
obrigatório
product_id
string | null

ID do produto (nullable)

policy_id
string | null

ID da política (nullable)