Cancel an approval request
Cancels a PENDING request. Only the user who submitted it can cancel it. sajn deletes the request, so the response is the last state of the request with status set to CANCELLED, and GET /api/v1/approval-requests/{id} returns 404 afterwards. The approval_request.cancelled event carries the same last state, so it’s the only record of the request. The document returns to DRAFT.
Permission required: SEND_DOCUMENT on the workspace.
Authorizations
Headers
ID of the workspace this request acts in, from GET /api/v1/workspaces. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns 403 WORKSPACE_ACCESS_DENIED.
Body
Body
The body is of type object.
Response
An internal approval request for a document
An internal approval request for a document
DRAFT while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; PENDING while it waits for approvers; APPROVED once every stage approves; REJECTED after any approver rejects; CANCELLED only in the response to the cancel request and in the approval_request.cancelled event, because a cancelled request is deleted.
DRAFT, PENDING, APPROVED, REJECTED, CANCELLED 
