Departments
Create a new department
Create a department within the caller's organization. Name must be unique per-org; provided managerIds/userIds are validated against the same org.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/departments" \ -H "Content-Type: application/json" \ -d '{ "name": "Sales", "description": "Inbound + outbound sales reps", "managerIds": [ "65b1f0a2c3d4e5f6a7b8c9e0" ], "userIds": [ "65b1f0a2c3d4e5f6a7b8c9d0", "65b1f0a2c3d4e5f6a7b8c9d1" ] }'{ "department": { "_id": "65c1a0b0c0d0e0f0a0b0c0d1", "name": "Sales", "description": "Inbound + outbound sales reps", "organizationId": "65a0e0e0e0e0e0e0e0e0e0e0", "createdAt": "2026-01-12T09:00:00.000Z", "updatedAt": "2026-04-04T12:30:00.000Z" }}