curl --request POST \
--url https://app.sajn.se/api/v1/documents/{id}/extend-expiration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.sajn.se/api/v1/documents/{id}/extend-expiration"
payload = { "expiresAt": "2023-11-07T05:31:56Z" }
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expiresAt: '2023-11-07T05:31:56Z'})
};
fetch('https://app.sajn.se/api/v1/documents/{id}/extend-expiration', 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/{id}/extend-expiration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expiresAt' => '2023-11-07T05:31:56Z'
]),
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/documents/{id}/extend-expiration"
payload := strings.NewReader("{\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.sajn.se/api/v1/documents/{id}/extend-expiration")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/documents/{id}/extend-expiration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}{
"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>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}Change a sent document's expiration date
Change the expiration date of a document that has already been sent for signing. The new date can be earlier or later than the current one.
Status Requirements:
- Document must be in
PENDINGorEXPIREDstatus. AnEXPIREDdocument returns toPENDING. ForDRAFTdocuments, setexpiresAtviaPATCH /api/v1/documents/{id}instead.
Permissions:
- Requires the
EDIT_DOCUMENTworkspace permission.
Request Body:
expiresAt(required) - The new expiration date/time (ISO 8601). Must be at least 24 hours in the future.
What happens:
- The document’s
expiresAtis updated. - An audit log entry is recorded.
- Every recipient that is still notifiable (has an email, notifications enabled, delivery method other than
NONE, and has not rejected) is emailed that the signing deadline has moved.
curl --request POST \
--url https://app.sajn.se/api/v1/documents/{id}/extend-expiration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.sajn.se/api/v1/documents/{id}/extend-expiration"
payload = { "expiresAt": "2023-11-07T05:31:56Z" }
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expiresAt: '2023-11-07T05:31:56Z'})
};
fetch('https://app.sajn.se/api/v1/documents/{id}/extend-expiration', 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/{id}/extend-expiration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expiresAt' => '2023-11-07T05:31:56Z'
]),
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/documents/{id}/extend-expiration"
payload := strings.NewReader("{\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.sajn.se/api/v1/documents/{id}/extend-expiration")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/documents/{id}/extend-expiration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}{
"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>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}Authorizations
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.
255Path Parameters
Body
Body
Change the expiration date of a PENDING or EXPIRED document. Recipients are notified that the deadline moved.
New expiration date/time (ISO 8601). Must be at least 24 hours in the future. Can be earlier or later than the current expiration.
Response
200
Unique document identifier
Document name/title
Document status: DRAFT, SENDING, PENDING, COMPLETED, EXPIRED, CANCELLED, or IMPORTED
Date and time when the document was created
Date and time when the document was last updated
Your external reference ID for this document
Date and time when the document expires
Document metadata including subject, message, signing order, etc.
Show child attributes
Show child attributes
Date and time when all signers completed signing
Was this page helpful?

