curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token=' \
--header 'Content-Type: application/json' \
--data '
{
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": true
}
],
"annotations": [
{
"backgroundColor": "#ffaa55",
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"bold": true,
"color": "#ffaa55",
"comment": "Processed as requested.",
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 52,
"link": "https://example.com",
"maxCharacters": 128,
"pages": [
3
],
"position": {},
"public": true,
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"digestAlgorithm": "SHA-256",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/Prague"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token="
payload = {
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": True
}
],
"annotations": [
{
"backgroundColor": "#ffaa55",
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"bold": True,
"color": "#ffaa55",
"comment": "Processed as requested.",
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 52,
"link": "https://example.com",
"maxCharacters": 128,
"pages": [3],
"position": {},
"public": True,
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"digestAlgorithm": "SHA-256",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/Prague"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
signatures: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
decorationType: 'empty',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
signOnBehalfOf: 'john.doe+member@example.com',
timestamp: true
}
],
annotations: [
{
backgroundColor: '#ffaa55',
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
bold: true,
color: '#ffaa55',
comment: 'Processed as requested.',
fileName: 'evidence.pdf',
font: 'default',
fontSize: 52,
link: 'https://example.com',
maxCharacters: 128,
pages: [3],
position: {},
public: true,
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
text: '<string>',
zIndex: 0
}
],
certificateHash: 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
digestAlgorithm: 'SHA-256',
images: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
subtype: 'image_barcode',
zIndex: 0
}
],
timezone: 'Europe/Prague'
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?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/sign/{version}/start/digest?token=",
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([
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'signatures' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'decorationType' => 'empty',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'signOnBehalfOf' => 'john.doe+member@example.com',
'timestamp' => true
]
],
'annotations' => [
[
'backgroundColor' => '#ffaa55',
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'bold' => true,
'color' => '#ffaa55',
'comment' => 'Processed as requested.',
'fileName' => 'evidence.pdf',
'font' => 'default',
'fontSize' => 52,
'link' => 'https://example.com',
'maxCharacters' => 128,
'pages' => [
3
],
'position' => [
],
'public' => true,
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'text' => '<string>',
'zIndex' => 0
]
],
'certificateHash' => 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
'digestAlgorithm' => 'SHA-256',
'images' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'subtype' => 'image_barcode',
'zIndex' => 0
]
],
'timezone' => 'Europe/Prague'
]),
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/sign/{version}/start/digest?token="
payload := strings.NewReader("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"signOnBehalfOf\": \"john.doe+member@example.com\",\n \"timestamp\": true\n }\n ],\n \"annotations\": [\n {\n \"backgroundColor\": \"#ffaa55\",\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"comment\": \"Processed as requested.\",\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 52,\n \"link\": \"https://example.com\",\n \"maxCharacters\": 128,\n \"pages\": [\n 3\n ],\n \"position\": {},\n \"public\": true,\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"digestAlgorithm\": \"SHA-256\",\n \"images\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"subtype\": \"image_barcode\",\n \"zIndex\": 0\n }\n ],\n \"timezone\": \"Europe/Prague\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token=")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"signOnBehalfOf\": \"john.doe+member@example.com\",\n \"timestamp\": true\n }\n ],\n \"annotations\": [\n {\n \"backgroundColor\": \"#ffaa55\",\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"comment\": \"Processed as requested.\",\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 52,\n \"link\": \"https://example.com\",\n \"maxCharacters\": 128,\n \"pages\": [\n 3\n ],\n \"position\": {},\n \"public\": true,\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"digestAlgorithm\": \"SHA-256\",\n \"images\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"subtype\": \"image_barcode\",\n \"zIndex\": 0\n }\n ],\n \"timezone\": \"Europe/Prague\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"signOnBehalfOf\": \"john.doe+member@example.com\",\n \"timestamp\": true\n }\n ],\n \"annotations\": [\n {\n \"backgroundColor\": \"#ffaa55\",\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"comment\": \"Processed as requested.\",\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 52,\n \"link\": \"https://example.com\",\n \"maxCharacters\": 128,\n \"pages\": [\n 3\n ],\n \"position\": {},\n \"public\": true,\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"digestAlgorithm\": \"SHA-256\",\n \"images\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"subtype\": \"image_barcode\",\n \"zIndex\": 0\n }\n ],\n \"timezone\": \"Europe/Prague\"\n}"
response = http.request(request)
puts response.read_body{
"files": [
{
"digest": "9F2C4E1B7A0D63855C1E8F04B2D97A63E5108C4FBD26A7391E0C58D4A6B7F213",
"originalHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"preparedFile": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
}
],
"sessionExpiration": "2023-11-07T05:31:56Z",
"sessionId": "sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213"
}{
"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"
}Start two-step digest signing of a document
POST /documents/sign/{version}/start/digest
First of the two calls that make up client-side signing, where the private key never leaves the signer’s device - an I.CA hardware token (icaQualified) or the signer’s software certificate store (icaSwStore). Nothing is signed here: the document is prepared and the digests the client has to sign come back, and the signature itself is applied by PUT /documents/sign/finish/digest.
Preparing means resolving the signing certificate among those stored on the caller’s own account by certificateHash - and, for icaQualified, checking that it really is a valid qualified signing certificate - and then confirming that the document can be signed at all: that it exists at the given version, is a PDF, sits in a workflow state that allows signing, and that every signature, annotation and image the document requires has been supplied. The visual layer is rendered into a temporary copy of each of the document’s PDF files, an empty signature placeholder is reserved for the certificate in every copy, and the digest to be signed is computed over it.
The prepared state is kept in a short-lived signing session, whose identifier and expiry come back together with one digest per prepared file. A document can consist of several PDF files, so every returned digest has to be signed and sent back before the session expires; afterwards the session is gone and the flow starts from the beginning. Prepared files that receive only annotations or images carry no digest, are finalized on the server, and are therefore not returned.
The document itself is untouched by this call - its content, version, workflow state and audit trail change only at finish. The version in the path has to match the document’s current one, except that a change which does not affect signing is realigned automatically and the session is bound to the realigned version.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token=' \
--header 'Content-Type: application/json' \
--data '
{
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": true
}
],
"annotations": [
{
"backgroundColor": "#ffaa55",
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"bold": true,
"color": "#ffaa55",
"comment": "Processed as requested.",
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 52,
"link": "https://example.com",
"maxCharacters": 128,
"pages": [
3
],
"position": {},
"public": true,
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"digestAlgorithm": "SHA-256",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/Prague"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token="
payload = {
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": True
}
],
"annotations": [
{
"backgroundColor": "#ffaa55",
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"bold": True,
"color": "#ffaa55",
"comment": "Processed as requested.",
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 52,
"link": "https://example.com",
"maxCharacters": 128,
"pages": [3],
"position": {},
"public": True,
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"digestAlgorithm": "SHA-256",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/Prague"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
signatures: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
decorationType: 'empty',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
signOnBehalfOf: 'john.doe+member@example.com',
timestamp: true
}
],
annotations: [
{
backgroundColor: '#ffaa55',
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
bold: true,
color: '#ffaa55',
comment: 'Processed as requested.',
fileName: 'evidence.pdf',
font: 'default',
fontSize: 52,
link: 'https://example.com',
maxCharacters: 128,
pages: [3],
position: {},
public: true,
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
text: '<string>',
zIndex: 0
}
],
certificateHash: 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
digestAlgorithm: 'SHA-256',
images: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
subtype: 'image_barcode',
zIndex: 0
}
],
timezone: 'Europe/Prague'
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?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/sign/{version}/start/digest?token=",
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([
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'signatures' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'decorationType' => 'empty',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'signOnBehalfOf' => 'john.doe+member@example.com',
'timestamp' => true
]
],
'annotations' => [
[
'backgroundColor' => '#ffaa55',
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'bold' => true,
'color' => '#ffaa55',
'comment' => 'Processed as requested.',
'fileName' => 'evidence.pdf',
'font' => 'default',
'fontSize' => 52,
'link' => 'https://example.com',
'maxCharacters' => 128,
'pages' => [
3
],
'position' => [
],
'public' => true,
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'text' => '<string>',
'zIndex' => 0
]
],
'certificateHash' => 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
'digestAlgorithm' => 'SHA-256',
'images' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'subtype' => 'image_barcode',
'zIndex' => 0
]
],
'timezone' => 'Europe/Prague'
]),
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/sign/{version}/start/digest?token="
payload := strings.NewReader("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"signOnBehalfOf\": \"john.doe+member@example.com\",\n \"timestamp\": true\n }\n ],\n \"annotations\": [\n {\n \"backgroundColor\": \"#ffaa55\",\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"comment\": \"Processed as requested.\",\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 52,\n \"link\": \"https://example.com\",\n \"maxCharacters\": 128,\n \"pages\": [\n 3\n ],\n \"position\": {},\n \"public\": true,\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"digestAlgorithm\": \"SHA-256\",\n \"images\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"subtype\": \"image_barcode\",\n \"zIndex\": 0\n }\n ],\n \"timezone\": \"Europe/Prague\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token=")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"signOnBehalfOf\": \"john.doe+member@example.com\",\n \"timestamp\": true\n }\n ],\n \"annotations\": [\n {\n \"backgroundColor\": \"#ffaa55\",\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"comment\": \"Processed as requested.\",\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 52,\n \"link\": \"https://example.com\",\n \"maxCharacters\": 128,\n \"pages\": [\n 3\n ],\n \"position\": {},\n \"public\": true,\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"digestAlgorithm\": \"SHA-256\",\n \"images\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"subtype\": \"image_barcode\",\n \"zIndex\": 0\n }\n ],\n \"timezone\": \"Europe/Prague\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/sign/{version}/start/digest?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"signOnBehalfOf\": \"john.doe+member@example.com\",\n \"timestamp\": true\n }\n ],\n \"annotations\": [\n {\n \"backgroundColor\": \"#ffaa55\",\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"comment\": \"Processed as requested.\",\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 52,\n \"link\": \"https://example.com\",\n \"maxCharacters\": 128,\n \"pages\": [\n 3\n ],\n \"position\": {},\n \"public\": true,\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"digestAlgorithm\": \"SHA-256\",\n \"images\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"pages\": [\n 2\n ],\n \"signee\": \"<string>\",\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"subtype\": \"image_barcode\",\n \"zIndex\": 0\n }\n ],\n \"timezone\": \"Europe/Prague\"\n}"
response = http.request(request)
puts response.read_body{
"files": [
{
"digest": "9F2C4E1B7A0D63855C1E8F04B2D97A63E5108C4FBD26A7391E0C58D4A6B7F213",
"originalHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"preparedFile": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
}
],
"sessionExpiration": "2023-11-07T05:31:56Z",
"sessionId": "sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213"
}{
"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
Response
Returns the signing session, its expiry and one digest per prepared file.