POST
/api/public/v1/departments

Create a department

Create a new department in your organization.

Request Body

PropertyTypeDescription
namestringDepartment 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"
    }
  }
}