Update a template
curl --request PATCH \
--url https://app.sajn.se/api/v1/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"templateMeta": {
"forceReadFullDocument": true,
"showChatToSigners": true,
"value": "<string>",
"signableAfterExpired": true,
"sendPlainTextEmailOnly": true,
"allowDelegation": true,
"reminderIntervalDays": "<string>",
"responsibleUserId": "<string>",
"internalRecipients": [
"[email protected]"
],
"selectedUserIds": [
"<string>"
],
"sameDeviceSigning": true,
"documentCategoryId": "<string>"
}
}
'import requests
url = "https://app.sajn.se/api/v1/templates/{id}"
payload = {
"name": "<string>",
"templateMeta": {
"forceReadFullDocument": True,
"showChatToSigners": True,
"value": "<string>",
"signableAfterExpired": True,
"sendPlainTextEmailOnly": True,
"allowDelegation": True,
"reminderIntervalDays": "<string>",
"responsibleUserId": "<string>",
"internalRecipients": ["[email protected]"],
"selectedUserIds": ["<string>"],
"sameDeviceSigning": True,
"documentCategoryId": "<string>"
}
}
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
authorization: '<authorization>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
templateMeta: {
forceReadFullDocument: true,
showChatToSigners: true,
value: '<string>',
signableAfterExpired: true,
sendPlainTextEmailOnly: true,
allowDelegation: true,
reminderIntervalDays: '<string>',
responsibleUserId: '<string>',
internalRecipients: ['[email protected]'],
selectedUserIds: ['<string>'],
sameDeviceSigning: true,
documentCategoryId: '<string>'
}
})
};
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' => '<string>',
'templateMeta' => [
'forceReadFullDocument' => true,
'showChatToSigners' => true,
'value' => '<string>',
'signableAfterExpired' => true,
'sendPlainTextEmailOnly' => true,
'allowDelegation' => true,
'reminderIntervalDays' => '<string>',
'responsibleUserId' => '<string>',
'internalRecipients' => [
'[email protected]'
],
'selectedUserIds' => [
'<string>'
],
'sameDeviceSigning' => true,
'documentCategoryId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/templates/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"templateMeta\": {\n \"forceReadFullDocument\": true,\n \"showChatToSigners\": true,\n \"value\": \"<string>\",\n \"signableAfterExpired\": true,\n \"sendPlainTextEmailOnly\": true,\n \"allowDelegation\": true,\n \"reminderIntervalDays\": \"<string>\",\n \"responsibleUserId\": \"<string>\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"selectedUserIds\": [\n \"<string>\"\n ],\n \"sameDeviceSigning\": true,\n \"documentCategoryId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "<authorization>")
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", "<authorization>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"templateMeta\": {\n \"forceReadFullDocument\": true,\n \"showChatToSigners\": true,\n \"value\": \"<string>\",\n \"signableAfterExpired\": true,\n \"sendPlainTextEmailOnly\": true,\n \"allowDelegation\": true,\n \"reminderIntervalDays\": \"<string>\",\n \"responsibleUserId\": \"<string>\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"selectedUserIds\": [\n \"<string>\"\n ],\n \"sameDeviceSigning\": true,\n \"documentCategoryId\": \"<string>\"\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"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"templateMeta\": {\n \"forceReadFullDocument\": true,\n \"showChatToSigners\": true,\n \"value\": \"<string>\",\n \"signableAfterExpired\": true,\n \"sendPlainTextEmailOnly\": true,\n \"allowDelegation\": true,\n \"reminderIntervalDays\": \"<string>\",\n \"responsibleUserId\": \"<string>\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"selectedUserIds\": [\n \"<string>\"\n ],\n \"sameDeviceSigning\": true,\n \"documentCategoryId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"workspaceId": "<string>",
"organizationId": "<string>",
"createdById": "<string>",
"isGlobal": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"templateMeta": {
"signingOrder": "PARALLEL",
"forceReadFullDocument": true,
"showChatToSigners": true,
"preferredLanguage": "sv",
"value": "<string>",
"signableAfterExpired": true,
"sendPlainTextEmailOnly": true,
"allowDelegation": true,
"reminderIntervalDays": "<string>",
"responsibleUserId": "<string>",
"accessVerification": "NONE",
"internalRecipients": [
"<string>"
],
"visibility": "EVERYONE",
"selectedUserIds": [
"<string>"
],
"ssnDisplayMode": "FULL",
"sameDeviceSigning": true,
"documentCategoryId": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}Templates
Update a template
Update template properties.
Updatable Fields:
name- Template nametemplateMeta- Default settings for documents created from this template (signing order, preferred language, etc.)
PATCH
/
api
/
v1
/
templates
/
{id}
Update a template
curl --request PATCH \
--url https://app.sajn.se/api/v1/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"templateMeta": {
"forceReadFullDocument": true,
"showChatToSigners": true,
"value": "<string>",
"signableAfterExpired": true,
"sendPlainTextEmailOnly": true,
"allowDelegation": true,
"reminderIntervalDays": "<string>",
"responsibleUserId": "<string>",
"internalRecipients": [
"[email protected]"
],
"selectedUserIds": [
"<string>"
],
"sameDeviceSigning": true,
"documentCategoryId": "<string>"
}
}
'import requests
url = "https://app.sajn.se/api/v1/templates/{id}"
payload = {
"name": "<string>",
"templateMeta": {
"forceReadFullDocument": True,
"showChatToSigners": True,
"value": "<string>",
"signableAfterExpired": True,
"sendPlainTextEmailOnly": True,
"allowDelegation": True,
"reminderIntervalDays": "<string>",
"responsibleUserId": "<string>",
"internalRecipients": ["[email protected]"],
"selectedUserIds": ["<string>"],
"sameDeviceSigning": True,
"documentCategoryId": "<string>"
}
}
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
authorization: '<authorization>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
templateMeta: {
forceReadFullDocument: true,
showChatToSigners: true,
value: '<string>',
signableAfterExpired: true,
sendPlainTextEmailOnly: true,
allowDelegation: true,
reminderIntervalDays: '<string>',
responsibleUserId: '<string>',
internalRecipients: ['[email protected]'],
selectedUserIds: ['<string>'],
sameDeviceSigning: true,
documentCategoryId: '<string>'
}
})
};
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' => '<string>',
'templateMeta' => [
'forceReadFullDocument' => true,
'showChatToSigners' => true,
'value' => '<string>',
'signableAfterExpired' => true,
'sendPlainTextEmailOnly' => true,
'allowDelegation' => true,
'reminderIntervalDays' => '<string>',
'responsibleUserId' => '<string>',
'internalRecipients' => [
'[email protected]'
],
'selectedUserIds' => [
'<string>'
],
'sameDeviceSigning' => true,
'documentCategoryId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/templates/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"templateMeta\": {\n \"forceReadFullDocument\": true,\n \"showChatToSigners\": true,\n \"value\": \"<string>\",\n \"signableAfterExpired\": true,\n \"sendPlainTextEmailOnly\": true,\n \"allowDelegation\": true,\n \"reminderIntervalDays\": \"<string>\",\n \"responsibleUserId\": \"<string>\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"selectedUserIds\": [\n \"<string>\"\n ],\n \"sameDeviceSigning\": true,\n \"documentCategoryId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "<authorization>")
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", "<authorization>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"templateMeta\": {\n \"forceReadFullDocument\": true,\n \"showChatToSigners\": true,\n \"value\": \"<string>\",\n \"signableAfterExpired\": true,\n \"sendPlainTextEmailOnly\": true,\n \"allowDelegation\": true,\n \"reminderIntervalDays\": \"<string>\",\n \"responsibleUserId\": \"<string>\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"selectedUserIds\": [\n \"<string>\"\n ],\n \"sameDeviceSigning\": true,\n \"documentCategoryId\": \"<string>\"\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"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"templateMeta\": {\n \"forceReadFullDocument\": true,\n \"showChatToSigners\": true,\n \"value\": \"<string>\",\n \"signableAfterExpired\": true,\n \"sendPlainTextEmailOnly\": true,\n \"allowDelegation\": true,\n \"reminderIntervalDays\": \"<string>\",\n \"responsibleUserId\": \"<string>\",\n \"internalRecipients\": [\n \"[email protected]\"\n ],\n \"selectedUserIds\": [\n \"<string>\"\n ],\n \"sameDeviceSigning\": true,\n \"documentCategoryId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"workspaceId": "<string>",
"organizationId": "<string>",
"createdById": "<string>",
"isGlobal": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"templateMeta": {
"signingOrder": "PARALLEL",
"forceReadFullDocument": true,
"showChatToSigners": true,
"preferredLanguage": "sv",
"value": "<string>",
"signableAfterExpired": true,
"sendPlainTextEmailOnly": true,
"allowDelegation": true,
"reminderIntervalDays": "<string>",
"responsibleUserId": "<string>",
"accessVerification": "NONE",
"internalRecipients": [
"<string>"
],
"visibility": "EVERYONE",
"selectedUserIds": [
"<string>"
],
"ssnDisplayMode": "FULL",
"sameDeviceSigning": true,
"documentCategoryId": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}You’re viewing API version
2026-09, which is deprecated and stops working on October 1, 2027. To see the current version, select 2026-10 in the menu at the top of the sidebar. To move your integration, see Upgrading to 2026-10.Authorizations
bearerAuthoauth2
Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
Headers
Bearer token for API authentication
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.
Maximum string length:
255Path Parameters
Body
application/json
Body
Response
200
Unique template identifier
Template name/title
Workspace ID this template belongs to
Organization ID this template belongs to
User ID of the template creator
Whether this is a global template
Date and time when the template was created
Date and time when the template was last updated
Template metadata with default settings
Show child attributes
Show child attributes
Was this page helpful?
⌘I

