Create department
Create department. See the OpenAPI-defined parameters, request body, and responses below.
POST
/DepartmentCreate department. See the OpenAPI-defined parameters, request body, and responses below.
OpenAPI description: Cria um departamento com nome, cota mensal em BRL e membros informados em TenantUserIds. Os membros devem pertencer ao tenant autenticado. Cota null significa ilimitada; zero bloqueia o uso; valores negativos são inválidos.
Authentication
Authentication required. Send your user API key in the X-API-Key header.
Parameters
This operation has no path, query, or header parameters.
Request body
Content type: application/json · Schema: DepartmentDto
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | integer · int32 | No | — | — |
tenantId | integer · int32 | No | — | — |
name | string | Yes | — | minLength: 1; maxLength: 300 |
monthlyQuotaAmount | number · double | No | — | nullable; min: 0; max: 99999999999999 |
tenantUserIds | array<integer · int32> | No | — | nullable |
Example request
curl --request POST \
--url 'https://api.zild.ai/Department' \
--header 'X-API-Key: YOUR_USER_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"id": 0,
"tenantId": 0,
"name": "string",
"monthlyQuotaAmount": 0,
"tenantUserIds": [
0
]
}'
Responses
| Status | Description | Response body |
|---|---|---|
201 | Departamento criado. | application/json · DepartmentDto |
Example response (201):
{
"id": 0,
"tenantId": 0,
"name": "string",
"monthlyQuotaAmount": 0,
"tenantUserIds": [
0
]
}
Data models
DepartmentDto
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | integer · int32 | No | — | — |
tenantId | integer · int32 | No | — | — |
name | string | Yes | — | minLength: 1; maxLength: 300 |
monthlyQuotaAmount | number · double | No | — | nullable; min: 0; max: 99999999999999 |
tenantUserIds | array<integer · int32> | No | — | nullable |