Skip to Content

Reject a document

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
POST
/api/v1/documents/{id}/approval/reject

Reject a pending document. A comment is required explaining the reason. Rejection is fail-fast — one rejected step rejects the whole chain — and the document status returns to DRAFT so the creator can make changes and resubmit.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string

Header Parameters

authorization*string

Bearer token for API authentication

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body

Reject a document

comment*string

Required comment explaining why the document was rejected

Length1 <= length

Response Body

Document approval status

application/json
  1. response

Document approval status

id*string

Approval ID

documentId*string

Document ID

status*string

Overall approval status, derived from the chain: REJECTED if any step was rejected, PENDING if any step is still pending, otherwise APPROVED

Value in"PENDING""APPROVED""REJECTED"
autoSend*boolean

Whether the document is sent automatically once the chain fully approves

approvers*array<>

The ordered approval chain

requestedBy*

The user who submitted for approval

customMessage*|

Custom message for signing invitation

createdAt*unknown

When the approval was requested

Example Request
curl -X POST 'https://app.sajn.se/api/v1/documents/string/approval/reject' \  -H 'authorization: string' \  -H 'Content-Type: application/json' \  -d '{  "comment": "string"}'
Example Response
{  "id": "string",  "documentId": "string",  "status": "PENDING",  "autoSend": true,  "approvers": [    {      "approverId": "string",      "name": "string",      "email": "string",      "order": 0,      "status": "PENDING",      "comment": "string",      "resolvedAt": null    }  ],  "requestedBy": {    "id": "string",    "firstName": "string",    "lastName": "string",    "email": "string"  },  "customMessage": "string",  "createdAt": null}

Was this page helpful?