PATCH
/api/public/v1/departments/{departmentId}Update a department
Rename a department.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
departmentId | string | Required | Department ID. |
Request Body
| Property | Type | Description |
|---|---|---|
name | string | New 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"
}
}
}