curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"certificate": false,
"sealProvider": "internal",
"timestamp": false,
"tsaServer": "primary"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/seal/{version}?token="
payload = {
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"certificate": False,
"sealProvider": "internal",
"timestamp": False,
"tsaServer": "primary"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
certificate: false,
sealProvider: 'internal',
timestamp: false,
tsaServer: 'primary'
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=', 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/v1/documents/seal/{version}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'certificate' => false,
'sealProvider' => 'internal',
'timestamp' => false,
'tsaServer' => 'primary'
]),
CURLOPT_HTTPHEADER => [
"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/v1/documents/seal/{version}?token="
payload := strings.NewReader("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"certificate\": false,\n \"sealProvider\": \"internal\",\n \"timestamp\": false,\n \"tsaServer\": \"primary\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"certificate\": false,\n \"sealProvider\": \"internal\",\n \"timestamp\": false,\n \"tsaServer\": \"primary\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"certificate\": false,\n \"sealProvider\": \"internal\",\n \"timestamp\": false,\n \"tsaServer\": \"primary\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"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"
}Seal a document
PUT /documents/seal/{version}
Seals the document’s main file, which is what makes a later change to it detectable. Two things can be applied, alone or together: the organization’s own seal, standing behind the file as an organization rather than as a person, and a standalone trusted timestamp proving the file existed in this form at that moment. At least one of them has to be asked for.
Sealing is not signing. It attests to the file rather than to anyone’s agreement with it, so it does not fill a sign field and does not carry the workflow forward. It does leave the document counting as signed, which is what closes off the operations that would invalidate the seal.
The version in the path has to match the document’s current one. A seal and a timestamp are each counted against their own subscription capacity, and a timestamp additionally needs a timestamping authority configured in the settings that apply to the caller.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"certificate": false,
"sealProvider": "internal",
"timestamp": false,
"tsaServer": "primary"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/seal/{version}?token="
payload = {
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"certificate": False,
"sealProvider": "internal",
"timestamp": False,
"tsaServer": "primary"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
certificate: false,
sealProvider: 'internal',
timestamp: false,
tsaServer: 'primary'
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=', 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/v1/documents/seal/{version}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'certificate' => false,
'sealProvider' => 'internal',
'timestamp' => false,
'tsaServer' => 'primary'
]),
CURLOPT_HTTPHEADER => [
"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/v1/documents/seal/{version}?token="
payload := strings.NewReader("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"certificate\": false,\n \"sealProvider\": \"internal\",\n \"timestamp\": false,\n \"tsaServer\": \"primary\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"certificate\": false,\n \"sealProvider\": \"internal\",\n \"timestamp\": false,\n \"tsaServer\": \"primary\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/seal/{version}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"certificate\": false,\n \"sealProvider\": \"internal\",\n \"timestamp\": false,\n \"tsaServer\": \"primary\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"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"
}Authorizations
Path Parameters
Body
Applies the organization's own seal to the document, attesting on the organization's behalf that this is the file it stands behind. Depending on the tenant's timestamping configuration the seal may carry a trusted timestamp of its own. At least one of certificate and timestamp must be provided.
false
Name of the Time Stamping Authority server to request the timestamp from, as configured in settings. When left out, the account's default server is used. Naming one requires the set_tsa right; leaving it out does not. Rejected when no timestamp is being requested.
200^[A-Za-z0-9._-]+$"primary"