curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/documents/bulk/create?token=' \
--header 'Content-Type: application/json' \
--data '
{
"definitionType": "ext",
"workflow": "wf_archive",
"actionId": 3,
"addMentionRights": true,
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"convertToPDF": false,
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": false,
"groupReceiver": [
"everyone"
],
"isPublicComment": false,
"optionalData": {
"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
}
],
"barcodeData": [
"<string>"
],
"cloneFiles": true,
"cloneMainFile": true,
"convert": false,
"createLinks": true,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"isPublic": true,
"merge": [
"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
],
"ocr": true,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": true
}
],
"signFields": [
{
"pages": [
1,
2
],
"position": {
"percentHeight": 0.07,
"percentWidth": 0.2,
"percentX": 0.15,
"percentY": 0.3
},
"type": "signature",
"align": "left",
"backgroundColor": "#ffaa55",
"bold": true,
"color": "#ffaa55",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 11,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": true,
"maxCharacters": 128,
"numberOfLines": 99,
"order": 123,
"public": true,
"readOnly": true,
"required": true,
"subtype": "annotation_generic",
"text": "<string>",
"timestamp": true,
"tooltip": "Sign here",
"usage": "manual",
"user": [
"john.doe+member@example.com"
],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": [
"Yes",
"No"
],
"zIndex": 123
}
],
"sourceDocumentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"tags": {
"private": [
"to review"
],
"public": [
"invoice",
"2026"
]
},
"timezone": "Europe/Prague"
},
"receiver": [
"john.doe+member@example.com"
],
"usePdfA": false
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/bulk/create?token="
payload = {
"definitionType": "ext",
"workflow": "wf_archive",
"actionId": 3,
"addMentionRights": True,
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"convertToPDF": False,
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": False,
"groupReceiver": ["everyone"],
"isPublicComment": False,
"optionalData": {
"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
}
],
"barcodeData": ["<string>"],
"cloneFiles": True,
"cloneMainFile": True,
"convert": False,
"createLinks": True,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"isPublic": True,
"merge": ["s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"],
"ocr": True,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": True
}
],
"signFields": [
{
"pages": [1, 2],
"position": {
"percentHeight": 0.07,
"percentWidth": 0.2,
"percentX": 0.15,
"percentY": 0.3
},
"type": "signature",
"align": "left",
"backgroundColor": "#ffaa55",
"bold": True,
"color": "#ffaa55",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 11,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": True,
"maxCharacters": 128,
"numberOfLines": 99,
"order": 123,
"public": True,
"readOnly": True,
"required": True,
"subtype": "annotation_generic",
"text": "<string>",
"timestamp": True,
"tooltip": "Sign here",
"usage": "manual",
"user": ["john.doe+member@example.com"],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": ["Yes", "No"],
"zIndex": 123
}
],
"sourceDocumentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"tags": {
"private": ["to review"],
"public": ["invoice", "2026"]
},
"timezone": "Europe/Prague"
},
"receiver": ["john.doe+member@example.com"],
"usePdfA": False
}
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({
definitionType: 'ext',
workflow: 'wf_archive',
actionId: 3,
addMentionRights: true,
comment: 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
convertToPDF: false,
draftId: '8b312068-ecdf-4fa6-8f13-c6183da85f43',
forcePdfA: false,
groupReceiver: ['everyone'],
isPublicComment: false,
optionalData: {
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
}
],
barcodeData: ['<string>'],
cloneFiles: true,
cloneMainFile: true,
convert: false,
createLinks: true,
emailAttachments: {},
folder: '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
images: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
subtype: 'image_barcode',
zIndex: 0
}
],
isPublic: true,
merge: ['s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'],
ocr: true,
path: 'Contracts/2026/Q1',
signatureProvider: 'internal',
signatures: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
decorationType: 'empty',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
signOnBehalfOf: 'john.doe+member@example.com',
timestamp: true
}
],
signFields: [
{
pages: [1, 2],
position: {percentHeight: 0.07, percentWidth: 0.2, percentX: 0.15, percentY: 0.3},
type: 'signature',
align: 'left',
backgroundColor: '#ffaa55',
bold: true,
color: '#ffaa55',
config: '{"multipageType":"all","multiPageCustom":"1"}',
fieldGroupId: 123,
fileName: 'evidence.pdf',
font: 'default',
fontSize: 11,
groupId: 123,
id: '1LTn5IimzXh68bOv',
link: 'https://example.com',
lockRatio: true,
maxCharacters: 128,
numberOfLines: 99,
order: 123,
public: true,
readOnly: true,
required: true,
subtype: 'annotation_generic',
text: '<string>',
timestamp: true,
tooltip: 'Sign here',
usage: 'manual',
user: ['john.doe+member@example.com'],
userRoleId: 123,
userRoleName: 'Recipient 1',
values: ['Yes', 'No'],
zIndex: 123
}
],
sourceDocumentId: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
tags: {private: ['to review'], public: ['invoice', '2026']},
timezone: 'Europe/Prague'
},
receiver: ['john.doe+member@example.com'],
usePdfA: false
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/bulk/create?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/bulk/create?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([
'definitionType' => 'ext',
'workflow' => 'wf_archive',
'actionId' => 3,
'addMentionRights' => true,
'comment' => 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
'convertToPDF' => false,
'draftId' => '8b312068-ecdf-4fa6-8f13-c6183da85f43',
'forcePdfA' => false,
'groupReceiver' => [
'everyone'
],
'isPublicComment' => false,
'optionalData' => [
'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
]
],
'barcodeData' => [
'<string>'
],
'cloneFiles' => true,
'cloneMainFile' => true,
'convert' => false,
'createLinks' => true,
'emailAttachments' => [
],
'folder' => '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
'images' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'subtype' => 'image_barcode',
'zIndex' => 0
]
],
'isPublic' => true,
'merge' => [
's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'
],
'ocr' => true,
'path' => 'Contracts/2026/Q1',
'signatureProvider' => 'internal',
'signatures' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'decorationType' => 'empty',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'signOnBehalfOf' => 'john.doe+member@example.com',
'timestamp' => true
]
],
'signFields' => [
[
'pages' => [
1,
2
],
'position' => [
'percentHeight' => 0.07,
'percentWidth' => 0.2,
'percentX' => 0.15,
'percentY' => 0.3
],
'type' => 'signature',
'align' => 'left',
'backgroundColor' => '#ffaa55',
'bold' => true,
'color' => '#ffaa55',
'config' => '{"multipageType":"all","multiPageCustom":"1"}',
'fieldGroupId' => 123,
'fileName' => 'evidence.pdf',
'font' => 'default',
'fontSize' => 11,
'groupId' => 123,
'id' => '1LTn5IimzXh68bOv',
'link' => 'https://example.com',
'lockRatio' => true,
'maxCharacters' => 128,
'numberOfLines' => 99,
'order' => 123,
'public' => true,
'readOnly' => true,
'required' => true,
'subtype' => 'annotation_generic',
'text' => '<string>',
'timestamp' => true,
'tooltip' => 'Sign here',
'usage' => 'manual',
'user' => [
'john.doe+member@example.com'
],
'userRoleId' => 123,
'userRoleName' => 'Recipient 1',
'values' => [
'Yes',
'No'
],
'zIndex' => 123
]
],
'sourceDocumentId' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'tags' => [
'private' => [
'to review'
],
'public' => [
'invoice',
'2026'
]
],
'timezone' => 'Europe/Prague'
],
'receiver' => [
'john.doe+member@example.com'
],
'usePdfA' => false
]),
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/bulk/create?token="
payload := strings.NewReader("{\n \"definitionType\": \"ext\",\n \"workflow\": \"wf_archive\",\n \"actionId\": 3,\n \"addMentionRights\": true,\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"convertToPDF\": false,\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"groupReceiver\": [\n \"everyone\"\n ],\n \"isPublicComment\": false,\n \"optionalData\": {\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 \"barcodeData\": [\n \"<string>\"\n ],\n \"cloneFiles\": true,\n \"cloneMainFile\": true,\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\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 \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"signFields\": [\n {\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.07,\n \"percentWidth\": 0.2,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n },\n \"type\": \"signature\",\n \"align\": \"left\",\n \"backgroundColor\": \"#ffaa55\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 11,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 128,\n \"numberOfLines\": 99,\n \"order\": 123,\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"usage\": \"manual\",\n \"user\": [\n \"john.doe+member@example.com\"\n ],\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\",\n \"values\": [\n \"Yes\",\n \"No\"\n ],\n \"zIndex\": 123\n }\n ],\n \"sourceDocumentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"tags\": {\n \"private\": [\n \"to review\"\n ],\n \"public\": [\n \"invoice\",\n \"2026\"\n ]\n },\n \"timezone\": \"Europe/Prague\"\n },\n \"receiver\": [\n \"john.doe+member@example.com\"\n ],\n \"usePdfA\": false\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/bulk/create?token=")
.header("Content-Type", "application/json")
.body("{\n \"definitionType\": \"ext\",\n \"workflow\": \"wf_archive\",\n \"actionId\": 3,\n \"addMentionRights\": true,\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"convertToPDF\": false,\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"groupReceiver\": [\n \"everyone\"\n ],\n \"isPublicComment\": false,\n \"optionalData\": {\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 \"barcodeData\": [\n \"<string>\"\n ],\n \"cloneFiles\": true,\n \"cloneMainFile\": true,\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\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 \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"signFields\": [\n {\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.07,\n \"percentWidth\": 0.2,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n },\n \"type\": \"signature\",\n \"align\": \"left\",\n \"backgroundColor\": \"#ffaa55\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 11,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 128,\n \"numberOfLines\": 99,\n \"order\": 123,\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"usage\": \"manual\",\n \"user\": [\n \"john.doe+member@example.com\"\n ],\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\",\n \"values\": [\n \"Yes\",\n \"No\"\n ],\n \"zIndex\": 123\n }\n ],\n \"sourceDocumentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"tags\": {\n \"private\": [\n \"to review\"\n ],\n \"public\": [\n \"invoice\",\n \"2026\"\n ]\n },\n \"timezone\": \"Europe/Prague\"\n },\n \"receiver\": [\n \"john.doe+member@example.com\"\n ],\n \"usePdfA\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/bulk/create?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 \"definitionType\": \"ext\",\n \"workflow\": \"wf_archive\",\n \"actionId\": 3,\n \"addMentionRights\": true,\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"convertToPDF\": false,\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"groupReceiver\": [\n \"everyone\"\n ],\n \"isPublicComment\": false,\n \"optionalData\": {\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 \"barcodeData\": [\n \"<string>\"\n ],\n \"cloneFiles\": true,\n \"cloneMainFile\": true,\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\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 \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"signFields\": [\n {\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.07,\n \"percentWidth\": 0.2,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n },\n \"type\": \"signature\",\n \"align\": \"left\",\n \"backgroundColor\": \"#ffaa55\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 11,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 128,\n \"numberOfLines\": 99,\n \"order\": 123,\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"usage\": \"manual\",\n \"user\": [\n \"john.doe+member@example.com\"\n ],\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\",\n \"values\": [\n \"Yes\",\n \"No\"\n ],\n \"zIndex\": 123\n }\n ],\n \"sourceDocumentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"tags\": {\n \"private\": [\n \"to review\"\n ],\n \"public\": [\n \"invoice\",\n \"2026\"\n ]\n },\n \"timezone\": \"Europe/Prague\"\n },\n \"receiver\": [\n \"john.doe+member@example.com\"\n ],\n \"usePdfA\": false\n}"
response = http.request(request)
puts response.read_body{
"count": 22,
"errors": false,
"failed": [
1
],
"items": [
{
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"index": "default_documents",
"status": 409,
"message": "Incorrect version",
"payload": {},
"type": "DOCUMENT:VERSION_CONFLICT"
}
],
"success": [
"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": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Create a document per file
POST /documents/bulk/create
Creates one document for every file listed in body.bulkFiles, all of them against the same metadata definition and workflow and with the same metadata - the way a batch of uploads is turned into separate documents in a single request.
Each entry of body.bulkFiles becomes one document’s main file and, where it carries a name, that document’s title; the rest of body and all of optionalData apply to every document alike, so a body.pdfFile given here is overridden per document. Setting optionalData.createLinks additionally links each of the created documents to all the others.
The documents are created concurrently and independently, and the response names the ones that succeeded and marks the entries that did not, so a single unusable file does not cost the rest of the batch. items holds one outcome per entry with the entry’s position in payload.position: a created document under its identifier, a failed entry under the hash of its file together with the reason it failed. A draft named in draftId is removed only when every entry produced a document, so a batch with failed entries can be retried from it.
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/bulk/create?token=' \
--header 'Content-Type: application/json' \
--data '
{
"definitionType": "ext",
"workflow": "wf_archive",
"actionId": 3,
"addMentionRights": true,
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"convertToPDF": false,
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": false,
"groupReceiver": [
"everyone"
],
"isPublicComment": false,
"optionalData": {
"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
}
],
"barcodeData": [
"<string>"
],
"cloneFiles": true,
"cloneMainFile": true,
"convert": false,
"createLinks": true,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"isPublic": true,
"merge": [
"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
],
"ocr": true,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [
2
],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": true
}
],
"signFields": [
{
"pages": [
1,
2
],
"position": {
"percentHeight": 0.07,
"percentWidth": 0.2,
"percentX": 0.15,
"percentY": 0.3
},
"type": "signature",
"align": "left",
"backgroundColor": "#ffaa55",
"bold": true,
"color": "#ffaa55",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 11,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": true,
"maxCharacters": 128,
"numberOfLines": 99,
"order": 123,
"public": true,
"readOnly": true,
"required": true,
"subtype": "annotation_generic",
"text": "<string>",
"timestamp": true,
"tooltip": "Sign here",
"usage": "manual",
"user": [
"john.doe+member@example.com"
],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": [
"Yes",
"No"
],
"zIndex": 123
}
],
"sourceDocumentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"tags": {
"private": [
"to review"
],
"public": [
"invoice",
"2026"
]
},
"timezone": "Europe/Prague"
},
"receiver": [
"john.doe+member@example.com"
],
"usePdfA": false
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/bulk/create?token="
payload = {
"definitionType": "ext",
"workflow": "wf_archive",
"actionId": 3,
"addMentionRights": True,
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"convertToPDF": False,
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": False,
"groupReceiver": ["everyone"],
"isPublicComment": False,
"optionalData": {
"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
}
],
"barcodeData": ["<string>"],
"cloneFiles": True,
"cloneMainFile": True,
"convert": False,
"createLinks": True,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"images": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"subtype": "image_barcode",
"zIndex": 0
}
],
"isPublic": True,
"merge": ["s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"],
"ocr": True,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"signatures": [
{
"blob": "da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f",
"comment": "Processed as requested.",
"decorationType": "empty",
"pages": [2],
"signee": "<string>",
"signFieldId": "1LTn5IimzXh68bOv",
"signOnBehalfOf": "john.doe+member@example.com",
"timestamp": True
}
],
"signFields": [
{
"pages": [1, 2],
"position": {
"percentHeight": 0.07,
"percentWidth": 0.2,
"percentX": 0.15,
"percentY": 0.3
},
"type": "signature",
"align": "left",
"backgroundColor": "#ffaa55",
"bold": True,
"color": "#ffaa55",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 11,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": True,
"maxCharacters": 128,
"numberOfLines": 99,
"order": 123,
"public": True,
"readOnly": True,
"required": True,
"subtype": "annotation_generic",
"text": "<string>",
"timestamp": True,
"tooltip": "Sign here",
"usage": "manual",
"user": ["john.doe+member@example.com"],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": ["Yes", "No"],
"zIndex": 123
}
],
"sourceDocumentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"tags": {
"private": ["to review"],
"public": ["invoice", "2026"]
},
"timezone": "Europe/Prague"
},
"receiver": ["john.doe+member@example.com"],
"usePdfA": False
}
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({
definitionType: 'ext',
workflow: 'wf_archive',
actionId: 3,
addMentionRights: true,
comment: 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
convertToPDF: false,
draftId: '8b312068-ecdf-4fa6-8f13-c6183da85f43',
forcePdfA: false,
groupReceiver: ['everyone'],
isPublicComment: false,
optionalData: {
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
}
],
barcodeData: ['<string>'],
cloneFiles: true,
cloneMainFile: true,
convert: false,
createLinks: true,
emailAttachments: {},
folder: '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
images: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
subtype: 'image_barcode',
zIndex: 0
}
],
isPublic: true,
merge: ['s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'],
ocr: true,
path: 'Contracts/2026/Q1',
signatureProvider: 'internal',
signatures: [
{
blob: 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
comment: 'Processed as requested.',
decorationType: 'empty',
pages: [2],
signee: '<string>',
signFieldId: '1LTn5IimzXh68bOv',
signOnBehalfOf: 'john.doe+member@example.com',
timestamp: true
}
],
signFields: [
{
pages: [1, 2],
position: {percentHeight: 0.07, percentWidth: 0.2, percentX: 0.15, percentY: 0.3},
type: 'signature',
align: 'left',
backgroundColor: '#ffaa55',
bold: true,
color: '#ffaa55',
config: '{"multipageType":"all","multiPageCustom":"1"}',
fieldGroupId: 123,
fileName: 'evidence.pdf',
font: 'default',
fontSize: 11,
groupId: 123,
id: '1LTn5IimzXh68bOv',
link: 'https://example.com',
lockRatio: true,
maxCharacters: 128,
numberOfLines: 99,
order: 123,
public: true,
readOnly: true,
required: true,
subtype: 'annotation_generic',
text: '<string>',
timestamp: true,
tooltip: 'Sign here',
usage: 'manual',
user: ['john.doe+member@example.com'],
userRoleId: 123,
userRoleName: 'Recipient 1',
values: ['Yes', 'No'],
zIndex: 123
}
],
sourceDocumentId: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
tags: {private: ['to review'], public: ['invoice', '2026']},
timezone: 'Europe/Prague'
},
receiver: ['john.doe+member@example.com'],
usePdfA: false
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/bulk/create?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/bulk/create?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([
'definitionType' => 'ext',
'workflow' => 'wf_archive',
'actionId' => 3,
'addMentionRights' => true,
'comment' => 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
'convertToPDF' => false,
'draftId' => '8b312068-ecdf-4fa6-8f13-c6183da85f43',
'forcePdfA' => false,
'groupReceiver' => [
'everyone'
],
'isPublicComment' => false,
'optionalData' => [
'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
]
],
'barcodeData' => [
'<string>'
],
'cloneFiles' => true,
'cloneMainFile' => true,
'convert' => false,
'createLinks' => true,
'emailAttachments' => [
],
'folder' => '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
'images' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'subtype' => 'image_barcode',
'zIndex' => 0
]
],
'isPublic' => true,
'merge' => [
's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'
],
'ocr' => true,
'path' => 'Contracts/2026/Q1',
'signatureProvider' => 'internal',
'signatures' => [
[
'blob' => 'da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f',
'comment' => 'Processed as requested.',
'decorationType' => 'empty',
'pages' => [
2
],
'signee' => '<string>',
'signFieldId' => '1LTn5IimzXh68bOv',
'signOnBehalfOf' => 'john.doe+member@example.com',
'timestamp' => true
]
],
'signFields' => [
[
'pages' => [
1,
2
],
'position' => [
'percentHeight' => 0.07,
'percentWidth' => 0.2,
'percentX' => 0.15,
'percentY' => 0.3
],
'type' => 'signature',
'align' => 'left',
'backgroundColor' => '#ffaa55',
'bold' => true,
'color' => '#ffaa55',
'config' => '{"multipageType":"all","multiPageCustom":"1"}',
'fieldGroupId' => 123,
'fileName' => 'evidence.pdf',
'font' => 'default',
'fontSize' => 11,
'groupId' => 123,
'id' => '1LTn5IimzXh68bOv',
'link' => 'https://example.com',
'lockRatio' => true,
'maxCharacters' => 128,
'numberOfLines' => 99,
'order' => 123,
'public' => true,
'readOnly' => true,
'required' => true,
'subtype' => 'annotation_generic',
'text' => '<string>',
'timestamp' => true,
'tooltip' => 'Sign here',
'usage' => 'manual',
'user' => [
'john.doe+member@example.com'
],
'userRoleId' => 123,
'userRoleName' => 'Recipient 1',
'values' => [
'Yes',
'No'
],
'zIndex' => 123
]
],
'sourceDocumentId' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'tags' => [
'private' => [
'to review'
],
'public' => [
'invoice',
'2026'
]
],
'timezone' => 'Europe/Prague'
],
'receiver' => [
'john.doe+member@example.com'
],
'usePdfA' => false
]),
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/bulk/create?token="
payload := strings.NewReader("{\n \"definitionType\": \"ext\",\n \"workflow\": \"wf_archive\",\n \"actionId\": 3,\n \"addMentionRights\": true,\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"convertToPDF\": false,\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"groupReceiver\": [\n \"everyone\"\n ],\n \"isPublicComment\": false,\n \"optionalData\": {\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 \"barcodeData\": [\n \"<string>\"\n ],\n \"cloneFiles\": true,\n \"cloneMainFile\": true,\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\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 \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"signFields\": [\n {\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.07,\n \"percentWidth\": 0.2,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n },\n \"type\": \"signature\",\n \"align\": \"left\",\n \"backgroundColor\": \"#ffaa55\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 11,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 128,\n \"numberOfLines\": 99,\n \"order\": 123,\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"usage\": \"manual\",\n \"user\": [\n \"john.doe+member@example.com\"\n ],\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\",\n \"values\": [\n \"Yes\",\n \"No\"\n ],\n \"zIndex\": 123\n }\n ],\n \"sourceDocumentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"tags\": {\n \"private\": [\n \"to review\"\n ],\n \"public\": [\n \"invoice\",\n \"2026\"\n ]\n },\n \"timezone\": \"Europe/Prague\"\n },\n \"receiver\": [\n \"john.doe+member@example.com\"\n ],\n \"usePdfA\": false\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/bulk/create?token=")
.header("Content-Type", "application/json")
.body("{\n \"definitionType\": \"ext\",\n \"workflow\": \"wf_archive\",\n \"actionId\": 3,\n \"addMentionRights\": true,\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"convertToPDF\": false,\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"groupReceiver\": [\n \"everyone\"\n ],\n \"isPublicComment\": false,\n \"optionalData\": {\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 \"barcodeData\": [\n \"<string>\"\n ],\n \"cloneFiles\": true,\n \"cloneMainFile\": true,\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\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 \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"signFields\": [\n {\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.07,\n \"percentWidth\": 0.2,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n },\n \"type\": \"signature\",\n \"align\": \"left\",\n \"backgroundColor\": \"#ffaa55\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 11,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 128,\n \"numberOfLines\": 99,\n \"order\": 123,\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"usage\": \"manual\",\n \"user\": [\n \"john.doe+member@example.com\"\n ],\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\",\n \"values\": [\n \"Yes\",\n \"No\"\n ],\n \"zIndex\": 123\n }\n ],\n \"sourceDocumentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"tags\": {\n \"private\": [\n \"to review\"\n ],\n \"public\": [\n \"invoice\",\n \"2026\"\n ]\n },\n \"timezone\": \"Europe/Prague\"\n },\n \"receiver\": [\n \"john.doe+member@example.com\"\n ],\n \"usePdfA\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/bulk/create?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 \"definitionType\": \"ext\",\n \"workflow\": \"wf_archive\",\n \"actionId\": 3,\n \"addMentionRights\": true,\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"convertToPDF\": false,\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"groupReceiver\": [\n \"everyone\"\n ],\n \"isPublicComment\": false,\n \"optionalData\": {\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 \"barcodeData\": [\n \"<string>\"\n ],\n \"cloneFiles\": true,\n \"cloneMainFile\": true,\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\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 \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"signFields\": [\n {\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.07,\n \"percentWidth\": 0.2,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n },\n \"type\": \"signature\",\n \"align\": \"left\",\n \"backgroundColor\": \"#ffaa55\",\n \"bold\": true,\n \"color\": \"#ffaa55\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 11,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 128,\n \"numberOfLines\": 99,\n \"order\": 123,\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"usage\": \"manual\",\n \"user\": [\n \"john.doe+member@example.com\"\n ],\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\",\n \"values\": [\n \"Yes\",\n \"No\"\n ],\n \"zIndex\": 123\n }\n ],\n \"sourceDocumentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"tags\": {\n \"private\": [\n \"to review\"\n ],\n \"public\": [\n \"invoice\",\n \"2026\"\n ]\n },\n \"timezone\": \"Europe/Prague\"\n },\n \"receiver\": [\n \"john.doe+member@example.com\"\n ],\n \"usePdfA\": false\n}"
response = http.request(request)
puts response.read_body{
"count": 22,
"errors": false,
"failed": [
1
],
"items": [
{
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"index": "default_documents",
"status": 409,
"message": "Incorrect version",
"payload": {},
"type": "DOCUMENT:VERSION_CONFLICT"
}
],
"success": [
"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": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Body
Comment stored on the workflow history record of the executed action. Its text is scanned for user and document mentions. May carry basic formatting — bold, italic, underline, https links and bullet lists; everything else is stripped on input.
2000"Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>."
Users receiving the document as recipients of the executed workflow action, by username. A value that matches no user but is a valid email address becomes an external recipient and is given a share.
Username that uniquely identifies a user in the system. Usually an email address. A single "+" sub-addressing tag (RFC 5233) is allowed in the local part.
1^[A-Za-z0-9.@_+-]+$Response
Returns the identifiers of the created documents, the positions of the entries that failed and the outcome of every entry.