curl --request GET \
--url https://app.sajn.se/api/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'authorization: <authorization>'import requests
url = "https://app.sajn.se/api/v1/documents"
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', Authorization: 'Bearer <token>'}
};
fetch('https://app.sajn.se/api/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sajn.se/api/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/documents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sajn.se/api/v1/documents")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"documents": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"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>"
},
"completedAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"totalPages": 123,
"hasNextPage": true,
"nextCursor": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}List all 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.
curl --request GET \
--url https://app.sajn.se/api/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'authorization: <authorization>'import requests
url = "https://app.sajn.se/api/v1/documents"
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', Authorization: 'Bearer <token>'}
};
fetch('https://app.sajn.se/api/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sajn.se/api/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/documents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sajn.se/api/v1/documents")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"documents": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"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>"
},
"completedAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"totalPages": 123,
"hasNextPage": true,
"nextCursor": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}Authorizations
OAuth 2.0 access token for a connected application. Limited to the scopes granted at consent.
Headers
Bearer token for API authentication
Query Parameters
Response
Paginated list of documents
Paginated list of documents
Array of documents
Show child attributes
Show child attributes
Total number of documents matching the filters
Total number of pages available (page-based pagination)
Whether more documents exist after this page
Cursor for the next page, or null on the last page. Pass it as cursor on the next request.
Was this page helpful?

