curl --request POST \
--url https://sandbox.circularo.com/api/v2/documents/{id}/seal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"useCertificate": true
}
'import requests
url = "https://sandbox.circularo.com/api/v2/documents/{id}/seal"
payload = { "useCertificate": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({useCertificate: true})
};
fetch('https://sandbox.circularo.com/api/v2/documents/{id}/seal', 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://sandbox.circularo.com/api/v2/documents/{id}/seal",
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([
'useCertificate' => true
]),
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://sandbox.circularo.com/api/v2/documents/{id}/seal"
payload := strings.NewReader("{\n \"useCertificate\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.circularo.com/api/v2/documents/{id}/seal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"useCertificate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v2/documents/{id}/seal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"useCertificate\": true\n}"
response = http.request(request)
puts response.read_body{
"annotations": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Reviewed and approved",
"text": "Approved",
"type": "annotation_generic"
}
],
"attachments": [
{
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "LegalNotes.docx",
"isMerged": false,
"isPublic": false,
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"pageCount": 8,
"size": 522481
}
],
"category": "Contract",
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"customFields": [
{
"displayName": "Internal reference",
"key": "internalReference",
"value": "ACME-2026-001",
"type": "string"
}
],
"expiresAt": "2026-12-31T22:59:59.999Z",
"folders": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"scope": "personal"
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"images": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Company logo",
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
}
],
"mainFile": {
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "Contract.pdf",
"mimeType": "application/pdf",
"pageCount": 12,
"size": 724158
},
"metadataDefinition": "d_default",
"metadataFields": {
"D_DEFAULT_DESCRIPTION": "Quarterly maintenance contract"
},
"owner": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signatureProvider": "internal",
"signatures": [
{
"certificate": {
"fingerprintSha256": "A13767DDACA2D1B0ACAEB7CD3145D3D1CE14E208106318968FAF9882C8423F43",
"hasQcComplianceStatement": true,
"hasQcSscdStatement": true,
"isSelfSigned": true,
"issuer": "CN=Example Qualified CA,O=Example Trust Services,C=CZ",
"keyUsage": [
"digitalSignature",
"nonRepudiation"
],
"qcTypes": [
"eseal"
],
"serialNumber": "4DC32DD214A19795A2111484900663142F513989",
"signatureAlgorithm": "SHA256withRSA",
"subject": "CN=Example Ltd,O=Example Ltd,C=CZ",
"trustLists": [
"EUTL"
],
"validityEndsAt": "2024-11-02T09:15:30.000Z",
"validityStartsAt": "2024-11-02T09:15:30.000Z"
},
"comment": "Reviewed and approved",
"hasLongTermValidationData": true,
"isTimestamped": true,
"isVerified": true,
"sealProvider": "company-qseal",
"signatureProvider": "internal",
"signedAt": "2024-11-02T09:15:30.000Z",
"signedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signerName": "John Doe",
"timestampAuthority": "CN=Example TSA,O=Example Trust Services,C=CZ",
"tsaServer": "primary",
"type": "signature"
}
],
"submittedFiles": [
{
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "SignedConsentForm.pdf",
"isPublic": false,
"mimeType": "application/pdf",
"pageCount": 8,
"size": 522481
}
],
"templateId": "cba71ea5-9a68-431a-a5c2-6d9932792ec7",
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartedAt": "2024-11-02T09:15:30.000Z"
},
"reminders": [
{
"notifyOwner": true,
"period": "30d",
"recipients": [
{
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
}
],
"scheduledAt": "2024-11-02T09:15:30.000Z",
"sentAt": "2024-11-02T09:15:30.000Z",
"status": "scheduled",
"time": "09:00",
"timeZone": "Europe/Prague"
}
],
"renewal": {
"lastRenewedAt": "2024-11-02T09:15:30.000Z",
"latestExpiresAt": "2030-12-31T22:59:59.999Z",
"maxRenewals": 5,
"mode": "auto",
"noticeDueAt": "2027-03-31T22:00:00.000Z",
"noticePeriod": "3M",
"period": "1y",
"renewalCount": 2
},
"type": "fixed_term"
},
"title": "Client agreement",
"transaction": {
"completedAt": "2024-11-02T09:15:30.000Z",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"status": "not-started",
"waitingFor": [
{
"expiresAt": "2024-11-02T09:15:30.000Z",
"hasTurn": true,
"order": 1,
"purpose": "sign",
"recipient": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"turnStartedAt": "2024-11-02T09:15:30.000Z"
}
]
},
"trashed": false,
"webUrl": "https://sandbox.circularo.com/home/detail?select=a0d01c9d-f72f-4c57-af11-e26bda19cc59"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 412,
"type": "RESOURCE:PRECONDITION_FAILED",
"message": "Resource precondition failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Seal a document
POST /documents/{id}/seal
Seals a document with a digital certificate and/or a trusted timestamp, producing cryptographically verifiable proof of its authenticity and integrity, and returns the updated document. Enable at least one of the two. Sealing consumes transaction capacity from your subscription. GET /me reports the seal providers your account can use, and which of them is the default, in settings.availableSealProviders.
Response headers
ETag— An opaque validator for the resource’s current version.
curl --request POST \
--url https://sandbox.circularo.com/api/v2/documents/{id}/seal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"useCertificate": true
}
'import requests
url = "https://sandbox.circularo.com/api/v2/documents/{id}/seal"
payload = { "useCertificate": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({useCertificate: true})
};
fetch('https://sandbox.circularo.com/api/v2/documents/{id}/seal', 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://sandbox.circularo.com/api/v2/documents/{id}/seal",
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([
'useCertificate' => true
]),
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://sandbox.circularo.com/api/v2/documents/{id}/seal"
payload := strings.NewReader("{\n \"useCertificate\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.circularo.com/api/v2/documents/{id}/seal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"useCertificate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v2/documents/{id}/seal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"useCertificate\": true\n}"
response = http.request(request)
puts response.read_body{
"annotations": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Reviewed and approved",
"text": "Approved",
"type": "annotation_generic"
}
],
"attachments": [
{
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "LegalNotes.docx",
"isMerged": false,
"isPublic": false,
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"pageCount": 8,
"size": 522481
}
],
"category": "Contract",
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"customFields": [
{
"displayName": "Internal reference",
"key": "internalReference",
"value": "ACME-2026-001",
"type": "string"
}
],
"expiresAt": "2026-12-31T22:59:59.999Z",
"folders": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"scope": "personal"
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"images": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Company logo",
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
}
],
"mainFile": {
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "Contract.pdf",
"mimeType": "application/pdf",
"pageCount": 12,
"size": 724158
},
"metadataDefinition": "d_default",
"metadataFields": {
"D_DEFAULT_DESCRIPTION": "Quarterly maintenance contract"
},
"owner": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signatureProvider": "internal",
"signatures": [
{
"certificate": {
"fingerprintSha256": "A13767DDACA2D1B0ACAEB7CD3145D3D1CE14E208106318968FAF9882C8423F43",
"hasQcComplianceStatement": true,
"hasQcSscdStatement": true,
"isSelfSigned": true,
"issuer": "CN=Example Qualified CA,O=Example Trust Services,C=CZ",
"keyUsage": [
"digitalSignature",
"nonRepudiation"
],
"qcTypes": [
"eseal"
],
"serialNumber": "4DC32DD214A19795A2111484900663142F513989",
"signatureAlgorithm": "SHA256withRSA",
"subject": "CN=Example Ltd,O=Example Ltd,C=CZ",
"trustLists": [
"EUTL"
],
"validityEndsAt": "2024-11-02T09:15:30.000Z",
"validityStartsAt": "2024-11-02T09:15:30.000Z"
},
"comment": "Reviewed and approved",
"hasLongTermValidationData": true,
"isTimestamped": true,
"isVerified": true,
"sealProvider": "company-qseal",
"signatureProvider": "internal",
"signedAt": "2024-11-02T09:15:30.000Z",
"signedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signerName": "John Doe",
"timestampAuthority": "CN=Example TSA,O=Example Trust Services,C=CZ",
"tsaServer": "primary",
"type": "signature"
}
],
"submittedFiles": [
{
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "SignedConsentForm.pdf",
"isPublic": false,
"mimeType": "application/pdf",
"pageCount": 8,
"size": 522481
}
],
"templateId": "cba71ea5-9a68-431a-a5c2-6d9932792ec7",
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartedAt": "2024-11-02T09:15:30.000Z"
},
"reminders": [
{
"notifyOwner": true,
"period": "30d",
"recipients": [
{
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
}
],
"scheduledAt": "2024-11-02T09:15:30.000Z",
"sentAt": "2024-11-02T09:15:30.000Z",
"status": "scheduled",
"time": "09:00",
"timeZone": "Europe/Prague"
}
],
"renewal": {
"lastRenewedAt": "2024-11-02T09:15:30.000Z",
"latestExpiresAt": "2030-12-31T22:59:59.999Z",
"maxRenewals": 5,
"mode": "auto",
"noticeDueAt": "2027-03-31T22:00:00.000Z",
"noticePeriod": "3M",
"period": "1y",
"renewalCount": 2
},
"type": "fixed_term"
},
"title": "Client agreement",
"transaction": {
"completedAt": "2024-11-02T09:15:30.000Z",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"status": "not-started",
"waitingFor": [
{
"expiresAt": "2024-11-02T09:15:30.000Z",
"hasTurn": true,
"order": 1,
"purpose": "sign",
"recipient": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"turnStartedAt": "2024-11-02T09:15:30.000Z"
}
]
},
"trashed": false,
"webUrl": "https://sandbox.circularo.com/home/detail?select=a0d01c9d-f72f-4c57-af11-e26bda19cc59"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 412,
"type": "RESOURCE:PRECONDITION_FAILED",
"message": "Resource precondition failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Headers
Makes the request conditional on the resource's current version. Provide the value of the ETag header from a previous response; if the resource has changed since, the request fails with 412 Precondition Failed. Changes made by the platform's own processing of the document — thumbnail rendering, text extraction and read receipts — do not fail the precondition. Omit to operate on the current version unconditionally.
^(\*|"\d+")$"\"3\""
Path Parameters
Body
Parameters for sealing a document with a digital certificate and/or a trusted timestamp.
Name of the Time Stamping Authority server to use, as advertised by GET /me in settings.availableTsaServers. Leave it out to use your environment's default server — naming one requires the set_tsa right, leaving it out does not. Rejected when the request adds no timestamp at all — which is not the same as useTimestamp being off, since a certificate seal is itself timestamped on an environment configured for it.
200^[A-Za-z0-9._-]+$"internal"
Response
The document was sealed. Returns the updated document.
A single document: its metadata, files, field values and lifecycle status.
The provider used to sign this document. A transaction fixes it — from the signatureProvider that transaction was created with, or from your account default at the moment the first signature is applied — and it cannot be changed afterwards. Null until a transaction has fixed it.
internal: The certificate Circularo manages for your environment.datasure: Datasure, an external trust service provider. Requires a Datasure certificate and Datasure account configured in your environment.emdha: EMDHA, the Saudi national digital signature service. The signer completes the signature in the web app.uaePassSign: UAE PASS, the national digital identity service of the United Arab Emirates. The signer completes the signature in the web app.icaQualified: I.CA qualified certificates on a hardware token. The signer completes the signature in the web app, using their own device.icaSwStore: I.CA certificates from the signer's software certificate store. The signer completes the signature in the web app, using their own device.
internal, datasure, emdha, uaePassSign, icaQualified, icaSwStore, null "internal"