POST
/api/public/v1/departments

Create a department

Create a new department in your company.

Request Body

PropertyTypeDescription
namestringDepartment name (unique per company).
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/departments" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Engineering"
  }'
200Example response
json
{
  "message": "Department created successfully!",
  "content": {
    "department": {
      "id": "dept_1",
      "name": "Engineering"
    }
  }
}