curl --request PATCH \
--url https://app.sajn.se/api/v1/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Anställningsavtal",
"templateMeta": {
"signingMode": "PARALLEL",
"forceReadFullDocument": false,
"showChatToSigners": false,
"value": "540000",
"signableAfterExpired": false,
"sendPlainTextEmailOnly": false,
"allowDelegation": false,
"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
"internalRecipients": [
"[email protected]"
],
"visibility": "EVERYONE",
"selectedUserIds": [
"cm4k2x9p10008abcd1234efgh"
],
"language": "sv",
"reminderIntervalDays": 3,
"openVerification": "PIN",
"nationalIdDisplayMode": "FULL",
"sameDeviceSigning": false,
"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
}
}
'import requests
url = "https://app.sajn.se/api/v1/templates/{id}"
payload = {
"name": "Anställningsavtal",
"templateMeta": {
"signingMode": "PARALLEL",
"forceReadFullDocument": False,
"showChatToSigners": False,
"value": "540000",
"signableAfterExpired": False,
"sendPlainTextEmailOnly": False,
"allowDelegation": False,
"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
"internalRecipients": ["[email protected]"],
"visibility": "EVERYONE",
"selectedUserIds": ["cm4k2x9p10008abcd1234efgh"],
"language": "sv",
"reminderIntervalDays": 3,
"openVerification": "PIN",
"nationalIdDisplayMode": "FULL",
"sameDeviceSigning": False,
"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
}
}
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({
name: 'Anställningsavtal',
templateMeta: {
signingMode: 'PARALLEL',
forceReadFullDocument: false,
showChatToSigners: false,
value: '540000',
signableAfterExpired: false,
sendPlainTextEmailOnly: false,
allowDelegation: false,
responsibleUserId: 'cm4k2x9p10002abcd1234efgh',
internalRecipients: ['[email protected]'],
visibility: 'EVERYONE',
selectedUserIds: ['cm4k2x9p10008abcd1234efgh'],
language: 'sv',
reminderIntervalDays: 3,
openVerification: 'PIN',
nationalIdDisplayMode: 'FULL',
sameDeviceSigning: false,
documentCategoryId: 'cm4k2x9p10017abcd1234efgh'
}
})
};
fetch('https://app.sajn.se/api/v1/templates/{id}', 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}",
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([
'name' => 'Anställningsavtal',
'templateMeta' => [
'signingMode' => 'PARALLEL',
'forceReadFullDocument' => false,
'showChatToSigners' => false,
'value' => '540000',
'signableAfterExpired' => false,
'sendPlainTextEmailOnly' => false,
'allowDelegation' => false,
'responsibleUserId' => 'cm4k2x9p10002abcd1234efgh',
'internalRecipients' => [
'[email protected]'
],
'visibility' => 'EVERYONE',
'selectedUserIds' => [
'cm4k2x9p10008abcd1234efgh'
],
'language' => 'sv',
'reminderIntervalDays' => 3,
'openVerification' => 'PIN',
'nationalIdDisplayMode' => 'FULL',
'sameDeviceSigning' => false,
'documentCategoryId' => 'cm4k2x9p10017abcd1234efgh'
]
]),
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}"
payload := strings.NewReader("{\n \"name\": \"Anställningsavtal\",\n \"templateMeta\": {\n \"signingMode\": \"PARALLEL\",\n \"forceReadFullDocument\": false,\n \"showChatToSigners\": false,\n \"value\": \"540000\",\n \"signableAfterExpired\": false,\n \"sendPlainTextEmailOnly\": false,\n \"allowDelegation\": false,\n \"responsibleUserId\": \"cm4k2x9p10002abcd1234efgh\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"visibility\": \"EVERYONE\",\n \"selectedUserIds\": [\n \"cm4k2x9p10008abcd1234efgh\"\n ],\n \"language\": \"sv\",\n \"reminderIntervalDays\": 3,\n \"openVerification\": \"PIN\",\n \"nationalIdDisplayMode\": \"FULL\",\n \"sameDeviceSigning\": false,\n \"documentCategoryId\": \"cm4k2x9p10017abcd1234efgh\"\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Anställningsavtal\",\n \"templateMeta\": {\n \"signingMode\": \"PARALLEL\",\n \"forceReadFullDocument\": false,\n \"showChatToSigners\": false,\n \"value\": \"540000\",\n \"signableAfterExpired\": false,\n \"sendPlainTextEmailOnly\": false,\n \"allowDelegation\": false,\n \"responsibleUserId\": \"cm4k2x9p10002abcd1234efgh\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"visibility\": \"EVERYONE\",\n \"selectedUserIds\": [\n \"cm4k2x9p10008abcd1234efgh\"\n ],\n \"language\": \"sv\",\n \"reminderIntervalDays\": 3,\n \"openVerification\": \"PIN\",\n \"nationalIdDisplayMode\": \"FULL\",\n \"sameDeviceSigning\": false,\n \"documentCategoryId\": \"cm4k2x9p10017abcd1234efgh\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/templates/{id}")
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 \"name\": \"Anställningsavtal\",\n \"templateMeta\": {\n \"signingMode\": \"PARALLEL\",\n \"forceReadFullDocument\": false,\n \"showChatToSigners\": false,\n \"value\": \"540000\",\n \"signableAfterExpired\": false,\n \"sendPlainTextEmailOnly\": false,\n \"allowDelegation\": false,\n \"responsibleUserId\": \"cm4k2x9p10002abcd1234efgh\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"visibility\": \"EVERYONE\",\n \"selectedUserIds\": [\n \"cm4k2x9p10008abcd1234efgh\"\n ],\n \"language\": \"sv\",\n \"reminderIntervalDays\": 3,\n \"openVerification\": \"PIN\",\n \"nationalIdDisplayMode\": \"FULL\",\n \"sameDeviceSigning\": false,\n \"documentCategoryId\": \"cm4k2x9p10017abcd1234efgh\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "cm4k2x9p10008abcd1234efgh",
"name": "Anställningsavtal",
"workspaceId": "cm4k2x9p10001abcd1234efgh",
"organizationId": "cm4k2x9p10000abcd1234efgh",
"createdBy": {
"id": "cm4k2x9p10002abcd1234efgh",
"email": "[email protected]",
"name": "Alex Berg"
},
"isGlobal": false,
"templateMeta": {
"signingMode": "PARALLEL",
"forceReadFullDocument": false,
"showChatToSigners": false,
"language": "sv",
"value": "540000",
"signableAfterExpired": false,
"sendPlainTextEmailOnly": false,
"allowDelegation": false,
"reminderIntervalDays": 3,
"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
"openVerification": "PIN",
"internalRecipients": [
"[email protected]"
],
"visibility": "EVERYONE",
"selectedUserIds": [
"cm4k2x9p10008abcd1234efgh"
],
"nationalIdDisplayMode": "FULL",
"sameDeviceSigning": false,
"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
},
"parties": [
{
"id": "cm4k2x9p10004abcd1234efgh",
"templateId": "cm4k2x9p10008abcd1234efgh",
"name": "Kai Lindqvist",
"email": "[email protected]",
"phone": "+46701740605",
"type": "INDIVIDUAL",
"role": "SIGNER",
"signingOrder": 1,
"contactId": "cm4k2x9p10006abcd1234efgh",
"company": null,
"externalId": "HR-2026-0142",
"nationalId": "191212121212",
"country": "SE",
"signatureMethod": "SE_BANKID",
"delivery": [
"EMAIL"
],
"signVerification": "PIN",
"createdAt": "2026-09-28T09:12:00.000Z",
"updatedAt": "2026-09-28T09:15:00.000Z"
}
],
"tags": [
{
"id": "cm4k2x9p10010abcd1234efgh",
"name": "Anställning",
"color": "#16A34A"
}
],
"content": [
{
"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"
}
],
"createdAt": "2026-09-28T09:12:00.000Z",
"updatedAt": "2026-09-28T09:15:00.000Z",
"deletedAt": null
}{
"code": "VALIDATION_FAILED",
"message": "Invalid input: expected string, received number",
"userMessage": "Förfrågan innehåller ogiltiga värden.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"issues": [
{
"path": "name",
"code": "INVALID_TYPE",
"message": "Invalid input: expected string, received number"
}
]
}{
"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": "Template not found",
"userMessage": "Resursen hittades inte.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"resource": "template"
}{
"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"
}Update a template
Update template properties.
Updatable Fields:
name- Template nametemplateMeta- Default settings for documents created from this template, such assigningModeandlanguage
The response is the template, in the same shape as GET /api/v1/templates/:id. A locked template can’t be updated: the request fails with an HTTP 409 Conflict status code and the code INVALID_STATE.
curl --request PATCH \
--url https://app.sajn.se/api/v1/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Anställningsavtal",
"templateMeta": {
"signingMode": "PARALLEL",
"forceReadFullDocument": false,
"showChatToSigners": false,
"value": "540000",
"signableAfterExpired": false,
"sendPlainTextEmailOnly": false,
"allowDelegation": false,
"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
"internalRecipients": [
"[email protected]"
],
"visibility": "EVERYONE",
"selectedUserIds": [
"cm4k2x9p10008abcd1234efgh"
],
"language": "sv",
"reminderIntervalDays": 3,
"openVerification": "PIN",
"nationalIdDisplayMode": "FULL",
"sameDeviceSigning": false,
"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
}
}
'import requests
url = "https://app.sajn.se/api/v1/templates/{id}"
payload = {
"name": "Anställningsavtal",
"templateMeta": {
"signingMode": "PARALLEL",
"forceReadFullDocument": False,
"showChatToSigners": False,
"value": "540000",
"signableAfterExpired": False,
"sendPlainTextEmailOnly": False,
"allowDelegation": False,
"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
"internalRecipients": ["[email protected]"],
"visibility": "EVERYONE",
"selectedUserIds": ["cm4k2x9p10008abcd1234efgh"],
"language": "sv",
"reminderIntervalDays": 3,
"openVerification": "PIN",
"nationalIdDisplayMode": "FULL",
"sameDeviceSigning": False,
"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
}
}
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({
name: 'Anställningsavtal',
templateMeta: {
signingMode: 'PARALLEL',
forceReadFullDocument: false,
showChatToSigners: false,
value: '540000',
signableAfterExpired: false,
sendPlainTextEmailOnly: false,
allowDelegation: false,
responsibleUserId: 'cm4k2x9p10002abcd1234efgh',
internalRecipients: ['[email protected]'],
visibility: 'EVERYONE',
selectedUserIds: ['cm4k2x9p10008abcd1234efgh'],
language: 'sv',
reminderIntervalDays: 3,
openVerification: 'PIN',
nationalIdDisplayMode: 'FULL',
sameDeviceSigning: false,
documentCategoryId: 'cm4k2x9p10017abcd1234efgh'
}
})
};
fetch('https://app.sajn.se/api/v1/templates/{id}', 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}",
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([
'name' => 'Anställningsavtal',
'templateMeta' => [
'signingMode' => 'PARALLEL',
'forceReadFullDocument' => false,
'showChatToSigners' => false,
'value' => '540000',
'signableAfterExpired' => false,
'sendPlainTextEmailOnly' => false,
'allowDelegation' => false,
'responsibleUserId' => 'cm4k2x9p10002abcd1234efgh',
'internalRecipients' => [
'[email protected]'
],
'visibility' => 'EVERYONE',
'selectedUserIds' => [
'cm4k2x9p10008abcd1234efgh'
],
'language' => 'sv',
'reminderIntervalDays' => 3,
'openVerification' => 'PIN',
'nationalIdDisplayMode' => 'FULL',
'sameDeviceSigning' => false,
'documentCategoryId' => 'cm4k2x9p10017abcd1234efgh'
]
]),
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}"
payload := strings.NewReader("{\n \"name\": \"Anställningsavtal\",\n \"templateMeta\": {\n \"signingMode\": \"PARALLEL\",\n \"forceReadFullDocument\": false,\n \"showChatToSigners\": false,\n \"value\": \"540000\",\n \"signableAfterExpired\": false,\n \"sendPlainTextEmailOnly\": false,\n \"allowDelegation\": false,\n \"responsibleUserId\": \"cm4k2x9p10002abcd1234efgh\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"visibility\": \"EVERYONE\",\n \"selectedUserIds\": [\n \"cm4k2x9p10008abcd1234efgh\"\n ],\n \"language\": \"sv\",\n \"reminderIntervalDays\": 3,\n \"openVerification\": \"PIN\",\n \"nationalIdDisplayMode\": \"FULL\",\n \"sameDeviceSigning\": false,\n \"documentCategoryId\": \"cm4k2x9p10017abcd1234efgh\"\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Anställningsavtal\",\n \"templateMeta\": {\n \"signingMode\": \"PARALLEL\",\n \"forceReadFullDocument\": false,\n \"showChatToSigners\": false,\n \"value\": \"540000\",\n \"signableAfterExpired\": false,\n \"sendPlainTextEmailOnly\": false,\n \"allowDelegation\": false,\n \"responsibleUserId\": \"cm4k2x9p10002abcd1234efgh\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"visibility\": \"EVERYONE\",\n \"selectedUserIds\": [\n \"cm4k2x9p10008abcd1234efgh\"\n ],\n \"language\": \"sv\",\n \"reminderIntervalDays\": 3,\n \"openVerification\": \"PIN\",\n \"nationalIdDisplayMode\": \"FULL\",\n \"sameDeviceSigning\": false,\n \"documentCategoryId\": \"cm4k2x9p10017abcd1234efgh\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/templates/{id}")
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 \"name\": \"Anställningsavtal\",\n \"templateMeta\": {\n \"signingMode\": \"PARALLEL\",\n \"forceReadFullDocument\": false,\n \"showChatToSigners\": false,\n \"value\": \"540000\",\n \"signableAfterExpired\": false,\n \"sendPlainTextEmailOnly\": false,\n \"allowDelegation\": false,\n \"responsibleUserId\": \"cm4k2x9p10002abcd1234efgh\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"visibility\": \"EVERYONE\",\n \"selectedUserIds\": [\n \"cm4k2x9p10008abcd1234efgh\"\n ],\n \"language\": \"sv\",\n \"reminderIntervalDays\": 3,\n \"openVerification\": \"PIN\",\n \"nationalIdDisplayMode\": \"FULL\",\n \"sameDeviceSigning\": false,\n \"documentCategoryId\": \"cm4k2x9p10017abcd1234efgh\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "cm4k2x9p10008abcd1234efgh",
"name": "Anställningsavtal",
"workspaceId": "cm4k2x9p10001abcd1234efgh",
"organizationId": "cm4k2x9p10000abcd1234efgh",
"createdBy": {
"id": "cm4k2x9p10002abcd1234efgh",
"email": "[email protected]",
"name": "Alex Berg"
},
"isGlobal": false,
"templateMeta": {
"signingMode": "PARALLEL",
"forceReadFullDocument": false,
"showChatToSigners": false,
"language": "sv",
"value": "540000",
"signableAfterExpired": false,
"sendPlainTextEmailOnly": false,
"allowDelegation": false,
"reminderIntervalDays": 3,
"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
"openVerification": "PIN",
"internalRecipients": [
"[email protected]"
],
"visibility": "EVERYONE",
"selectedUserIds": [
"cm4k2x9p10008abcd1234efgh"
],
"nationalIdDisplayMode": "FULL",
"sameDeviceSigning": false,
"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
},
"parties": [
{
"id": "cm4k2x9p10004abcd1234efgh",
"templateId": "cm4k2x9p10008abcd1234efgh",
"name": "Kai Lindqvist",
"email": "[email protected]",
"phone": "+46701740605",
"type": "INDIVIDUAL",
"role": "SIGNER",
"signingOrder": 1,
"contactId": "cm4k2x9p10006abcd1234efgh",
"company": null,
"externalId": "HR-2026-0142",
"nationalId": "191212121212",
"country": "SE",
"signatureMethod": "SE_BANKID",
"delivery": [
"EMAIL"
],
"signVerification": "PIN",
"createdAt": "2026-09-28T09:12:00.000Z",
"updatedAt": "2026-09-28T09:15:00.000Z"
}
],
"tags": [
{
"id": "cm4k2x9p10010abcd1234efgh",
"name": "Anställning",
"color": "#16A34A"
}
],
"content": [
{
"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"
}
],
"createdAt": "2026-09-28T09:12:00.000Z",
"updatedAt": "2026-09-28T09:15:00.000Z",
"deletedAt": null
}{
"code": "VALIDATION_FAILED",
"message": "Invalid input: expected string, received number",
"userMessage": "Förfrågan innehåller ogiltiga värden.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"issues": [
{
"path": "name",
"code": "INVALID_TYPE",
"message": "Invalid input: expected string, received number"
}
]
}{
"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": "Template not found",
"userMessage": "Resursen hittades inte.",
"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
"resource": "template"
}{
"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.
255Path Parameters
The template ID.
Body
Body
Response
200
Unique template identifier
Template name/title
Workspace ID this template belongs to
Organization ID this template belongs to
The user who created the template
Show child attributes
Show child attributes
Whether this is a global template
The settings that documents created from the template start with
Show child attributes
Show child attributes
The default parties that documents created from the template start with
Show child attributes
Show child attributes
Tags applied to this template
Show child attributes
Show child attributes
The content blocks in position order. Null unless you pass expand=content to GET /api/v1/templates/:id.
Show child attributes
Show child attributes
Date and time when the template was created
Date and time when the template was last updated
Date and time when the template was moved to the trash. Null unless the response is to DELETE /api/v1/templates/:id.
Was this page helpful?

