PATCH
/api/public/v1/departments/{departmentId}

Update a department

Rename a department.

Path Parameters

NameTypeRequiredDescription
departmentIdstring
Required
Department ID.

Request Body

PropertyTypeDescription
namestringNew department name.
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/departments/{departmentId}" \
  -H "X-Organization-Id: your_org_id" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "R&D"
  }'
200Example response
json
{
  "message": "Department updated successfully!",
  "content": {
    "department": {
      "id": "dept_1"
    }
  }
}