POST
/api/public/v1/time-off-requests/{requestId}/cancelWithdraw a time-off request
Withdraws the token holder’s own request — you cannot cancel somebody else’s. Not limited to pending ones: plans change after an approval, a requester with no manager only ever has approved requests, and clearing out a denied one is their own record-keeping. Whoever was on the hook for it — the reviewer who approved it, else the manager it was waiting on — is told.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
hr:write
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
requestId | string | Required | Request ID. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/time-off-requests/{requestId}/cancel" \
-H "Authorization: Bearer your_access_token"200Example response
json
{
"message": "Request cancelled.",
"content": {
"requestId": "tor_31aa"
}
}409Example response
json
{
"message": "This request has already been cancelled."
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.