curl --request PATCH \
--url https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upsert": [
{
"id": "cm4k2x9p10009abcd1234efgh",
"page": 1,
"rect": {
"x": 0.12,
"y": 0.76,
"width": 0.3,
"height": 0.06
},
"pageWidth": 595.28,
"pageHeight": 841.89,
"pageRotation": 0,
"name": "Anställningsvillkor",
"key": "startdatum",
"locked": false,
"style": {
"fontSize": 6,
"color": "#2563EB",
"bold": false,
"italic": false,
"align": "LEFT"
},
"kind": "INPUT",
"inputType": "TEXT",
"label": "Startdatum",
"fillSource": "SIGNER",
"partyId": "cm4k2x9p10004abcd1234efgh",
"variableId": "startdatum",
"required": true,
"options": [
"Heltid"
],
"multiline": false,
"unit": "RELATIVE",
"origin": "TOP_LEFT"
}
],
"remove": [
"Anställningsvillkor"
]
}
'import requests
url = "https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields"
payload = {
"upsert": [
{
"id": "cm4k2x9p10009abcd1234efgh",
"page": 1,
"rect": {
"x": 0.12,
"y": 0.76,
"width": 0.3,
"height": 0.06
},
"pageWidth": 595.28,
"pageHeight": 841.89,
"pageRotation": 0,
"name": "Anställningsvillkor",
"key": "startdatum",
"locked": False,
"style": {
"fontSize": 6,
"color": "#2563EB",
"bold": False,
"italic": False,
"align": "LEFT"
},
"kind": "INPUT",
"inputType": "TEXT",
"label": "Startdatum",
"fillSource": "SIGNER",
"partyId": "cm4k2x9p10004abcd1234efgh",
"variableId": "startdatum",
"required": True,
"options": ["Heltid"],
"multiline": False,
"unit": "RELATIVE",
"origin": "TOP_LEFT"
}
],
"remove": ["Anställningsvillkor"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upsert: [
{
id: 'cm4k2x9p10009abcd1234efgh',
page: 1,
rect: {x: 0.12, y: 0.76, width: 0.3, height: 0.06},
pageWidth: 595.28,
pageHeight: 841.89,
pageRotation: 0,
name: 'Anställningsvillkor',
key: 'startdatum',
locked: false,
style: {fontSize: 6, color: '#2563EB', bold: false, italic: false, align: 'LEFT'},
kind: 'INPUT',
inputType: 'TEXT',
label: 'Startdatum',
fillSource: 'SIGNER',
partyId: 'cm4k2x9p10004abcd1234efgh',
variableId: 'startdatum',
required: true,
options: ['Heltid'],
multiline: false,
unit: 'RELATIVE',
origin: 'TOP_LEFT'
}
],
remove: ['Anställningsvillkor']
})
};
fetch('https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields', 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/templates/{id}/content/{contentId}/placed-fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'upsert' => [
[
'id' => 'cm4k2x9p10009abcd1234efgh',
'page' => 1,
'rect' => [
'x' => 0.12,
'y' => 0.76,
'width' => 0.3,
'height' => 0.06
],
'pageWidth' => 595.28,
'pageHeight' => 841.89,
'pageRotation' => 0,
'name' => 'Anställningsvillkor',
'key' => 'startdatum',
'locked' => false,
'style' => [
'fontSize' => 6,
'color' => '#2563EB',
'bold' => false,
'italic' => false,
'align' => 'LEFT'
],
'kind' => 'INPUT',
'inputType' => 'TEXT',
'label' => 'Startdatum',
'fillSource' => 'SIGNER',
'partyId' => 'cm4k2x9p10004abcd1234efgh',
'variableId' => 'startdatum',
'required' => true,
'options' => [
'Heltid'
],
'multiline' => false,
'unit' => 'RELATIVE',
'origin' => 'TOP_LEFT'
]
],
'remove' => [
'Anställningsvillkor'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields"
payload := strings.NewReader("{\n \"upsert\": [\n {\n \"id\": \"cm4k2x9p10009abcd1234efgh\",\n \"page\": 1,\n \"rect\": {\n \"x\": 0.12,\n \"y\": 0.76,\n \"width\": 0.3,\n \"height\": 0.06\n },\n \"pageWidth\": 595.28,\n \"pageHeight\": 841.89,\n \"pageRotation\": 0,\n \"name\": \"Anställningsvillkor\",\n \"key\": \"startdatum\",\n \"locked\": false,\n \"style\": {\n \"fontSize\": 6,\n \"color\": \"#2563EB\",\n \"bold\": false,\n \"italic\": false,\n \"align\": \"LEFT\"\n },\n \"kind\": \"INPUT\",\n \"inputType\": \"TEXT\",\n \"label\": \"Startdatum\",\n \"fillSource\": \"SIGNER\",\n \"partyId\": \"cm4k2x9p10004abcd1234efgh\",\n \"variableId\": \"startdatum\",\n \"required\": true,\n \"options\": [\n \"Heltid\"\n ],\n \"multiline\": false,\n \"unit\": \"RELATIVE\",\n \"origin\": \"TOP_LEFT\"\n }\n ],\n \"remove\": [\n \"Anställningsvillkor\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upsert\": [\n {\n \"id\": \"cm4k2x9p10009abcd1234efgh\",\n \"page\": 1,\n \"rect\": {\n \"x\": 0.12,\n \"y\": 0.76,\n \"width\": 0.3,\n \"height\": 0.06\n },\n \"pageWidth\": 595.28,\n \"pageHeight\": 841.89,\n \"pageRotation\": 0,\n \"name\": \"Anställningsvillkor\",\n \"key\": \"startdatum\",\n \"locked\": false,\n \"style\": {\n \"fontSize\": 6,\n \"color\": \"#2563EB\",\n \"bold\": false,\n \"italic\": false,\n \"align\": \"LEFT\"\n },\n \"kind\": \"INPUT\",\n \"inputType\": \"TEXT\",\n \"label\": \"Startdatum\",\n \"fillSource\": \"SIGNER\",\n \"partyId\": \"cm4k2x9p10004abcd1234efgh\",\n \"variableId\": \"startdatum\",\n \"required\": true,\n \"options\": [\n \"Heltid\"\n ],\n \"multiline\": false,\n \"unit\": \"RELATIVE\",\n \"origin\": \"TOP_LEFT\"\n }\n ],\n \"remove\": [\n \"Anställningsvillkor\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upsert\": [\n {\n \"id\": \"cm4k2x9p10009abcd1234efgh\",\n \"page\": 1,\n \"rect\": {\n \"x\": 0.12,\n \"y\": 0.76,\n \"width\": 0.3,\n \"height\": 0.06\n },\n \"pageWidth\": 595.28,\n \"pageHeight\": 841.89,\n \"pageRotation\": 0,\n \"name\": \"Anställningsvillkor\",\n \"key\": \"startdatum\",\n \"locked\": false,\n \"style\": {\n \"fontSize\": 6,\n \"color\": \"#2563EB\",\n \"bold\": false,\n \"italic\": false,\n \"align\": \"LEFT\"\n },\n \"kind\": \"INPUT\",\n \"inputType\": \"TEXT\",\n \"label\": \"Startdatum\",\n \"fillSource\": \"SIGNER\",\n \"partyId\": \"cm4k2x9p10004abcd1234efgh\",\n \"variableId\": \"startdatum\",\n \"required\": true,\n \"options\": [\n \"Heltid\"\n ],\n \"multiline\": false,\n \"unit\": \"RELATIVE\",\n \"origin\": \"TOP_LEFT\"\n }\n ],\n \"remove\": [\n \"Anställningsvillkor\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "cm4k2x9p10009abcd1234efgh",
"documentId": "cm4k2x9p10003abcd1234efgh",
"templateId": null,
"type": "TEXT",
"position": 0,
"fieldMeta": {
"type": "TEXT",
"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
},
"createdAt": "2026-09-28T09:12:00.000Z",
"updatedAt": "2026-09-28T09:12:00.000Z"
}{
"code": "INVALID_API_VERSION",
"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
"userMessage": "API-versionen finns inte.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "UNAUTHORIZED",
"message": "Invalid API token",
"userMessage": "Ogiltig API-nyckel",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "INSUFFICIENT_SCOPE",
"message": "Insufficient OAuth scope: requires templates:write",
"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"requiredScopes": [
"templates:write"
],
"grantedScopes": [
"profile:read"
]
}{
"code": "NOT_FOUND",
"message": "Content block not found",
"userMessage": "Resursen hittades inte.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"resource": "field"
}{
"code": "INVALID_STATE",
"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "RATE_LIMITED",
"message": "API rate limit exceeded",
"userMessage": "För många förfrågningar. Försök igen om en stund.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"userMessage": "Något gick fel.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "UPSTREAM_UNAVAILABLE",
"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}Add, update, or remove boxes on a template PDF block
Changes individual boxes on a template PDF field, the same way as PATCH /api/v1/documents/{id}/content/{contentId}/placed-fields, with partyId referring to a template party. The response is the updated field.
curl --request PATCH \
--url https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upsert": [
{
"id": "cm4k2x9p10009abcd1234efgh",
"page": 1,
"rect": {
"x": 0.12,
"y": 0.76,
"width": 0.3,
"height": 0.06
},
"pageWidth": 595.28,
"pageHeight": 841.89,
"pageRotation": 0,
"name": "Anställningsvillkor",
"key": "startdatum",
"locked": false,
"style": {
"fontSize": 6,
"color": "#2563EB",
"bold": false,
"italic": false,
"align": "LEFT"
},
"kind": "INPUT",
"inputType": "TEXT",
"label": "Startdatum",
"fillSource": "SIGNER",
"partyId": "cm4k2x9p10004abcd1234efgh",
"variableId": "startdatum",
"required": true,
"options": [
"Heltid"
],
"multiline": false,
"unit": "RELATIVE",
"origin": "TOP_LEFT"
}
],
"remove": [
"Anställningsvillkor"
]
}
'import requests
url = "https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields"
payload = {
"upsert": [
{
"id": "cm4k2x9p10009abcd1234efgh",
"page": 1,
"rect": {
"x": 0.12,
"y": 0.76,
"width": 0.3,
"height": 0.06
},
"pageWidth": 595.28,
"pageHeight": 841.89,
"pageRotation": 0,
"name": "Anställningsvillkor",
"key": "startdatum",
"locked": False,
"style": {
"fontSize": 6,
"color": "#2563EB",
"bold": False,
"italic": False,
"align": "LEFT"
},
"kind": "INPUT",
"inputType": "TEXT",
"label": "Startdatum",
"fillSource": "SIGNER",
"partyId": "cm4k2x9p10004abcd1234efgh",
"variableId": "startdatum",
"required": True,
"options": ["Heltid"],
"multiline": False,
"unit": "RELATIVE",
"origin": "TOP_LEFT"
}
],
"remove": ["Anställningsvillkor"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upsert: [
{
id: 'cm4k2x9p10009abcd1234efgh',
page: 1,
rect: {x: 0.12, y: 0.76, width: 0.3, height: 0.06},
pageWidth: 595.28,
pageHeight: 841.89,
pageRotation: 0,
name: 'Anställningsvillkor',
key: 'startdatum',
locked: false,
style: {fontSize: 6, color: '#2563EB', bold: false, italic: false, align: 'LEFT'},
kind: 'INPUT',
inputType: 'TEXT',
label: 'Startdatum',
fillSource: 'SIGNER',
partyId: 'cm4k2x9p10004abcd1234efgh',
variableId: 'startdatum',
required: true,
options: ['Heltid'],
multiline: false,
unit: 'RELATIVE',
origin: 'TOP_LEFT'
}
],
remove: ['Anställningsvillkor']
})
};
fetch('https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields', 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/templates/{id}/content/{contentId}/placed-fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'upsert' => [
[
'id' => 'cm4k2x9p10009abcd1234efgh',
'page' => 1,
'rect' => [
'x' => 0.12,
'y' => 0.76,
'width' => 0.3,
'height' => 0.06
],
'pageWidth' => 595.28,
'pageHeight' => 841.89,
'pageRotation' => 0,
'name' => 'Anställningsvillkor',
'key' => 'startdatum',
'locked' => false,
'style' => [
'fontSize' => 6,
'color' => '#2563EB',
'bold' => false,
'italic' => false,
'align' => 'LEFT'
],
'kind' => 'INPUT',
'inputType' => 'TEXT',
'label' => 'Startdatum',
'fillSource' => 'SIGNER',
'partyId' => 'cm4k2x9p10004abcd1234efgh',
'variableId' => 'startdatum',
'required' => true,
'options' => [
'Heltid'
],
'multiline' => false,
'unit' => 'RELATIVE',
'origin' => 'TOP_LEFT'
]
],
'remove' => [
'Anställningsvillkor'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields"
payload := strings.NewReader("{\n \"upsert\": [\n {\n \"id\": \"cm4k2x9p10009abcd1234efgh\",\n \"page\": 1,\n \"rect\": {\n \"x\": 0.12,\n \"y\": 0.76,\n \"width\": 0.3,\n \"height\": 0.06\n },\n \"pageWidth\": 595.28,\n \"pageHeight\": 841.89,\n \"pageRotation\": 0,\n \"name\": \"Anställningsvillkor\",\n \"key\": \"startdatum\",\n \"locked\": false,\n \"style\": {\n \"fontSize\": 6,\n \"color\": \"#2563EB\",\n \"bold\": false,\n \"italic\": false,\n \"align\": \"LEFT\"\n },\n \"kind\": \"INPUT\",\n \"inputType\": \"TEXT\",\n \"label\": \"Startdatum\",\n \"fillSource\": \"SIGNER\",\n \"partyId\": \"cm4k2x9p10004abcd1234efgh\",\n \"variableId\": \"startdatum\",\n \"required\": true,\n \"options\": [\n \"Heltid\"\n ],\n \"multiline\": false,\n \"unit\": \"RELATIVE\",\n \"origin\": \"TOP_LEFT\"\n }\n ],\n \"remove\": [\n \"Anställningsvillkor\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upsert\": [\n {\n \"id\": \"cm4k2x9p10009abcd1234efgh\",\n \"page\": 1,\n \"rect\": {\n \"x\": 0.12,\n \"y\": 0.76,\n \"width\": 0.3,\n \"height\": 0.06\n },\n \"pageWidth\": 595.28,\n \"pageHeight\": 841.89,\n \"pageRotation\": 0,\n \"name\": \"Anställningsvillkor\",\n \"key\": \"startdatum\",\n \"locked\": false,\n \"style\": {\n \"fontSize\": 6,\n \"color\": \"#2563EB\",\n \"bold\": false,\n \"italic\": false,\n \"align\": \"LEFT\"\n },\n \"kind\": \"INPUT\",\n \"inputType\": \"TEXT\",\n \"label\": \"Startdatum\",\n \"fillSource\": \"SIGNER\",\n \"partyId\": \"cm4k2x9p10004abcd1234efgh\",\n \"variableId\": \"startdatum\",\n \"required\": true,\n \"options\": [\n \"Heltid\"\n ],\n \"multiline\": false,\n \"unit\": \"RELATIVE\",\n \"origin\": \"TOP_LEFT\"\n }\n ],\n \"remove\": [\n \"Anställningsvillkor\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/templates/{id}/content/{contentId}/placed-fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upsert\": [\n {\n \"id\": \"cm4k2x9p10009abcd1234efgh\",\n \"page\": 1,\n \"rect\": {\n \"x\": 0.12,\n \"y\": 0.76,\n \"width\": 0.3,\n \"height\": 0.06\n },\n \"pageWidth\": 595.28,\n \"pageHeight\": 841.89,\n \"pageRotation\": 0,\n \"name\": \"Anställningsvillkor\",\n \"key\": \"startdatum\",\n \"locked\": false,\n \"style\": {\n \"fontSize\": 6,\n \"color\": \"#2563EB\",\n \"bold\": false,\n \"italic\": false,\n \"align\": \"LEFT\"\n },\n \"kind\": \"INPUT\",\n \"inputType\": \"TEXT\",\n \"label\": \"Startdatum\",\n \"fillSource\": \"SIGNER\",\n \"partyId\": \"cm4k2x9p10004abcd1234efgh\",\n \"variableId\": \"startdatum\",\n \"required\": true,\n \"options\": [\n \"Heltid\"\n ],\n \"multiline\": false,\n \"unit\": \"RELATIVE\",\n \"origin\": \"TOP_LEFT\"\n }\n ],\n \"remove\": [\n \"Anställningsvillkor\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "cm4k2x9p10009abcd1234efgh",
"documentId": "cm4k2x9p10003abcd1234efgh",
"templateId": null,
"type": "TEXT",
"position": 0,
"fieldMeta": {
"type": "TEXT",
"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
},
"createdAt": "2026-09-28T09:12:00.000Z",
"updatedAt": "2026-09-28T09:12:00.000Z"
}{
"code": "INVALID_API_VERSION",
"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
"userMessage": "API-versionen finns inte.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "UNAUTHORIZED",
"message": "Invalid API token",
"userMessage": "Ogiltig API-nyckel",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "INSUFFICIENT_SCOPE",
"message": "Insufficient OAuth scope: requires templates:write",
"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"requiredScopes": [
"templates:write"
],
"grantedScopes": [
"profile:read"
]
}{
"code": "NOT_FOUND",
"message": "Content block not found",
"userMessage": "Resursen hittades inte.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"resource": "field"
}{
"code": "INVALID_STATE",
"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "RATE_LIMITED",
"message": "API rate limit exceeded",
"userMessage": "För många förfrågningar. Försök igen om en stund.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"userMessage": "Något gick fel.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}{
"code": "UPSTREAM_UNAVAILABLE",
"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
}Authorizations
Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
Headers
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.
2026-09, 2026-10 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.
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.
255Body
Body
Boxes to add or replace. A box whose id already exists on the field replaces that box and keeps its stacking order; any other box is added on top.
500A box placed on a page of a PDF field
- Option 1
- Option 2
Show child attributes
Show child attributes
Ids of boxes to remove from the field.
5001Response
200
Unique field identifier
Document this field belongs to
Template this field belongs to
Field type
TEXT, HTML, FORM, PDF, PRODUCT_TABLE, TABLE, SPACER, PAGE_BREAK, DURATION 0-based order of the field among the document's content blocks
Type-specific content. For PDF fields this includes placedFields (boxes placed on the PDF pages) and formFields (form fields extracted from the PDF).
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Show child attributes
Show child attributes
Date and time when the field was created
Date and time when the field was last updated
Was this page helpful?

