# Create department

Create department. See the OpenAPI-defined parameters, request body, and responses below.

Source: https://zild.ai/en-US/docs/api-reference/post-api-Department

POST `/Department`

Create 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`



<table class="api-params"><thead><tr><th>Property</th><th>Type</th><th>Required</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>tenantId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Yes</td><td>—</td><td>minLength: 1; maxLength: 300</td></tr><tr><td><code>monthlyQuotaAmount</code></td><td><code>number · double</code></td><td>No</td><td>—</td><td>nullable; min: 0; max: 99999999999999</td></tr><tr><td><code>tenantUserIds</code></td><td><code>array&lt;integer · int32&gt;</code></td><td>No</td><td>—</td><td>nullable</td></tr></tbody></table>



## 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



<table class="api-params"><thead><tr><th>Status</th><th>Description</th><th>Response body</th></tr></thead><tbody><tr><td><code>201</code></td><td>Departamento criado.</td><td><code>application/json</code> · <code>DepartmentDto</code></td></tr></tbody></table>

**Example response (201):**



```
{
  "id": 0,
  "tenantId": 0,
  "name": "string",
  "monthlyQuotaAmount": 0,
  "tenantUserIds": [
    0
  ]
}
```



## Data models

`DepartmentDto`

<table class="api-params"><thead><tr><th>Property</th><th>Type</th><th>Required</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>tenantId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Yes</td><td>—</td><td>minLength: 1; maxLength: 300</td></tr><tr><td><code>monthlyQuotaAmount</code></td><td><code>number · double</code></td><td>No</td><td>—</td><td>nullable; min: 0; max: 99999999999999</td></tr><tr><td><code>tenantUserIds</code></td><td><code>array&lt;integer · int32&gt;</code></td><td>No</td><td>—</td><td>nullable</td></tr></tbody></table>
