Skip to Content

List all documents

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.
GET
/api/v1/documents

Retrieve a paginated list of all documents in your workspace.

Documents can be filtered and sorted. The response includes basic document information and metadata. Use the 'getDocument' endpoint to retrieve full document details including parties and fields.

Page-based pagination: page and perPage (max 100). The response carries total and totalPages.

Cursor pagination (recommended for sync): pass nextCursor from the previous response as cursor. Cursor pages are stable while documents change underneath, which page numbers are not. Requires orderBy createdAt or updatedAt (the default). page is ignored when cursor is set.

Incremental sync: filter with updatedAfter set to the newest updatedAt you have stored, order by updatedAt ascending, and walk the cursor until hasNextPage is false.

Authorization

headerAuthorizationBearer <token>

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

Query Parameters

Header Parameters

authorization*string

Bearer token for API authentication

Response Body

Paginated list of documents

application/json
  1. response

Paginated list of documents

documents*array<>

Array of documents

total*number

Total number of documents matching the filters

totalPages*number

Total number of pages available (page-based pagination)

hasNextPage*boolean

Whether more documents exist after this page

nextCursor*|

Cursor for the next page, or null on the last page. Pass it as cursor on the next request.

Example Request
curl -X GET 'https://app.sajn.se/api/v1/documents?page=1&perPage=10&orderBy=%22createdAt%22&orderDirection=%22asc%22' \  -H 'authorization: string'
Example Response
{  "documents": [    {      "id": "string",      "externalId": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "name": "string",      "status": "string",      "documentMeta": {        "subject": "string",        "message": "string",        "signingOrder": "PARALLEL",        "forceReadFullDocument": true,        "showChatToSigners": true,        "preferredLanguage": "sv",        "value": "string",        "redirectUrl": "string",        "redirectEnabled": true,        "internalRecipients": [          "string"        ],        "signableAfterExpired": true,        "sendPlainTextEmailOnly": true,        "reminderIntervalDays": "string",        "allowDelegation": true,        "accessVerification": "NONE",        "aiChatEnabled": true,        "ssnDisplayMode": "FULL",        "sameDeviceSigning": true,        "documentCategoryId": "string"      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "completedAt": "2019-08-24T14:15:22Z"    }  ],  "total": 0,  "totalPages": 0,  "hasNextPage": true,  "nextCursor": "string"}

Was this page helpful?