Skip to Content
Documents

List document files

GET
/api/v1/documents/{id}/files

Lists the files of a document that are ready to download, each with a pre-signed URL that works for 15 minutes.

  • ORIGINAL: the unsigned source document, after the document is sent and sajn has generated the PDF. It's ready when document.sent fires. For a QES document, and for some documents where a party picks products, sajn generates it after the parties have filled in their fields. A draft has no ORIGINAL.
  • SIGNED: the signed and sealed copy, after the document is completed and sealed.
  • JOURNAL: the signing journal (audit trail), after the document is completed.

A file that isn't ready yet isn't listed. Every URL in the response counts as a download in the document's audit trail.

Authorization

headerAuthorizationBearer <token>

API key, e.g. Authorization: Bearer sajn_svc_.... Not scope-limited: acts with its owner's workspace role.

Path Parameters

id*string

The document ID.

Header Parameters

Sajn-Version?string

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Value in"2026-09""2026-10"
Sajn-Workspace?string

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.

Response Body

200

application/json
  1. response
data*array<>
hasMore*false

Always false: the list returns every item in one response.

Defaultfalse
Value infalse
nextCursor*null

Always null: the list returns every item in one response.

Defaultnull
Example Request
curl -X GET 'https://app.sajn.se/api/v1/documents/cm4k2x9p10003abcd1234efgh/files'
Example Response
{  "data": [    {      "type": "ORIGINAL",      "url": "https://files.sajn.se/files/anstallningsavtal-kai-lindqvist.pdf",      "expiresAt": "2026-10-28T22:00:00.000Z"    }  ],  "hasMore": false,  "nextCursor": null}

Was this page helpful?