POST
/api/public/v1/departmentsCreate a department
Create a new department in your organization.
Request Body
| Property | Type | Description |
|---|---|---|
name | string | Department name (unique per org). |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/departments" \
-H "X-Organization-Id: your_org_id" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Engineering"
}'200Example response
json
{
"message": "Department created successfully!",
"content": {
"department": {
"id": "dept_1",
"name": "Engineering"
}
}
}