curl --request POST \
--url https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file \
--header 'Content-Type: application/json' \
--data '
{
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [
2
],
"signFieldId": "1LTn5IimzXh68bOv",
"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": [
2
],
"position": {},
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificate": "MIIDdzCCAl+gAwIBAgIE...",
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/London"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file"
payload = {
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [2],
"signFieldId": "1LTn5IimzXh68bOv",
"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": [2],
"position": {},
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificate": "MIIDdzCCAl+gAwIBAgIE...",
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/London"
}
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({
signatures: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
decorationType: 'empty',
pages: [2],
signFieldId: '1LTn5IimzXh68bOv',
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: [2],
position: {},
signFieldId: '1LTn5IimzXh68bOv',
text: '<string>',
zIndex: 0
}
],
certificate: 'MIIDdzCCAl+gAwIBAgIE...',
certificateHash: 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
images: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
subtype: 'image_barcode',
zIndex: 0
}
],
timezone: 'Europe/London'
})
};
fetch('https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file', 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/share/document/sign/{version}/start/file",
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([
'signatures' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'decorationType' => 'empty',
'pages' => [
2
],
'signFieldId' => '1LTn5IimzXh68bOv',
'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' => [
2
],
'position' => [
],
'signFieldId' => '1LTn5IimzXh68bOv',
'text' => '<string>',
'zIndex' => 0
]
],
'certificate' => 'MIIDdzCCAl+gAwIBAgIE...',
'certificateHash' => 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
'images' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'subtype' => 'image_barcode',
'zIndex' => 0
]
],
'timezone' => 'Europe/London'
]),
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/share/document/sign/{version}/start/file"
payload := strings.NewReader("{\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\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 2\n ],\n \"position\": {},\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificate\": \"MIIDdzCCAl+gAwIBAgIE...\",\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\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/London\"\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/share/document/sign/{version}/start/file")
.header("Content-Type", "application/json")
.body("{\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\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 2\n ],\n \"position\": {},\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificate\": \"MIIDdzCCAl+gAwIBAgIE...\",\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\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/London\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file")
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 \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\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 2\n ],\n \"position\": {},\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificate\": \"MIIDdzCCAl+gAwIBAgIE...\",\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\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/London\"\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": 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": 428,
"type": "AUTH:MFA_REQUIRED",
"message": "MFA activation required",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 498,
"type": "SHARE_AUTH:TOKEN_INVALID",
"message": "Invalid share token",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Start signing a shared document by signing whole files
POST /share/document/sign/{version}/start/file
Prepares a document shared for signature so that the recipient can sign it with a key that never leaves their own device, and answers with the files to be signed. Where the digest variant hands the client a digest to sign, this one hands it the whole prepared PDF. Nothing is signed here: the signature is registered by PUT /share/document/sign/finish/file, and until then the document, its version and its history stay as they were, with the share still open for signing.
The call resolves the certificate to sign with - one stored on the signer’s account, or, for a recipient who has no account here, the public certificate sent along with the request - checks that the document can still be signed and that everything this recipient was asked to fill in has been filled, and draws their signatures, annotations and images into a working copy of each of the document’s PDF files.
The client then fetches each prepared file through GET /share/file/{hash}, quoting the session it was given, signs it on the signer’s own device, puts the result back with POST /share/upload/file and hands the identifiers to the call that finishes the signing. All of that has to happen within the five minutes the session lives, or the preparation has to be done again. A document may hold several PDF files, so every one of them comes back and every one has to be signed; files that only received annotations or images need no signature and are finished off here rather than returned. Where the document changed since the version given but not in a way that touches signing, the version is quietly brought up to date and the session bound to it. What the signature looks like comes entirely from the fields the recipient was given; there is nothing to choose here.
Share authorization: Authorize using a share token and a one-time password (if required) to call this endpoint.
Allowed share object types: document
Allowed share purposes: sign
curl --request POST \
--url https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file \
--header 'Content-Type: application/json' \
--data '
{
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [
2
],
"signFieldId": "1LTn5IimzXh68bOv",
"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": [
2
],
"position": {},
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificate": "MIIDdzCCAl+gAwIBAgIE...",
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/London"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file"
payload = {
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [2],
"signFieldId": "1LTn5IimzXh68bOv",
"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": [2],
"position": {},
"signFieldId": "1LTn5IimzXh68bOv",
"text": "<string>",
"zIndex": 0
}
],
"certificate": "MIIDdzCCAl+gAwIBAgIE...",
"certificateHash": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"timezone": "Europe/London"
}
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({
signatures: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
decorationType: 'empty',
pages: [2],
signFieldId: '1LTn5IimzXh68bOv',
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: [2],
position: {},
signFieldId: '1LTn5IimzXh68bOv',
text: '<string>',
zIndex: 0
}
],
certificate: 'MIIDdzCCAl+gAwIBAgIE...',
certificateHash: 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
images: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
subtype: 'image_barcode',
zIndex: 0
}
],
timezone: 'Europe/London'
})
};
fetch('https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file', 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/share/document/sign/{version}/start/file",
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([
'signatures' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'decorationType' => 'empty',
'pages' => [
2
],
'signFieldId' => '1LTn5IimzXh68bOv',
'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' => [
2
],
'position' => [
],
'signFieldId' => '1LTn5IimzXh68bOv',
'text' => '<string>',
'zIndex' => 0
]
],
'certificate' => 'MIIDdzCCAl+gAwIBAgIE...',
'certificateHash' => 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
'images' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'subtype' => 'image_barcode',
'zIndex' => 0
]
],
'timezone' => 'Europe/London'
]),
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/share/document/sign/{version}/start/file"
payload := strings.NewReader("{\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\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 2\n ],\n \"position\": {},\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificate\": \"MIIDdzCCAl+gAwIBAgIE...\",\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\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/London\"\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/share/document/sign/{version}/start/file")
.header("Content-Type", "application/json")
.body("{\n \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\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 2\n ],\n \"position\": {},\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificate\": \"MIIDdzCCAl+gAwIBAgIE...\",\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\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/London\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/share/document/sign/{version}/start/file")
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 \"signatures\": [\n {\n \"blob\": \"da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f\",\n \"comment\": \"Processed as requested.\",\n \"decorationType\": \"empty\",\n \"pages\": [\n 2\n ],\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\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 2\n ],\n \"position\": {},\n \"signFieldId\": \"1LTn5IimzXh68bOv\",\n \"text\": \"<string>\",\n \"zIndex\": 0\n }\n ],\n \"certificate\": \"MIIDdzCCAl+gAwIBAgIE...\",\n \"certificateHash\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\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/London\"\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": 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": 428,
"type": "AUTH:MFA_REQUIRED",
"message": "MFA activation required",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 498,
"type": "SHARE_AUTH:TOKEN_INVALID",
"message": "Invalid share token",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Path Parameters
Query Parameters
Body
Response
The document is prepared. Returns the session, when it expires, and every file to be signed.