curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"definitionType": "ext",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"workflow": "wf_archive",
"body": {
"alerts": [
{
"alertTo": "john.doe@example.com",
"fieldName": "D_EMPLOYMENT_START_DATE",
"message": "The contract expires next week.",
"sent": true,
"timeDiff": 259200000,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"documentCategory": "Contract",
"documentTitle": "Contract Agreement",
"enumSelections": {},
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "LegalNotes.docx",
"public": false
}
],
"html": "<string>",
"preparationDraft": {
"sequential": true,
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": true,
"delegate": true,
"expirationEnabled": true,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": true,
"kycFactors": [
"idVerification",
"livenessDetection"
],
"kycProvider": "identomat",
"mailProtection": true,
"message": "<string>",
"metadata": true,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": true,
"password": "<string>",
"passwordProtection": true,
"print": true,
"rejectWithoutComment": true,
"remindersEnabled": true,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": true,
"uploadFiles": true,
"usersWithKycData": [
{
"kycDocumentTypes": [
"passport",
"idCard"
],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"signatureProvider": "internal",
"signatureType": "signature",
"signEntities": [
{
"inGroup": true,
"order": 123,
"quorum": 123,
"shareData": [
{
"allowedOAuth": "uaePass",
"canAnnotateOnReject": true,
"delegate": true,
"expirationEnabled": true,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"kycDocumentTypes": [],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"kycFactors": [],
"kycProvider": "<string>",
"language": "en",
"mailProtection": true,
"message": "Please countersign before Friday.",
"metadata": true,
"nafathId": "1012345678",
"nafathProtection": true,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": true,
"password": "<string>",
"passwordProtection": true,
"phone": "+420777123456",
"print": true,
"rejectWithoutComment": true,
"remindersEnabled": true,
"remindersIntervalDays": 3,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": true,
"uploadFiles": true,
"user": {
"contactType": "<string>",
"fullname": "John Doe",
"language": "en",
"mail": "john.doe@example.com",
"name": "john.doe@example.com",
"type": "internal"
}
}
],
"shareType": "sign",
"type": "user",
"usage": "manual",
"userRoleId": 123,
"userRoleName": "Recipient 1"
}
],
"signFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": true,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 123,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": true,
"maxCharacters": 123,
"multipage": true,
"numberOfLines": 123,
"order": 123,
"pages": [
1,
2
],
"position": {
"percentHeight": 0.03176305676305678,
"percentWidth": 0.43921568627450985,
"percentX": 0.49892906639788337,
"percentY": 0.2465883269647186
},
"public": true,
"readOnly": true,
"required": true,
"subtype": "annotation_generic",
"text": "<string>",
"time": true,
"timestamp": true,
"tooltip": "Sign here",
"type": "signature",
"usage": "manual",
"user": [
"john.doe+member@example.com"
],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": [
"Yes",
"No"
],
"zIndex": 123
}
],
"signStep": "users",
"tsaType": "signatureOnly"
},
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": true,
"delegate": true,
"expirationEnabled": true,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": true,
"kycFactors": [
"idVerification",
"livenessDetection"
],
"kycProvider": "identomat",
"mailProtection": true,
"message": "<string>",
"metadata": true,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": true,
"password": "<string>",
"passwordProtection": true,
"print": true,
"rejectWithoutComment": true,
"remindersEnabled": true,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": true,
"uploadFiles": true,
"usersWithKycData": [
{
"kycDocumentTypes": [
"passport",
"idCard"
],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"showBarcode": true,
"submittedFiles": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "IDCardFront.pdf",
"public": false
}
],
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartDate": "2026-10-01T00:00:00.000Z"
},
"reminders": [
{
"notifyOwner": true,
"period": "30d",
"recipients": [
"jane.doe@example.com"
],
"time": "09:00"
}
],
"renewal": {
"finalDate": "2030-12-31T00:00:00.000Z",
"maxRenewals": 50,
"noticePeriod": "3M",
"period": "1y"
}
}
},
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": false,
"isPublicComment": false,
"optionalData": {
"barcodeData": [
"<string>"
],
"convert": false,
"createLinks": true,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"isPublic": true,
"merge": [
"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
],
"ocr": true,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"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"
},
"usePdfA": true
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/edit/{version}?token="
payload = {
"definitionType": "ext",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"workflow": "wf_archive",
"body": {
"alerts": [
{
"alertTo": "john.doe@example.com",
"fieldName": "D_EMPLOYMENT_START_DATE",
"message": "The contract expires next week.",
"sent": True,
"timeDiff": 259200000,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"documentCategory": "Contract",
"documentTitle": "Contract Agreement",
"enumSelections": {},
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "LegalNotes.docx",
"public": False
}
],
"html": "<string>",
"preparationDraft": {
"sequential": True,
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": True,
"delegate": True,
"expirationEnabled": True,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": True,
"kycFactors": ["idVerification", "livenessDetection"],
"kycProvider": "identomat",
"mailProtection": True,
"message": "<string>",
"metadata": True,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": True,
"password": "<string>",
"passwordProtection": True,
"print": True,
"rejectWithoutComment": True,
"remindersEnabled": True,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": True,
"uploadFiles": True,
"usersWithKycData": [
{
"kycDocumentTypes": ["passport", "idCard"],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"signatureProvider": "internal",
"signatureType": "signature",
"signEntities": [
{
"inGroup": True,
"order": 123,
"quorum": 123,
"shareData": [
{
"allowedOAuth": "uaePass",
"canAnnotateOnReject": True,
"delegate": True,
"expirationEnabled": True,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"kycDocumentTypes": [],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"kycFactors": [],
"kycProvider": "<string>",
"language": "en",
"mailProtection": True,
"message": "Please countersign before Friday.",
"metadata": True,
"nafathId": "1012345678",
"nafathProtection": True,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": True,
"password": "<string>",
"passwordProtection": True,
"phone": "+420777123456",
"print": True,
"rejectWithoutComment": True,
"remindersEnabled": True,
"remindersIntervalDays": 3,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": True,
"uploadFiles": True,
"user": {
"contactType": "<string>",
"fullname": "John Doe",
"language": "en",
"mail": "john.doe@example.com",
"name": "john.doe@example.com",
"type": "internal"
}
}
],
"shareType": "sign",
"type": "user",
"usage": "manual",
"userRoleId": 123,
"userRoleName": "Recipient 1"
}
],
"signFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": True,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 123,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": True,
"maxCharacters": 123,
"multipage": True,
"numberOfLines": 123,
"order": 123,
"pages": [1, 2],
"position": {
"percentHeight": 0.03176305676305678,
"percentWidth": 0.43921568627450985,
"percentX": 0.49892906639788337,
"percentY": 0.2465883269647186
},
"public": True,
"readOnly": True,
"required": True,
"subtype": "annotation_generic",
"text": "<string>",
"time": True,
"timestamp": True,
"tooltip": "Sign here",
"type": "signature",
"usage": "manual",
"user": ["john.doe+member@example.com"],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": ["Yes", "No"],
"zIndex": 123
}
],
"signStep": "users",
"tsaType": "signatureOnly"
},
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": True,
"delegate": True,
"expirationEnabled": True,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": True,
"kycFactors": ["idVerification", "livenessDetection"],
"kycProvider": "identomat",
"mailProtection": True,
"message": "<string>",
"metadata": True,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": True,
"password": "<string>",
"passwordProtection": True,
"print": True,
"rejectWithoutComment": True,
"remindersEnabled": True,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": True,
"uploadFiles": True,
"usersWithKycData": [
{
"kycDocumentTypes": ["passport", "idCard"],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"showBarcode": True,
"submittedFiles": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "IDCardFront.pdf",
"public": False
}
],
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartDate": "2026-10-01T00:00:00.000Z"
},
"reminders": [
{
"notifyOwner": True,
"period": "30d",
"recipients": ["jane.doe@example.com"],
"time": "09:00"
}
],
"renewal": {
"finalDate": "2030-12-31T00:00:00.000Z",
"maxRenewals": 50,
"noticePeriod": "3M",
"period": "1y"
}
}
},
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": False,
"isPublicComment": False,
"optionalData": {
"barcodeData": ["<string>"],
"convert": False,
"createLinks": True,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"isPublic": True,
"merge": ["s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"],
"ocr": True,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"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"
},
"usePdfA": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
definitionType: 'ext',
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
workflow: 'wf_archive',
body: JSON.stringify({
alerts: [
{
alertTo: 'john.doe@example.com',
fieldName: 'D_EMPLOYMENT_START_DATE',
message: 'The contract expires next week.',
sent: true,
timeDiff: 259200000,
triggerOn: '2023-11-07T05:31:56Z'
}
],
counterId: 'TEF_2016_aa_001',
customFields: [
{
key: 'internalReference',
type: 'string',
value: 'ACME-2026-001',
displayName: 'Internal reference'
}
],
documentCategory: 'Contract',
documentTitle: 'Contract Agreement',
enumSelections: {},
expiresOn: '2026-12-31T00:00:00.000Z',
file: [
{
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
name: 'LegalNotes.docx',
public: false
}
],
html: '<string>',
preparationDraft: {
sequential: true,
shareSettings: {
allowedOAuth: '<string>',
canAnnotateOnReject: true,
delegate: true,
expirationEnabled: true,
expirationTime: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
isPublicComment: true,
kycFactors: ['idVerification', 'livenessDetection'],
kycProvider: 'identomat',
mailProtection: true,
message: '<string>',
metadata: true,
oauthFactors: [{type: 'email', value: 'john.doe@example.com'}],
oauthFactorTypes: [],
oAuthProtection: true,
password: '<string>',
passwordProtection: true,
print: true,
rejectWithoutComment: true,
remindersEnabled: true,
remindersIntervalDays: 123,
remindersStartDays: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
smsProtection: true,
uploadFiles: true,
usersWithKycData: [
{
kycDocumentTypes: ['passport', 'idCard'],
kycExpectedData: {
dateOfBirth: '1988-11-13T00:00:00.000Z',
documentNumber: 'X1234567',
nationality: 'CZE'
},
kycExpectedDataFields: [],
user: 'john.doe@example.com'
}
],
usersWithOAuthFactors: [
{
oauthFactors: [{type: 'phoneNumber', value: '+420777123456'}],
oauthFactorTypes: [],
user: 'john.doe@example.com'
}
]
},
signatureProvider: 'internal',
signatureType: 'signature',
signEntities: [
{
inGroup: true,
order: 123,
quorum: 123,
shareData: [
{
allowedOAuth: 'uaePass',
canAnnotateOnReject: true,
delegate: true,
expirationEnabled: true,
expirationTime: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
kycDocumentTypes: [],
kycExpectedData: {
dateOfBirth: '1988-11-13T00:00:00.000Z',
documentNumber: 'X1234567',
nationality: 'CZE'
},
kycExpectedDataFields: [],
kycFactors: [],
kycProvider: '<string>',
language: 'en',
mailProtection: true,
message: 'Please countersign before Friday.',
metadata: true,
nafathId: '1012345678',
nafathProtection: true,
oauthFactors: [{type: 'email', value: 'john.doe@example.com'}],
oauthFactorTypes: [],
oAuthProtection: true,
password: '<string>',
passwordProtection: true,
phone: '+420777123456',
print: true,
rejectWithoutComment: true,
remindersEnabled: true,
remindersIntervalDays: 3,
remindersStartDays: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
smsProtection: true,
uploadFiles: true,
user: {
contactType: '<string>',
fullname: 'John Doe',
language: 'en',
mail: 'john.doe@example.com',
name: 'john.doe@example.com',
type: 'internal'
}
}
],
shareType: 'sign',
type: 'user',
usage: 'manual',
userRoleId: 123,
userRoleName: 'Recipient 1'
}
],
signFields: [
{
align: 'center',
backgroundColor: '#FFFF00',
bold: true,
color: '#000000',
config: '{"multipageType":"all","multiPageCustom":"1"}',
fieldGroupId: 123,
fileName: 'evidence.pdf',
font: 'default',
fontSize: 123,
groupId: 123,
id: '1LTn5IimzXh68bOv',
link: 'https://example.com',
lockRatio: true,
maxCharacters: 123,
multipage: true,
numberOfLines: 123,
order: 123,
pages: [1, 2],
position: {
percentHeight: 0.03176305676305678,
percentWidth: 0.43921568627450985,
percentX: 0.49892906639788337,
percentY: 0.2465883269647186
},
public: true,
readOnly: true,
required: true,
subtype: 'annotation_generic',
text: '<string>',
time: true,
timestamp: true,
tooltip: 'Sign here',
type: 'signature',
usage: 'manual',
user: ['john.doe+member@example.com'],
userRoleId: 123,
userRoleName: 'Recipient 1',
values: ['Yes', 'No'],
zIndex: 123
}
],
signStep: 'users',
tsaType: 'signatureOnly'
},
shareSettings: {
allowedOAuth: '<string>',
canAnnotateOnReject: true,
delegate: true,
expirationEnabled: true,
expirationTime: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
isPublicComment: true,
kycFactors: ['idVerification', 'livenessDetection'],
kycProvider: 'identomat',
mailProtection: true,
message: '<string>',
metadata: true,
oauthFactors: [{type: 'email', value: 'john.doe@example.com'}],
oauthFactorTypes: [],
oAuthProtection: true,
password: '<string>',
passwordProtection: true,
print: true,
rejectWithoutComment: true,
remindersEnabled: true,
remindersIntervalDays: 123,
remindersStartDays: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
smsProtection: true,
uploadFiles: true,
usersWithKycData: [
{
kycDocumentTypes: ['passport', 'idCard'],
kycExpectedData: {
dateOfBirth: '1988-11-13T00:00:00.000Z',
documentNumber: 'X1234567',
nationality: 'CZE'
},
kycExpectedDataFields: [],
user: 'john.doe@example.com'
}
],
usersWithOAuthFactors: [
{
oauthFactors: [{type: 'phoneNumber', value: '+420777123456'}],
oauthFactorTypes: [],
user: 'john.doe@example.com'
}
]
},
showBarcode: true,
submittedFiles: [
{
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
name: 'IDCardFront.pdf',
public: false
}
],
term: {
nonFixedTerm: {noticePeriod: '3M', terminationStartDate: '2026-10-01T00:00:00.000Z'},
reminders: [
{
notifyOwner: true,
period: '30d',
recipients: ['jane.doe@example.com'],
time: '09:00'
}
],
renewal: {
finalDate: '2030-12-31T00:00:00.000Z',
maxRenewals: 50,
noticePeriod: '3M',
period: '1y'
}
}
}),
comment: 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
draftId: '8b312068-ecdf-4fa6-8f13-c6183da85f43',
forcePdfA: false,
isPublicComment: false,
optionalData: {
barcodeData: ['<string>'],
convert: false,
createLinks: true,
emailAttachments: {},
folder: '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
isPublic: true,
merge: ['s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'],
ocr: true,
path: 'Contracts/2026/Q1',
signatureProvider: 'internal',
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'
},
usePdfA: true
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'definitionType' => 'ext',
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'workflow' => 'wf_archive',
'body' => [
'alerts' => [
[
'alertTo' => 'john.doe@example.com',
'fieldName' => 'D_EMPLOYMENT_START_DATE',
'message' => 'The contract expires next week.',
'sent' => true,
'timeDiff' => 259200000,
'triggerOn' => '2023-11-07T05:31:56Z'
]
],
'counterId' => 'TEF_2016_aa_001',
'customFields' => [
[
'key' => 'internalReference',
'type' => 'string',
'value' => 'ACME-2026-001',
'displayName' => 'Internal reference'
]
],
'documentCategory' => 'Contract',
'documentTitle' => 'Contract Agreement',
'enumSelections' => [
],
'expiresOn' => '2026-12-31T00:00:00.000Z',
'file' => [
[
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'name' => 'LegalNotes.docx',
'public' => false
]
],
'html' => '<string>',
'preparationDraft' => [
'sequential' => true,
'shareSettings' => [
'allowedOAuth' => '<string>',
'canAnnotateOnReject' => true,
'delegate' => true,
'expirationEnabled' => true,
'expirationTime' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'isPublicComment' => true,
'kycFactors' => [
'idVerification',
'livenessDetection'
],
'kycProvider' => 'identomat',
'mailProtection' => true,
'message' => '<string>',
'metadata' => true,
'oauthFactors' => [
[
'type' => 'email',
'value' => 'john.doe@example.com'
]
],
'oauthFactorTypes' => [
],
'oAuthProtection' => true,
'password' => '<string>',
'passwordProtection' => true,
'print' => true,
'rejectWithoutComment' => true,
'remindersEnabled' => true,
'remindersIntervalDays' => 123,
'remindersStartDays' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'smsProtection' => true,
'uploadFiles' => true,
'usersWithKycData' => [
[
'kycDocumentTypes' => [
'passport',
'idCard'
],
'kycExpectedData' => [
'dateOfBirth' => '1988-11-13T00:00:00.000Z',
'documentNumber' => 'X1234567',
'nationality' => 'CZE'
],
'kycExpectedDataFields' => [
],
'user' => 'john.doe@example.com'
]
],
'usersWithOAuthFactors' => [
[
'oauthFactors' => [
[
'type' => 'phoneNumber',
'value' => '+420777123456'
]
],
'oauthFactorTypes' => [
],
'user' => 'john.doe@example.com'
]
]
],
'signatureProvider' => 'internal',
'signatureType' => 'signature',
'signEntities' => [
[
'inGroup' => true,
'order' => 123,
'quorum' => 123,
'shareData' => [
[
'allowedOAuth' => 'uaePass',
'canAnnotateOnReject' => true,
'delegate' => true,
'expirationEnabled' => true,
'expirationTime' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'kycDocumentTypes' => [
],
'kycExpectedData' => [
'dateOfBirth' => '1988-11-13T00:00:00.000Z',
'documentNumber' => 'X1234567',
'nationality' => 'CZE'
],
'kycExpectedDataFields' => [
],
'kycFactors' => [
],
'kycProvider' => '<string>',
'language' => 'en',
'mailProtection' => true,
'message' => 'Please countersign before Friday.',
'metadata' => true,
'nafathId' => '1012345678',
'nafathProtection' => true,
'oauthFactors' => [
[
'type' => 'email',
'value' => 'john.doe@example.com'
]
],
'oauthFactorTypes' => [
],
'oAuthProtection' => true,
'password' => '<string>',
'passwordProtection' => true,
'phone' => '+420777123456',
'print' => true,
'rejectWithoutComment' => true,
'remindersEnabled' => true,
'remindersIntervalDays' => 3,
'remindersStartDays' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'smsProtection' => true,
'uploadFiles' => true,
'user' => [
'contactType' => '<string>',
'fullname' => 'John Doe',
'language' => 'en',
'mail' => 'john.doe@example.com',
'name' => 'john.doe@example.com',
'type' => 'internal'
]
]
],
'shareType' => 'sign',
'type' => 'user',
'usage' => 'manual',
'userRoleId' => 123,
'userRoleName' => 'Recipient 1'
]
],
'signFields' => [
[
'align' => 'center',
'backgroundColor' => '#FFFF00',
'bold' => true,
'color' => '#000000',
'config' => '{"multipageType":"all","multiPageCustom":"1"}',
'fieldGroupId' => 123,
'fileName' => 'evidence.pdf',
'font' => 'default',
'fontSize' => 123,
'groupId' => 123,
'id' => '1LTn5IimzXh68bOv',
'link' => 'https://example.com',
'lockRatio' => true,
'maxCharacters' => 123,
'multipage' => true,
'numberOfLines' => 123,
'order' => 123,
'pages' => [
1,
2
],
'position' => [
'percentHeight' => 0.03176305676305678,
'percentWidth' => 0.43921568627450985,
'percentX' => 0.49892906639788337,
'percentY' => 0.2465883269647186
],
'public' => true,
'readOnly' => true,
'required' => true,
'subtype' => 'annotation_generic',
'text' => '<string>',
'time' => true,
'timestamp' => true,
'tooltip' => 'Sign here',
'type' => 'signature',
'usage' => 'manual',
'user' => [
'john.doe+member@example.com'
],
'userRoleId' => 123,
'userRoleName' => 'Recipient 1',
'values' => [
'Yes',
'No'
],
'zIndex' => 123
]
],
'signStep' => 'users',
'tsaType' => 'signatureOnly'
],
'shareSettings' => [
'allowedOAuth' => '<string>',
'canAnnotateOnReject' => true,
'delegate' => true,
'expirationEnabled' => true,
'expirationTime' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'isPublicComment' => true,
'kycFactors' => [
'idVerification',
'livenessDetection'
],
'kycProvider' => 'identomat',
'mailProtection' => true,
'message' => '<string>',
'metadata' => true,
'oauthFactors' => [
[
'type' => 'email',
'value' => 'john.doe@example.com'
]
],
'oauthFactorTypes' => [
],
'oAuthProtection' => true,
'password' => '<string>',
'passwordProtection' => true,
'print' => true,
'rejectWithoutComment' => true,
'remindersEnabled' => true,
'remindersIntervalDays' => 123,
'remindersStartDays' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'smsProtection' => true,
'uploadFiles' => true,
'usersWithKycData' => [
[
'kycDocumentTypes' => [
'passport',
'idCard'
],
'kycExpectedData' => [
'dateOfBirth' => '1988-11-13T00:00:00.000Z',
'documentNumber' => 'X1234567',
'nationality' => 'CZE'
],
'kycExpectedDataFields' => [
],
'user' => 'john.doe@example.com'
]
],
'usersWithOAuthFactors' => [
[
'oauthFactors' => [
[
'type' => 'phoneNumber',
'value' => '+420777123456'
]
],
'oauthFactorTypes' => [
],
'user' => 'john.doe@example.com'
]
]
],
'showBarcode' => true,
'submittedFiles' => [
[
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'name' => 'IDCardFront.pdf',
'public' => false
]
],
'term' => [
'nonFixedTerm' => [
'noticePeriod' => '3M',
'terminationStartDate' => '2026-10-01T00:00:00.000Z'
],
'reminders' => [
[
'notifyOwner' => true,
'period' => '30d',
'recipients' => [
'jane.doe@example.com'
],
'time' => '09:00'
]
],
'renewal' => [
'finalDate' => '2030-12-31T00:00:00.000Z',
'maxRenewals' => 50,
'noticePeriod' => '3M',
'period' => '1y'
]
]
],
'comment' => 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
'draftId' => '8b312068-ecdf-4fa6-8f13-c6183da85f43',
'forcePdfA' => false,
'isPublicComment' => false,
'optionalData' => [
'barcodeData' => [
'<string>'
],
'convert' => false,
'createLinks' => true,
'emailAttachments' => [
],
'folder' => '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
'isPublic' => true,
'merge' => [
's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'
],
'ocr' => true,
'path' => 'Contracts/2026/Q1',
'signatureProvider' => 'internal',
'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'
],
'usePdfA' => true
]),
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/edit/{version}?token="
payload := strings.NewReader("{\n \"definitionType\": \"ext\",\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"workflow\": \"wf_archive\",\n \"body\": {\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"fieldName\": \"D_EMPLOYMENT_START_DATE\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\n \"timeDiff\": 259200000,\n \"triggerOn\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"counterId\": \"TEF_2016_aa_001\",\n \"customFields\": [\n {\n \"key\": \"internalReference\",\n \"type\": \"string\",\n \"value\": \"ACME-2026-001\",\n \"displayName\": \"Internal reference\"\n }\n ],\n \"documentCategory\": \"Contract\",\n \"documentTitle\": \"Contract Agreement\",\n \"enumSelections\": {},\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"LegalNotes.docx\",\n \"public\": false\n }\n ],\n \"html\": \"<string>\",\n \"preparationDraft\": {\n \"sequential\": true,\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"signatureProvider\": \"internal\",\n \"signatureType\": \"signature\",\n \"signEntities\": [\n {\n \"inGroup\": true,\n \"order\": 123,\n \"quorum\": 123,\n \"shareData\": [\n {\n \"allowedOAuth\": \"uaePass\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"kycDocumentTypes\": [],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"kycFactors\": [],\n \"kycProvider\": \"<string>\",\n \"language\": \"en\",\n \"mailProtection\": true,\n \"message\": \"Please countersign before Friday.\",\n \"metadata\": true,\n \"nafathId\": \"1012345678\",\n \"nafathProtection\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"phone\": \"+420777123456\",\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 3,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"user\": {\n \"contactType\": \"<string>\",\n \"fullname\": \"John Doe\",\n \"language\": \"en\",\n \"mail\": \"john.doe@example.com\",\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n }\n ],\n \"shareType\": \"sign\",\n \"type\": \"user\",\n \"usage\": \"manual\",\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\"\n }\n ],\n \"signFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 123,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 123,\n \"multipage\": true,\n \"numberOfLines\": 123,\n \"order\": 123,\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.03176305676305678,\n \"percentWidth\": 0.43921568627450985,\n \"percentX\": 0.49892906639788337,\n \"percentY\": 0.2465883269647186\n },\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"time\": true,\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"type\": \"signature\",\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 \"signStep\": \"users\",\n \"tsaType\": \"signatureOnly\"\n },\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"showBarcode\": true,\n \"submittedFiles\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"IDCardFront.pdf\",\n \"public\": false\n }\n ],\n \"term\": {\n \"nonFixedTerm\": {\n \"noticePeriod\": \"3M\",\n \"terminationStartDate\": \"2026-10-01T00:00:00.000Z\"\n },\n \"reminders\": [\n {\n \"notifyOwner\": true,\n \"period\": \"30d\",\n \"recipients\": [\n \"jane.doe@example.com\"\n ],\n \"time\": \"09:00\"\n }\n ],\n \"renewal\": {\n \"finalDate\": \"2030-12-31T00:00:00.000Z\",\n \"maxRenewals\": 50,\n \"noticePeriod\": \"3M\",\n \"period\": \"1y\"\n }\n }\n },\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"isPublicComment\": false,\n \"optionalData\": {\n \"barcodeData\": [\n \"<string>\"\n ],\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\n \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"usePdfA\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=")
.header("Content-Type", "application/json")
.body("{\n \"definitionType\": \"ext\",\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"workflow\": \"wf_archive\",\n \"body\": {\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"fieldName\": \"D_EMPLOYMENT_START_DATE\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\n \"timeDiff\": 259200000,\n \"triggerOn\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"counterId\": \"TEF_2016_aa_001\",\n \"customFields\": [\n {\n \"key\": \"internalReference\",\n \"type\": \"string\",\n \"value\": \"ACME-2026-001\",\n \"displayName\": \"Internal reference\"\n }\n ],\n \"documentCategory\": \"Contract\",\n \"documentTitle\": \"Contract Agreement\",\n \"enumSelections\": {},\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"LegalNotes.docx\",\n \"public\": false\n }\n ],\n \"html\": \"<string>\",\n \"preparationDraft\": {\n \"sequential\": true,\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"signatureProvider\": \"internal\",\n \"signatureType\": \"signature\",\n \"signEntities\": [\n {\n \"inGroup\": true,\n \"order\": 123,\n \"quorum\": 123,\n \"shareData\": [\n {\n \"allowedOAuth\": \"uaePass\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"kycDocumentTypes\": [],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"kycFactors\": [],\n \"kycProvider\": \"<string>\",\n \"language\": \"en\",\n \"mailProtection\": true,\n \"message\": \"Please countersign before Friday.\",\n \"metadata\": true,\n \"nafathId\": \"1012345678\",\n \"nafathProtection\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"phone\": \"+420777123456\",\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 3,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"user\": {\n \"contactType\": \"<string>\",\n \"fullname\": \"John Doe\",\n \"language\": \"en\",\n \"mail\": \"john.doe@example.com\",\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n }\n ],\n \"shareType\": \"sign\",\n \"type\": \"user\",\n \"usage\": \"manual\",\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\"\n }\n ],\n \"signFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 123,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 123,\n \"multipage\": true,\n \"numberOfLines\": 123,\n \"order\": 123,\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.03176305676305678,\n \"percentWidth\": 0.43921568627450985,\n \"percentX\": 0.49892906639788337,\n \"percentY\": 0.2465883269647186\n },\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"time\": true,\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"type\": \"signature\",\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 \"signStep\": \"users\",\n \"tsaType\": \"signatureOnly\"\n },\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"showBarcode\": true,\n \"submittedFiles\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"IDCardFront.pdf\",\n \"public\": false\n }\n ],\n \"term\": {\n \"nonFixedTerm\": {\n \"noticePeriod\": \"3M\",\n \"terminationStartDate\": \"2026-10-01T00:00:00.000Z\"\n },\n \"reminders\": [\n {\n \"notifyOwner\": true,\n \"period\": \"30d\",\n \"recipients\": [\n \"jane.doe@example.com\"\n ],\n \"time\": \"09:00\"\n }\n ],\n \"renewal\": {\n \"finalDate\": \"2030-12-31T00:00:00.000Z\",\n \"maxRenewals\": 50,\n \"noticePeriod\": \"3M\",\n \"period\": \"1y\"\n }\n }\n },\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"isPublicComment\": false,\n \"optionalData\": {\n \"barcodeData\": [\n \"<string>\"\n ],\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\n \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"usePdfA\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"definitionType\": \"ext\",\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"workflow\": \"wf_archive\",\n \"body\": {\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"fieldName\": \"D_EMPLOYMENT_START_DATE\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\n \"timeDiff\": 259200000,\n \"triggerOn\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"counterId\": \"TEF_2016_aa_001\",\n \"customFields\": [\n {\n \"key\": \"internalReference\",\n \"type\": \"string\",\n \"value\": \"ACME-2026-001\",\n \"displayName\": \"Internal reference\"\n }\n ],\n \"documentCategory\": \"Contract\",\n \"documentTitle\": \"Contract Agreement\",\n \"enumSelections\": {},\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"LegalNotes.docx\",\n \"public\": false\n }\n ],\n \"html\": \"<string>\",\n \"preparationDraft\": {\n \"sequential\": true,\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"signatureProvider\": \"internal\",\n \"signatureType\": \"signature\",\n \"signEntities\": [\n {\n \"inGroup\": true,\n \"order\": 123,\n \"quorum\": 123,\n \"shareData\": [\n {\n \"allowedOAuth\": \"uaePass\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"kycDocumentTypes\": [],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"kycFactors\": [],\n \"kycProvider\": \"<string>\",\n \"language\": \"en\",\n \"mailProtection\": true,\n \"message\": \"Please countersign before Friday.\",\n \"metadata\": true,\n \"nafathId\": \"1012345678\",\n \"nafathProtection\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"phone\": \"+420777123456\",\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 3,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"user\": {\n \"contactType\": \"<string>\",\n \"fullname\": \"John Doe\",\n \"language\": \"en\",\n \"mail\": \"john.doe@example.com\",\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n }\n ],\n \"shareType\": \"sign\",\n \"type\": \"user\",\n \"usage\": \"manual\",\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\"\n }\n ],\n \"signFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 123,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 123,\n \"multipage\": true,\n \"numberOfLines\": 123,\n \"order\": 123,\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.03176305676305678,\n \"percentWidth\": 0.43921568627450985,\n \"percentX\": 0.49892906639788337,\n \"percentY\": 0.2465883269647186\n },\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"time\": true,\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"type\": \"signature\",\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 \"signStep\": \"users\",\n \"tsaType\": \"signatureOnly\"\n },\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"showBarcode\": true,\n \"submittedFiles\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"IDCardFront.pdf\",\n \"public\": false\n }\n ],\n \"term\": {\n \"nonFixedTerm\": {\n \"noticePeriod\": \"3M\",\n \"terminationStartDate\": \"2026-10-01T00:00:00.000Z\"\n },\n \"reminders\": [\n {\n \"notifyOwner\": true,\n \"period\": \"30d\",\n \"recipients\": [\n \"jane.doe@example.com\"\n ],\n \"time\": \"09:00\"\n }\n ],\n \"renewal\": {\n \"finalDate\": \"2030-12-31T00:00:00.000Z\",\n \"maxRenewals\": 50,\n \"noticePeriod\": \"3M\",\n \"period\": \"1y\"\n }\n }\n },\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"isPublicComment\": false,\n \"optionalData\": {\n \"barcodeData\": [\n \"<string>\"\n ],\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\n \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"usePdfA\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Edit a document
PUT /documents/edit/{version}
Replaces the document’s content and metadata with what is sent here and records the change as a new version in its history. This is the ordinary edit; an update submitted as part of a rework action goes to PUT /documents/{version} instead, which also carries the workflow forward.
The body describes the document as it should end up, so a field left out is not preserved by omission - with two deliberate exceptions, because they are expensive to resend: leaving out body.file keeps the existing attachments and leaving out body.submittedFiles keeps the existing submitted files. Files themselves are uploaded beforehand and referenced by hash.
Several parts of the body are gated beyond the endpoint’s own right: custom fields need the right that permits them, attachments need the one that permits attaching files - without it only files going into a merge may be listed - and submitted files may only be changed by the document’s owner, and only before its transaction has started.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"definitionType": "ext",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"workflow": "wf_archive",
"body": {
"alerts": [
{
"alertTo": "john.doe@example.com",
"fieldName": "D_EMPLOYMENT_START_DATE",
"message": "The contract expires next week.",
"sent": true,
"timeDiff": 259200000,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"documentCategory": "Contract",
"documentTitle": "Contract Agreement",
"enumSelections": {},
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "LegalNotes.docx",
"public": false
}
],
"html": "<string>",
"preparationDraft": {
"sequential": true,
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": true,
"delegate": true,
"expirationEnabled": true,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": true,
"kycFactors": [
"idVerification",
"livenessDetection"
],
"kycProvider": "identomat",
"mailProtection": true,
"message": "<string>",
"metadata": true,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": true,
"password": "<string>",
"passwordProtection": true,
"print": true,
"rejectWithoutComment": true,
"remindersEnabled": true,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": true,
"uploadFiles": true,
"usersWithKycData": [
{
"kycDocumentTypes": [
"passport",
"idCard"
],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"signatureProvider": "internal",
"signatureType": "signature",
"signEntities": [
{
"inGroup": true,
"order": 123,
"quorum": 123,
"shareData": [
{
"allowedOAuth": "uaePass",
"canAnnotateOnReject": true,
"delegate": true,
"expirationEnabled": true,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"kycDocumentTypes": [],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"kycFactors": [],
"kycProvider": "<string>",
"language": "en",
"mailProtection": true,
"message": "Please countersign before Friday.",
"metadata": true,
"nafathId": "1012345678",
"nafathProtection": true,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": true,
"password": "<string>",
"passwordProtection": true,
"phone": "+420777123456",
"print": true,
"rejectWithoutComment": true,
"remindersEnabled": true,
"remindersIntervalDays": 3,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": true,
"uploadFiles": true,
"user": {
"contactType": "<string>",
"fullname": "John Doe",
"language": "en",
"mail": "john.doe@example.com",
"name": "john.doe@example.com",
"type": "internal"
}
}
],
"shareType": "sign",
"type": "user",
"usage": "manual",
"userRoleId": 123,
"userRoleName": "Recipient 1"
}
],
"signFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": true,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 123,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": true,
"maxCharacters": 123,
"multipage": true,
"numberOfLines": 123,
"order": 123,
"pages": [
1,
2
],
"position": {
"percentHeight": 0.03176305676305678,
"percentWidth": 0.43921568627450985,
"percentX": 0.49892906639788337,
"percentY": 0.2465883269647186
},
"public": true,
"readOnly": true,
"required": true,
"subtype": "annotation_generic",
"text": "<string>",
"time": true,
"timestamp": true,
"tooltip": "Sign here",
"type": "signature",
"usage": "manual",
"user": [
"john.doe+member@example.com"
],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": [
"Yes",
"No"
],
"zIndex": 123
}
],
"signStep": "users",
"tsaType": "signatureOnly"
},
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": true,
"delegate": true,
"expirationEnabled": true,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": true,
"kycFactors": [
"idVerification",
"livenessDetection"
],
"kycProvider": "identomat",
"mailProtection": true,
"message": "<string>",
"metadata": true,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": true,
"password": "<string>",
"passwordProtection": true,
"print": true,
"rejectWithoutComment": true,
"remindersEnabled": true,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": true,
"uploadFiles": true,
"usersWithKycData": [
{
"kycDocumentTypes": [
"passport",
"idCard"
],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"showBarcode": true,
"submittedFiles": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "IDCardFront.pdf",
"public": false
}
],
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartDate": "2026-10-01T00:00:00.000Z"
},
"reminders": [
{
"notifyOwner": true,
"period": "30d",
"recipients": [
"jane.doe@example.com"
],
"time": "09:00"
}
],
"renewal": {
"finalDate": "2030-12-31T00:00:00.000Z",
"maxRenewals": 50,
"noticePeriod": "3M",
"period": "1y"
}
}
},
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": false,
"isPublicComment": false,
"optionalData": {
"barcodeData": [
"<string>"
],
"convert": false,
"createLinks": true,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"isPublic": true,
"merge": [
"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
],
"ocr": true,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"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"
},
"usePdfA": true
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/edit/{version}?token="
payload = {
"definitionType": "ext",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"workflow": "wf_archive",
"body": {
"alerts": [
{
"alertTo": "john.doe@example.com",
"fieldName": "D_EMPLOYMENT_START_DATE",
"message": "The contract expires next week.",
"sent": True,
"timeDiff": 259200000,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"documentCategory": "Contract",
"documentTitle": "Contract Agreement",
"enumSelections": {},
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "LegalNotes.docx",
"public": False
}
],
"html": "<string>",
"preparationDraft": {
"sequential": True,
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": True,
"delegate": True,
"expirationEnabled": True,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": True,
"kycFactors": ["idVerification", "livenessDetection"],
"kycProvider": "identomat",
"mailProtection": True,
"message": "<string>",
"metadata": True,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": True,
"password": "<string>",
"passwordProtection": True,
"print": True,
"rejectWithoutComment": True,
"remindersEnabled": True,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": True,
"uploadFiles": True,
"usersWithKycData": [
{
"kycDocumentTypes": ["passport", "idCard"],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"signatureProvider": "internal",
"signatureType": "signature",
"signEntities": [
{
"inGroup": True,
"order": 123,
"quorum": 123,
"shareData": [
{
"allowedOAuth": "uaePass",
"canAnnotateOnReject": True,
"delegate": True,
"expirationEnabled": True,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"kycDocumentTypes": [],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"kycFactors": [],
"kycProvider": "<string>",
"language": "en",
"mailProtection": True,
"message": "Please countersign before Friday.",
"metadata": True,
"nafathId": "1012345678",
"nafathProtection": True,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": True,
"password": "<string>",
"passwordProtection": True,
"phone": "+420777123456",
"print": True,
"rejectWithoutComment": True,
"remindersEnabled": True,
"remindersIntervalDays": 3,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": True,
"uploadFiles": True,
"user": {
"contactType": "<string>",
"fullname": "John Doe",
"language": "en",
"mail": "john.doe@example.com",
"name": "john.doe@example.com",
"type": "internal"
}
}
],
"shareType": "sign",
"type": "user",
"usage": "manual",
"userRoleId": 123,
"userRoleName": "Recipient 1"
}
],
"signFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": True,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"font": "default",
"fontSize": 123,
"groupId": 123,
"id": "1LTn5IimzXh68bOv",
"link": "https://example.com",
"lockRatio": True,
"maxCharacters": 123,
"multipage": True,
"numberOfLines": 123,
"order": 123,
"pages": [1, 2],
"position": {
"percentHeight": 0.03176305676305678,
"percentWidth": 0.43921568627450985,
"percentX": 0.49892906639788337,
"percentY": 0.2465883269647186
},
"public": True,
"readOnly": True,
"required": True,
"subtype": "annotation_generic",
"text": "<string>",
"time": True,
"timestamp": True,
"tooltip": "Sign here",
"type": "signature",
"usage": "manual",
"user": ["john.doe+member@example.com"],
"userRoleId": 123,
"userRoleName": "Recipient 1",
"values": ["Yes", "No"],
"zIndex": 123
}
],
"signStep": "users",
"tsaType": "signatureOnly"
},
"shareSettings": {
"allowedOAuth": "<string>",
"canAnnotateOnReject": True,
"delegate": True,
"expirationEnabled": True,
"expirationTime": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"isPublicComment": True,
"kycFactors": ["idVerification", "livenessDetection"],
"kycProvider": "identomat",
"mailProtection": True,
"message": "<string>",
"metadata": True,
"oauthFactors": [
{
"type": "email",
"value": "john.doe@example.com"
}
],
"oauthFactorTypes": [],
"oAuthProtection": True,
"password": "<string>",
"passwordProtection": True,
"print": True,
"rejectWithoutComment": True,
"remindersEnabled": True,
"remindersIntervalDays": 123,
"remindersStartDays": {
"exactTime": "2026-03-01T12:00:00.000Z",
"timeSize": {
"size": "day",
"span": 3
},
"type": "time_span_span"
},
"smsProtection": True,
"uploadFiles": True,
"usersWithKycData": [
{
"kycDocumentTypes": ["passport", "idCard"],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [],
"user": "john.doe@example.com"
}
]
},
"showBarcode": True,
"submittedFiles": [
{
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"name": "IDCardFront.pdf",
"public": False
}
],
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartDate": "2026-10-01T00:00:00.000Z"
},
"reminders": [
{
"notifyOwner": True,
"period": "30d",
"recipients": ["jane.doe@example.com"],
"time": "09:00"
}
],
"renewal": {
"finalDate": "2030-12-31T00:00:00.000Z",
"maxRenewals": 50,
"noticePeriod": "3M",
"period": "1y"
}
}
},
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"draftId": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"forcePdfA": False,
"isPublicComment": False,
"optionalData": {
"barcodeData": ["<string>"],
"convert": False,
"createLinks": True,
"emailAttachments": {},
"folder": "8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce",
"isPublic": True,
"merge": ["s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"],
"ocr": True,
"path": "Contracts/2026/Q1",
"signatureProvider": "internal",
"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"
},
"usePdfA": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
definitionType: 'ext',
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
workflow: 'wf_archive',
body: JSON.stringify({
alerts: [
{
alertTo: 'john.doe@example.com',
fieldName: 'D_EMPLOYMENT_START_DATE',
message: 'The contract expires next week.',
sent: true,
timeDiff: 259200000,
triggerOn: '2023-11-07T05:31:56Z'
}
],
counterId: 'TEF_2016_aa_001',
customFields: [
{
key: 'internalReference',
type: 'string',
value: 'ACME-2026-001',
displayName: 'Internal reference'
}
],
documentCategory: 'Contract',
documentTitle: 'Contract Agreement',
enumSelections: {},
expiresOn: '2026-12-31T00:00:00.000Z',
file: [
{
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
name: 'LegalNotes.docx',
public: false
}
],
html: '<string>',
preparationDraft: {
sequential: true,
shareSettings: {
allowedOAuth: '<string>',
canAnnotateOnReject: true,
delegate: true,
expirationEnabled: true,
expirationTime: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
isPublicComment: true,
kycFactors: ['idVerification', 'livenessDetection'],
kycProvider: 'identomat',
mailProtection: true,
message: '<string>',
metadata: true,
oauthFactors: [{type: 'email', value: 'john.doe@example.com'}],
oauthFactorTypes: [],
oAuthProtection: true,
password: '<string>',
passwordProtection: true,
print: true,
rejectWithoutComment: true,
remindersEnabled: true,
remindersIntervalDays: 123,
remindersStartDays: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
smsProtection: true,
uploadFiles: true,
usersWithKycData: [
{
kycDocumentTypes: ['passport', 'idCard'],
kycExpectedData: {
dateOfBirth: '1988-11-13T00:00:00.000Z',
documentNumber: 'X1234567',
nationality: 'CZE'
},
kycExpectedDataFields: [],
user: 'john.doe@example.com'
}
],
usersWithOAuthFactors: [
{
oauthFactors: [{type: 'phoneNumber', value: '+420777123456'}],
oauthFactorTypes: [],
user: 'john.doe@example.com'
}
]
},
signatureProvider: 'internal',
signatureType: 'signature',
signEntities: [
{
inGroup: true,
order: 123,
quorum: 123,
shareData: [
{
allowedOAuth: 'uaePass',
canAnnotateOnReject: true,
delegate: true,
expirationEnabled: true,
expirationTime: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
kycDocumentTypes: [],
kycExpectedData: {
dateOfBirth: '1988-11-13T00:00:00.000Z',
documentNumber: 'X1234567',
nationality: 'CZE'
},
kycExpectedDataFields: [],
kycFactors: [],
kycProvider: '<string>',
language: 'en',
mailProtection: true,
message: 'Please countersign before Friday.',
metadata: true,
nafathId: '1012345678',
nafathProtection: true,
oauthFactors: [{type: 'email', value: 'john.doe@example.com'}],
oauthFactorTypes: [],
oAuthProtection: true,
password: '<string>',
passwordProtection: true,
phone: '+420777123456',
print: true,
rejectWithoutComment: true,
remindersEnabled: true,
remindersIntervalDays: 3,
remindersStartDays: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
smsProtection: true,
uploadFiles: true,
user: {
contactType: '<string>',
fullname: 'John Doe',
language: 'en',
mail: 'john.doe@example.com',
name: 'john.doe@example.com',
type: 'internal'
}
}
],
shareType: 'sign',
type: 'user',
usage: 'manual',
userRoleId: 123,
userRoleName: 'Recipient 1'
}
],
signFields: [
{
align: 'center',
backgroundColor: '#FFFF00',
bold: true,
color: '#000000',
config: '{"multipageType":"all","multiPageCustom":"1"}',
fieldGroupId: 123,
fileName: 'evidence.pdf',
font: 'default',
fontSize: 123,
groupId: 123,
id: '1LTn5IimzXh68bOv',
link: 'https://example.com',
lockRatio: true,
maxCharacters: 123,
multipage: true,
numberOfLines: 123,
order: 123,
pages: [1, 2],
position: {
percentHeight: 0.03176305676305678,
percentWidth: 0.43921568627450985,
percentX: 0.49892906639788337,
percentY: 0.2465883269647186
},
public: true,
readOnly: true,
required: true,
subtype: 'annotation_generic',
text: '<string>',
time: true,
timestamp: true,
tooltip: 'Sign here',
type: 'signature',
usage: 'manual',
user: ['john.doe+member@example.com'],
userRoleId: 123,
userRoleName: 'Recipient 1',
values: ['Yes', 'No'],
zIndex: 123
}
],
signStep: 'users',
tsaType: 'signatureOnly'
},
shareSettings: {
allowedOAuth: '<string>',
canAnnotateOnReject: true,
delegate: true,
expirationEnabled: true,
expirationTime: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
isPublicComment: true,
kycFactors: ['idVerification', 'livenessDetection'],
kycProvider: 'identomat',
mailProtection: true,
message: '<string>',
metadata: true,
oauthFactors: [{type: 'email', value: 'john.doe@example.com'}],
oauthFactorTypes: [],
oAuthProtection: true,
password: '<string>',
passwordProtection: true,
print: true,
rejectWithoutComment: true,
remindersEnabled: true,
remindersIntervalDays: 123,
remindersStartDays: {
exactTime: '2026-03-01T12:00:00.000Z',
timeSize: {size: 'day', span: 3},
type: 'time_span_span'
},
smsProtection: true,
uploadFiles: true,
usersWithKycData: [
{
kycDocumentTypes: ['passport', 'idCard'],
kycExpectedData: {
dateOfBirth: '1988-11-13T00:00:00.000Z',
documentNumber: 'X1234567',
nationality: 'CZE'
},
kycExpectedDataFields: [],
user: 'john.doe@example.com'
}
],
usersWithOAuthFactors: [
{
oauthFactors: [{type: 'phoneNumber', value: '+420777123456'}],
oauthFactorTypes: [],
user: 'john.doe@example.com'
}
]
},
showBarcode: true,
submittedFiles: [
{
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
name: 'IDCardFront.pdf',
public: false
}
],
term: {
nonFixedTerm: {noticePeriod: '3M', terminationStartDate: '2026-10-01T00:00:00.000Z'},
reminders: [
{
notifyOwner: true,
period: '30d',
recipients: ['jane.doe@example.com'],
time: '09:00'
}
],
renewal: {
finalDate: '2030-12-31T00:00:00.000Z',
maxRenewals: 50,
noticePeriod: '3M',
period: '1y'
}
}
}),
comment: 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
draftId: '8b312068-ecdf-4fa6-8f13-c6183da85f43',
forcePdfA: false,
isPublicComment: false,
optionalData: {
barcodeData: ['<string>'],
convert: false,
createLinks: true,
emailAttachments: {},
folder: '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
isPublic: true,
merge: ['s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'],
ocr: true,
path: 'Contracts/2026/Q1',
signatureProvider: 'internal',
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'
},
usePdfA: true
})
};
fetch('https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'definitionType' => 'ext',
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'workflow' => 'wf_archive',
'body' => [
'alerts' => [
[
'alertTo' => 'john.doe@example.com',
'fieldName' => 'D_EMPLOYMENT_START_DATE',
'message' => 'The contract expires next week.',
'sent' => true,
'timeDiff' => 259200000,
'triggerOn' => '2023-11-07T05:31:56Z'
]
],
'counterId' => 'TEF_2016_aa_001',
'customFields' => [
[
'key' => 'internalReference',
'type' => 'string',
'value' => 'ACME-2026-001',
'displayName' => 'Internal reference'
]
],
'documentCategory' => 'Contract',
'documentTitle' => 'Contract Agreement',
'enumSelections' => [
],
'expiresOn' => '2026-12-31T00:00:00.000Z',
'file' => [
[
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'name' => 'LegalNotes.docx',
'public' => false
]
],
'html' => '<string>',
'preparationDraft' => [
'sequential' => true,
'shareSettings' => [
'allowedOAuth' => '<string>',
'canAnnotateOnReject' => true,
'delegate' => true,
'expirationEnabled' => true,
'expirationTime' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'isPublicComment' => true,
'kycFactors' => [
'idVerification',
'livenessDetection'
],
'kycProvider' => 'identomat',
'mailProtection' => true,
'message' => '<string>',
'metadata' => true,
'oauthFactors' => [
[
'type' => 'email',
'value' => 'john.doe@example.com'
]
],
'oauthFactorTypes' => [
],
'oAuthProtection' => true,
'password' => '<string>',
'passwordProtection' => true,
'print' => true,
'rejectWithoutComment' => true,
'remindersEnabled' => true,
'remindersIntervalDays' => 123,
'remindersStartDays' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'smsProtection' => true,
'uploadFiles' => true,
'usersWithKycData' => [
[
'kycDocumentTypes' => [
'passport',
'idCard'
],
'kycExpectedData' => [
'dateOfBirth' => '1988-11-13T00:00:00.000Z',
'documentNumber' => 'X1234567',
'nationality' => 'CZE'
],
'kycExpectedDataFields' => [
],
'user' => 'john.doe@example.com'
]
],
'usersWithOAuthFactors' => [
[
'oauthFactors' => [
[
'type' => 'phoneNumber',
'value' => '+420777123456'
]
],
'oauthFactorTypes' => [
],
'user' => 'john.doe@example.com'
]
]
],
'signatureProvider' => 'internal',
'signatureType' => 'signature',
'signEntities' => [
[
'inGroup' => true,
'order' => 123,
'quorum' => 123,
'shareData' => [
[
'allowedOAuth' => 'uaePass',
'canAnnotateOnReject' => true,
'delegate' => true,
'expirationEnabled' => true,
'expirationTime' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'kycDocumentTypes' => [
],
'kycExpectedData' => [
'dateOfBirth' => '1988-11-13T00:00:00.000Z',
'documentNumber' => 'X1234567',
'nationality' => 'CZE'
],
'kycExpectedDataFields' => [
],
'kycFactors' => [
],
'kycProvider' => '<string>',
'language' => 'en',
'mailProtection' => true,
'message' => 'Please countersign before Friday.',
'metadata' => true,
'nafathId' => '1012345678',
'nafathProtection' => true,
'oauthFactors' => [
[
'type' => 'email',
'value' => 'john.doe@example.com'
]
],
'oauthFactorTypes' => [
],
'oAuthProtection' => true,
'password' => '<string>',
'passwordProtection' => true,
'phone' => '+420777123456',
'print' => true,
'rejectWithoutComment' => true,
'remindersEnabled' => true,
'remindersIntervalDays' => 3,
'remindersStartDays' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'smsProtection' => true,
'uploadFiles' => true,
'user' => [
'contactType' => '<string>',
'fullname' => 'John Doe',
'language' => 'en',
'mail' => 'john.doe@example.com',
'name' => 'john.doe@example.com',
'type' => 'internal'
]
]
],
'shareType' => 'sign',
'type' => 'user',
'usage' => 'manual',
'userRoleId' => 123,
'userRoleName' => 'Recipient 1'
]
],
'signFields' => [
[
'align' => 'center',
'backgroundColor' => '#FFFF00',
'bold' => true,
'color' => '#000000',
'config' => '{"multipageType":"all","multiPageCustom":"1"}',
'fieldGroupId' => 123,
'fileName' => 'evidence.pdf',
'font' => 'default',
'fontSize' => 123,
'groupId' => 123,
'id' => '1LTn5IimzXh68bOv',
'link' => 'https://example.com',
'lockRatio' => true,
'maxCharacters' => 123,
'multipage' => true,
'numberOfLines' => 123,
'order' => 123,
'pages' => [
1,
2
],
'position' => [
'percentHeight' => 0.03176305676305678,
'percentWidth' => 0.43921568627450985,
'percentX' => 0.49892906639788337,
'percentY' => 0.2465883269647186
],
'public' => true,
'readOnly' => true,
'required' => true,
'subtype' => 'annotation_generic',
'text' => '<string>',
'time' => true,
'timestamp' => true,
'tooltip' => 'Sign here',
'type' => 'signature',
'usage' => 'manual',
'user' => [
'john.doe+member@example.com'
],
'userRoleId' => 123,
'userRoleName' => 'Recipient 1',
'values' => [
'Yes',
'No'
],
'zIndex' => 123
]
],
'signStep' => 'users',
'tsaType' => 'signatureOnly'
],
'shareSettings' => [
'allowedOAuth' => '<string>',
'canAnnotateOnReject' => true,
'delegate' => true,
'expirationEnabled' => true,
'expirationTime' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'isPublicComment' => true,
'kycFactors' => [
'idVerification',
'livenessDetection'
],
'kycProvider' => 'identomat',
'mailProtection' => true,
'message' => '<string>',
'metadata' => true,
'oauthFactors' => [
[
'type' => 'email',
'value' => 'john.doe@example.com'
]
],
'oauthFactorTypes' => [
],
'oAuthProtection' => true,
'password' => '<string>',
'passwordProtection' => true,
'print' => true,
'rejectWithoutComment' => true,
'remindersEnabled' => true,
'remindersIntervalDays' => 123,
'remindersStartDays' => [
'exactTime' => '2026-03-01T12:00:00.000Z',
'timeSize' => [
'size' => 'day',
'span' => 3
],
'type' => 'time_span_span'
],
'smsProtection' => true,
'uploadFiles' => true,
'usersWithKycData' => [
[
'kycDocumentTypes' => [
'passport',
'idCard'
],
'kycExpectedData' => [
'dateOfBirth' => '1988-11-13T00:00:00.000Z',
'documentNumber' => 'X1234567',
'nationality' => 'CZE'
],
'kycExpectedDataFields' => [
],
'user' => 'john.doe@example.com'
]
],
'usersWithOAuthFactors' => [
[
'oauthFactors' => [
[
'type' => 'phoneNumber',
'value' => '+420777123456'
]
],
'oauthFactorTypes' => [
],
'user' => 'john.doe@example.com'
]
]
],
'showBarcode' => true,
'submittedFiles' => [
[
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'name' => 'IDCardFront.pdf',
'public' => false
]
],
'term' => [
'nonFixedTerm' => [
'noticePeriod' => '3M',
'terminationStartDate' => '2026-10-01T00:00:00.000Z'
],
'reminders' => [
[
'notifyOwner' => true,
'period' => '30d',
'recipients' => [
'jane.doe@example.com'
],
'time' => '09:00'
]
],
'renewal' => [
'finalDate' => '2030-12-31T00:00:00.000Z',
'maxRenewals' => 50,
'noticePeriod' => '3M',
'period' => '1y'
]
]
],
'comment' => 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
'draftId' => '8b312068-ecdf-4fa6-8f13-c6183da85f43',
'forcePdfA' => false,
'isPublicComment' => false,
'optionalData' => [
'barcodeData' => [
'<string>'
],
'convert' => false,
'createLinks' => true,
'emailAttachments' => [
],
'folder' => '8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce',
'isPublic' => true,
'merge' => [
's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj'
],
'ocr' => true,
'path' => 'Contracts/2026/Q1',
'signatureProvider' => 'internal',
'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'
],
'usePdfA' => true
]),
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/edit/{version}?token="
payload := strings.NewReader("{\n \"definitionType\": \"ext\",\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"workflow\": \"wf_archive\",\n \"body\": {\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"fieldName\": \"D_EMPLOYMENT_START_DATE\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\n \"timeDiff\": 259200000,\n \"triggerOn\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"counterId\": \"TEF_2016_aa_001\",\n \"customFields\": [\n {\n \"key\": \"internalReference\",\n \"type\": \"string\",\n \"value\": \"ACME-2026-001\",\n \"displayName\": \"Internal reference\"\n }\n ],\n \"documentCategory\": \"Contract\",\n \"documentTitle\": \"Contract Agreement\",\n \"enumSelections\": {},\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"LegalNotes.docx\",\n \"public\": false\n }\n ],\n \"html\": \"<string>\",\n \"preparationDraft\": {\n \"sequential\": true,\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"signatureProvider\": \"internal\",\n \"signatureType\": \"signature\",\n \"signEntities\": [\n {\n \"inGroup\": true,\n \"order\": 123,\n \"quorum\": 123,\n \"shareData\": [\n {\n \"allowedOAuth\": \"uaePass\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"kycDocumentTypes\": [],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"kycFactors\": [],\n \"kycProvider\": \"<string>\",\n \"language\": \"en\",\n \"mailProtection\": true,\n \"message\": \"Please countersign before Friday.\",\n \"metadata\": true,\n \"nafathId\": \"1012345678\",\n \"nafathProtection\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"phone\": \"+420777123456\",\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 3,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"user\": {\n \"contactType\": \"<string>\",\n \"fullname\": \"John Doe\",\n \"language\": \"en\",\n \"mail\": \"john.doe@example.com\",\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n }\n ],\n \"shareType\": \"sign\",\n \"type\": \"user\",\n \"usage\": \"manual\",\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\"\n }\n ],\n \"signFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 123,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 123,\n \"multipage\": true,\n \"numberOfLines\": 123,\n \"order\": 123,\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.03176305676305678,\n \"percentWidth\": 0.43921568627450985,\n \"percentX\": 0.49892906639788337,\n \"percentY\": 0.2465883269647186\n },\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"time\": true,\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"type\": \"signature\",\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 \"signStep\": \"users\",\n \"tsaType\": \"signatureOnly\"\n },\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"showBarcode\": true,\n \"submittedFiles\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"IDCardFront.pdf\",\n \"public\": false\n }\n ],\n \"term\": {\n \"nonFixedTerm\": {\n \"noticePeriod\": \"3M\",\n \"terminationStartDate\": \"2026-10-01T00:00:00.000Z\"\n },\n \"reminders\": [\n {\n \"notifyOwner\": true,\n \"period\": \"30d\",\n \"recipients\": [\n \"jane.doe@example.com\"\n ],\n \"time\": \"09:00\"\n }\n ],\n \"renewal\": {\n \"finalDate\": \"2030-12-31T00:00:00.000Z\",\n \"maxRenewals\": 50,\n \"noticePeriod\": \"3M\",\n \"period\": \"1y\"\n }\n }\n },\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"isPublicComment\": false,\n \"optionalData\": {\n \"barcodeData\": [\n \"<string>\"\n ],\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\n \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"usePdfA\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=")
.header("Content-Type", "application/json")
.body("{\n \"definitionType\": \"ext\",\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"workflow\": \"wf_archive\",\n \"body\": {\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"fieldName\": \"D_EMPLOYMENT_START_DATE\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\n \"timeDiff\": 259200000,\n \"triggerOn\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"counterId\": \"TEF_2016_aa_001\",\n \"customFields\": [\n {\n \"key\": \"internalReference\",\n \"type\": \"string\",\n \"value\": \"ACME-2026-001\",\n \"displayName\": \"Internal reference\"\n }\n ],\n \"documentCategory\": \"Contract\",\n \"documentTitle\": \"Contract Agreement\",\n \"enumSelections\": {},\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"LegalNotes.docx\",\n \"public\": false\n }\n ],\n \"html\": \"<string>\",\n \"preparationDraft\": {\n \"sequential\": true,\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"signatureProvider\": \"internal\",\n \"signatureType\": \"signature\",\n \"signEntities\": [\n {\n \"inGroup\": true,\n \"order\": 123,\n \"quorum\": 123,\n \"shareData\": [\n {\n \"allowedOAuth\": \"uaePass\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"kycDocumentTypes\": [],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"kycFactors\": [],\n \"kycProvider\": \"<string>\",\n \"language\": \"en\",\n \"mailProtection\": true,\n \"message\": \"Please countersign before Friday.\",\n \"metadata\": true,\n \"nafathId\": \"1012345678\",\n \"nafathProtection\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"phone\": \"+420777123456\",\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 3,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"user\": {\n \"contactType\": \"<string>\",\n \"fullname\": \"John Doe\",\n \"language\": \"en\",\n \"mail\": \"john.doe@example.com\",\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n }\n ],\n \"shareType\": \"sign\",\n \"type\": \"user\",\n \"usage\": \"manual\",\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\"\n }\n ],\n \"signFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 123,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 123,\n \"multipage\": true,\n \"numberOfLines\": 123,\n \"order\": 123,\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.03176305676305678,\n \"percentWidth\": 0.43921568627450985,\n \"percentX\": 0.49892906639788337,\n \"percentY\": 0.2465883269647186\n },\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"time\": true,\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"type\": \"signature\",\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 \"signStep\": \"users\",\n \"tsaType\": \"signatureOnly\"\n },\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"showBarcode\": true,\n \"submittedFiles\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"IDCardFront.pdf\",\n \"public\": false\n }\n ],\n \"term\": {\n \"nonFixedTerm\": {\n \"noticePeriod\": \"3M\",\n \"terminationStartDate\": \"2026-10-01T00:00:00.000Z\"\n },\n \"reminders\": [\n {\n \"notifyOwner\": true,\n \"period\": \"30d\",\n \"recipients\": [\n \"jane.doe@example.com\"\n ],\n \"time\": \"09:00\"\n }\n ],\n \"renewal\": {\n \"finalDate\": \"2030-12-31T00:00:00.000Z\",\n \"maxRenewals\": 50,\n \"noticePeriod\": \"3M\",\n \"period\": \"1y\"\n }\n }\n },\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"isPublicComment\": false,\n \"optionalData\": {\n \"barcodeData\": [\n \"<string>\"\n ],\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\n \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"usePdfA\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/edit/{version}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"definitionType\": \"ext\",\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"workflow\": \"wf_archive\",\n \"body\": {\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"fieldName\": \"D_EMPLOYMENT_START_DATE\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\n \"timeDiff\": 259200000,\n \"triggerOn\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"counterId\": \"TEF_2016_aa_001\",\n \"customFields\": [\n {\n \"key\": \"internalReference\",\n \"type\": \"string\",\n \"value\": \"ACME-2026-001\",\n \"displayName\": \"Internal reference\"\n }\n ],\n \"documentCategory\": \"Contract\",\n \"documentTitle\": \"Contract Agreement\",\n \"enumSelections\": {},\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"LegalNotes.docx\",\n \"public\": false\n }\n ],\n \"html\": \"<string>\",\n \"preparationDraft\": {\n \"sequential\": true,\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"signatureProvider\": \"internal\",\n \"signatureType\": \"signature\",\n \"signEntities\": [\n {\n \"inGroup\": true,\n \"order\": 123,\n \"quorum\": 123,\n \"shareData\": [\n {\n \"allowedOAuth\": \"uaePass\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"kycDocumentTypes\": [],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"kycFactors\": [],\n \"kycProvider\": \"<string>\",\n \"language\": \"en\",\n \"mailProtection\": true,\n \"message\": \"Please countersign before Friday.\",\n \"metadata\": true,\n \"nafathId\": \"1012345678\",\n \"nafathProtection\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"phone\": \"+420777123456\",\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 3,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"user\": {\n \"contactType\": \"<string>\",\n \"fullname\": \"John Doe\",\n \"language\": \"en\",\n \"mail\": \"john.doe@example.com\",\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n }\n ],\n \"shareType\": \"sign\",\n \"type\": \"user\",\n \"usage\": \"manual\",\n \"userRoleId\": 123,\n \"userRoleName\": \"Recipient 1\"\n }\n ],\n \"signFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"font\": \"default\",\n \"fontSize\": 123,\n \"groupId\": 123,\n \"id\": \"1LTn5IimzXh68bOv\",\n \"link\": \"https://example.com\",\n \"lockRatio\": true,\n \"maxCharacters\": 123,\n \"multipage\": true,\n \"numberOfLines\": 123,\n \"order\": 123,\n \"pages\": [\n 1,\n 2\n ],\n \"position\": {\n \"percentHeight\": 0.03176305676305678,\n \"percentWidth\": 0.43921568627450985,\n \"percentX\": 0.49892906639788337,\n \"percentY\": 0.2465883269647186\n },\n \"public\": true,\n \"readOnly\": true,\n \"required\": true,\n \"subtype\": \"annotation_generic\",\n \"text\": \"<string>\",\n \"time\": true,\n \"timestamp\": true,\n \"tooltip\": \"Sign here\",\n \"type\": \"signature\",\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 \"signStep\": \"users\",\n \"tsaType\": \"signatureOnly\"\n },\n \"shareSettings\": {\n \"allowedOAuth\": \"<string>\",\n \"canAnnotateOnReject\": true,\n \"delegate\": true,\n \"expirationEnabled\": true,\n \"expirationTime\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"isPublicComment\": true,\n \"kycFactors\": [\n \"idVerification\",\n \"livenessDetection\"\n ],\n \"kycProvider\": \"identomat\",\n \"mailProtection\": true,\n \"message\": \"<string>\",\n \"metadata\": true,\n \"oauthFactors\": [\n {\n \"type\": \"email\",\n \"value\": \"john.doe@example.com\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"oAuthProtection\": true,\n \"password\": \"<string>\",\n \"passwordProtection\": true,\n \"print\": true,\n \"rejectWithoutComment\": true,\n \"remindersEnabled\": true,\n \"remindersIntervalDays\": 123,\n \"remindersStartDays\": {\n \"exactTime\": \"2026-03-01T12:00:00.000Z\",\n \"timeSize\": {\n \"size\": \"day\",\n \"span\": 3\n },\n \"type\": \"time_span_span\"\n },\n \"smsProtection\": true,\n \"uploadFiles\": true,\n \"usersWithKycData\": [\n {\n \"kycDocumentTypes\": [\n \"passport\",\n \"idCard\"\n ],\n \"kycExpectedData\": {\n \"dateOfBirth\": \"1988-11-13T00:00:00.000Z\",\n \"documentNumber\": \"X1234567\",\n \"nationality\": \"CZE\"\n },\n \"kycExpectedDataFields\": [],\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"usersWithOAuthFactors\": [\n {\n \"oauthFactors\": [\n {\n \"type\": \"phoneNumber\",\n \"value\": \"+420777123456\"\n }\n ],\n \"oauthFactorTypes\": [],\n \"user\": \"john.doe@example.com\"\n }\n ]\n },\n \"showBarcode\": true,\n \"submittedFiles\": [\n {\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"name\": \"IDCardFront.pdf\",\n \"public\": false\n }\n ],\n \"term\": {\n \"nonFixedTerm\": {\n \"noticePeriod\": \"3M\",\n \"terminationStartDate\": \"2026-10-01T00:00:00.000Z\"\n },\n \"reminders\": [\n {\n \"notifyOwner\": true,\n \"period\": \"30d\",\n \"recipients\": [\n \"jane.doe@example.com\"\n ],\n \"time\": \"09:00\"\n }\n ],\n \"renewal\": {\n \"finalDate\": \"2030-12-31T00:00:00.000Z\",\n \"maxRenewals\": 50,\n \"noticePeriod\": \"3M\",\n \"period\": \"1y\"\n }\n }\n },\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"draftId\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"forcePdfA\": false,\n \"isPublicComment\": false,\n \"optionalData\": {\n \"barcodeData\": [\n \"<string>\"\n ],\n \"convert\": false,\n \"createLinks\": true,\n \"emailAttachments\": {},\n \"folder\": \"8d25c1a9-1ee2c7f56-1da2-00ac83ba54ce\",\n \"isPublic\": true,\n \"merge\": [\n \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\"\n ],\n \"ocr\": true,\n \"path\": \"Contracts/2026/Q1\",\n \"signatureProvider\": \"internal\",\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 \"usePdfA\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Query Parameters
Goes ahead with an edit that changes the content of a document already signed or still waiting for its recipients, or that joins files into its main file, which leaves the joined file without the signatures of the one it replaces: the signatures the edit invalidates are dropped and the shares still waiting are cancelled. Without it such a document is refused.
Body
Comment stored on the workflow history record this update creates. 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>."