curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/drafts?token=' \
--header 'Content-Type: application/json' \
--data '
{
"body": {
"documentType": "d_default",
"alerts": [
{
"alertTo": "john.doe@example.com",
"message": "The contract expires next week.",
"sent": true,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"definitionLanguage": "en",
"documentCategory": "Contract",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Contract Agreement",
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "docx",
"fileType": "word",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "LegalNotes.docx",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"folder": {
"global": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
},
"user": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
}
},
"html": "<string>",
"isFolder": true,
"isSigned": true,
"lastModified": "2023-11-07T05:31:56Z",
"originalSignFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": true,
"cancelled": true,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"filled": true,
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"pdfFile": {
"additionalInfo": "<string>",
"content": "a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/pdf",
"name": "Contract.pdf",
"pages": 21,
"size": 724158
},
"readBy": [
"<string>"
],
"revision": 3,
"rights": {
"editGroups": [
"<string>"
],
"editUsers": [
"<string>"
],
"private": true,
"readGroups": [
"<string>"
],
"readUsers": [
"<string>"
]
},
"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"
}
]
},
"showBarcode": true,
"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"
}
}
],
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"submittedFiles": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "IDCardFront.pdf",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"tags": {
"global": [
"Contract",
"2026"
],
"user": [
"To review"
]
},
"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"
}
},
"tika": {
"content_ocr": "<string>",
"content_text": "<string>",
"language": "<string>"
},
"tikaStatus": "<string>",
"usePdfA": true,
"values": [
{
"key": "documentType",
"value": "\"d_default\""
}
],
"workflow": [
{
"archived": true,
"group": [
"<string>"
],
"history": [
{
"action": 123,
"comment": "<string>",
"date": "2023-11-07T05:31:56Z",
"fileChanged": true,
"fileName": "contract.pdf",
"groupReceiver": [
"<string>"
],
"mentionedDocuments": [
"<string>"
],
"mentionedUsers": [
"jane.doe@example.com"
],
"mimetype": "application/pdf",
"name": "document_signed",
"newRevision": 123,
"newTitle": "<string>",
"originalFileName": "contract.docx",
"originalMimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"originalRevision": 123,
"originalTitle": "<string>",
"sent": true,
"shareEmail": "<string>",
"shareFinal": true,
"shareGroup": "<string>",
"shareType": "<string>",
"shareUser": "<string>",
"signatureComponents": "<string>",
"state": 123,
"tags": [
"<string>"
],
"titleChanged": true,
"type": "document_signed",
"user": {
"name": "john.doe@example.com",
"type": "internal"
},
"userReceiver": [
{
"name": "john.doe@example.com",
"type": "internal"
}
]
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"lastAction": {
"archive": true,
"commentRequired": true,
"following": "<string>",
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "create",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"rights": "<string>",
"send": true,
"stateId": 0
},
"lastRequest": {
"commentRequired": true,
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "request_approval",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"resolvedBy": 5,
"rework": true,
"rights": "<string>",
"sign": true,
"stateId": 0
},
"receivedDate": "2023-11-07T05:31:56Z",
"state": 1,
"stateName": "created",
"timeOfDuration": 86400000,
"user": [
{
"name": "john.doe@example.com",
"type": "internal"
}
],
"workflowType": "wf_archive"
}
]
},
"cloneFiles": false,
"cloneMainFile": false,
"source": false
}
'import requests
url = "https://sandbox.circularo.com/api/v1/drafts?token="
payload = {
"body": {
"documentType": "d_default",
"alerts": [
{
"alertTo": "john.doe@example.com",
"message": "The contract expires next week.",
"sent": True,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"definitionLanguage": "en",
"documentCategory": "Contract",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Contract Agreement",
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "docx",
"fileType": "word",
"hasPassword": True,
"isConvertible": True,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "LegalNotes.docx",
"pages": 8,
"public": True,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"folder": {
"global": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
},
"user": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
}
},
"html": "<string>",
"isFolder": True,
"isSigned": True,
"lastModified": "2023-11-07T05:31:56Z",
"originalSignFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": True,
"cancelled": True,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"filled": True,
"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,
"shareId": ["sd0oAvfpB4k0yDf787x4"],
"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
}
],
"pdfFile": {
"additionalInfo": "<string>",
"content": "a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": True,
"isConvertible": True,
"mimetype": "application/pdf",
"name": "Contract.pdf",
"pages": 21,
"size": 724158
},
"readBy": ["<string>"],
"revision": 3,
"rights": {
"editGroups": ["<string>"],
"editUsers": ["<string>"],
"private": True,
"readGroups": ["<string>"],
"readUsers": ["<string>"]
},
"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"
}
]
},
"showBarcode": True,
"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"
}
}
],
"shareId": ["sd0oAvfpB4k0yDf787x4"],
"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,
"shareId": ["sd0oAvfpB4k0yDf787x4"],
"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
}
],
"submittedFiles": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": True,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "IDCardFront.pdf",
"pages": 8,
"public": True,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"tags": {
"global": ["Contract", "2026"],
"user": ["To review"]
},
"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"
}
},
"tika": {
"content_ocr": "<string>",
"content_text": "<string>",
"language": "<string>"
},
"tikaStatus": "<string>",
"usePdfA": True,
"values": [
{
"key": "documentType",
"value": "\"d_default\""
}
],
"workflow": [
{
"archived": True,
"group": ["<string>"],
"history": [
{
"action": 123,
"comment": "<string>",
"date": "2023-11-07T05:31:56Z",
"fileChanged": True,
"fileName": "contract.pdf",
"groupReceiver": ["<string>"],
"mentionedDocuments": ["<string>"],
"mentionedUsers": ["jane.doe@example.com"],
"mimetype": "application/pdf",
"name": "document_signed",
"newRevision": 123,
"newTitle": "<string>",
"originalFileName": "contract.docx",
"originalMimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"originalRevision": 123,
"originalTitle": "<string>",
"sent": True,
"shareEmail": "<string>",
"shareFinal": True,
"shareGroup": "<string>",
"shareType": "<string>",
"shareUser": "<string>",
"signatureComponents": "<string>",
"state": 123,
"tags": ["<string>"],
"titleChanged": True,
"type": "document_signed",
"user": {
"name": "john.doe@example.com",
"type": "internal"
},
"userReceiver": [
{
"name": "john.doe@example.com",
"type": "internal"
}
]
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"lastAction": {
"archive": True,
"commentRequired": True,
"following": "<string>",
"id": 5,
"isInitial": True,
"multipleReceivers": True,
"name": "create",
"nextState": 1,
"predefinedReceiver": True,
"receiver": "john.doe@example.com",
"recipient": True,
"rights": "<string>",
"send": True,
"stateId": 0
},
"lastRequest": {
"commentRequired": True,
"id": 5,
"isInitial": True,
"multipleReceivers": True,
"name": "request_approval",
"nextState": 1,
"predefinedReceiver": True,
"receiver": "john.doe@example.com",
"recipient": True,
"resolvedBy": 5,
"rework": True,
"rights": "<string>",
"sign": True,
"stateId": 0
},
"receivedDate": "2023-11-07T05:31:56Z",
"state": 1,
"stateName": "created",
"timeOfDuration": 86400000,
"user": [
{
"name": "john.doe@example.com",
"type": "internal"
}
],
"workflowType": "wf_archive"
}
]
},
"cloneFiles": False,
"cloneMainFile": False,
"source": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify({
documentType: 'd_default',
alerts: [
{
alertTo: 'john.doe@example.com',
message: 'The contract expires next week.',
sent: true,
triggerOn: '2023-11-07T05:31:56Z'
}
],
counterId: 'TEF_2016_aa_001',
customFields: [
{
key: 'internalReference',
type: 'string',
value: 'ACME-2026-001',
displayName: 'Internal reference'
}
],
definitionLanguage: 'en',
documentCategory: 'Contract',
documentId: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
documentTitle: 'Contract Agreement',
expiresOn: '2026-12-31T00:00:00.000Z',
file: [
{
additionalInfo: '<string>',
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
fileExtension: 'docx',
fileType: 'word',
hasPassword: true,
isConvertible: true,
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
name: 'LegalNotes.docx',
pages: 8,
public: true,
size: 522481,
timestamp: '2023-11-07T05:31:56Z',
user: 'john.doe@example.com'
}
],
folder: {
global: {
level: 123,
parentFolderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6',
path: [{folderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6', level: 123}],
username: 'john.doe@example.com'
},
user: {
level: 123,
parentFolderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6',
path: [{folderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6', level: 123}],
username: 'john.doe@example.com'
}
},
html: '<string>',
isFolder: true,
isSigned: true,
lastModified: '2023-11-07T05:31:56Z',
originalSignFields: [
{
align: 'center',
backgroundColor: '#FFFF00',
bold: true,
cancelled: true,
color: '#000000',
config: '{"multipageType":"all","multiPageCustom":"1"}',
fieldGroupId: 123,
fileName: 'evidence.pdf',
filled: true,
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,
shareId: ['sd0oAvfpB4k0yDf787x4'],
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
}
],
pdfFile: {
additionalInfo: '<string>',
content: 'a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0',
fileExtension: 'pdf',
fileType: 'pdf',
hasPassword: true,
isConvertible: true,
mimetype: 'application/pdf',
name: 'Contract.pdf',
pages: 21,
size: 724158
},
readBy: ['<string>'],
revision: 3,
rights: {
editGroups: ['<string>'],
editUsers: ['<string>'],
private: true,
readGroups: ['<string>'],
readUsers: ['<string>']
},
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'
}
]
},
showBarcode: true,
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'
}
}
],
shareId: ['sd0oAvfpB4k0yDf787x4'],
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,
shareId: ['sd0oAvfpB4k0yDf787x4'],
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
}
],
submittedFiles: [
{
additionalInfo: '<string>',
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
fileExtension: 'pdf',
fileType: 'pdf',
hasPassword: true,
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
name: 'IDCardFront.pdf',
pages: 8,
public: true,
size: 522481,
timestamp: '2023-11-07T05:31:56Z',
user: 'john.doe@example.com'
}
],
tags: {global: ['Contract', '2026'], user: ['To review']},
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'
}
},
tika: {content_ocr: '<string>', content_text: '<string>', language: '<string>'},
tikaStatus: '<string>',
usePdfA: true,
values: [{key: 'documentType', value: '"d_default"'}],
workflow: [
{
archived: true,
group: ['<string>'],
history: [
{
action: 123,
comment: '<string>',
date: '2023-11-07T05:31:56Z',
fileChanged: true,
fileName: 'contract.pdf',
groupReceiver: ['<string>'],
mentionedDocuments: ['<string>'],
mentionedUsers: ['jane.doe@example.com'],
mimetype: 'application/pdf',
name: 'document_signed',
newRevision: 123,
newTitle: '<string>',
originalFileName: 'contract.docx',
originalMimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
originalRevision: 123,
originalTitle: '<string>',
sent: true,
shareEmail: '<string>',
shareFinal: true,
shareGroup: '<string>',
shareType: '<string>',
shareUser: '<string>',
signatureComponents: '<string>',
state: 123,
tags: ['<string>'],
titleChanged: true,
type: 'document_signed',
user: {name: 'john.doe@example.com', type: 'internal'},
userReceiver: [{name: 'john.doe@example.com', type: 'internal'}]
}
],
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc590',
lastAction: {
archive: true,
commentRequired: true,
following: '<string>',
id: 5,
isInitial: true,
multipleReceivers: true,
name: 'create',
nextState: 1,
predefinedReceiver: true,
receiver: 'john.doe@example.com',
recipient: true,
rights: '<string>',
send: true,
stateId: 0
},
lastRequest: {
commentRequired: true,
id: 5,
isInitial: true,
multipleReceivers: true,
name: 'request_approval',
nextState: 1,
predefinedReceiver: true,
receiver: 'john.doe@example.com',
recipient: true,
resolvedBy: 5,
rework: true,
rights: '<string>',
sign: true,
stateId: 0
},
receivedDate: '2023-11-07T05:31:56Z',
state: 1,
stateName: 'created',
timeOfDuration: 86400000,
user: [{name: 'john.doe@example.com', type: 'internal'}],
workflowType: 'wf_archive'
}
]
}),
cloneFiles: false,
cloneMainFile: false,
source: false
})
};
fetch('https://sandbox.circularo.com/api/v1/drafts?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/drafts?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => [
'documentType' => 'd_default',
'alerts' => [
[
'alertTo' => 'john.doe@example.com',
'message' => 'The contract expires next week.',
'sent' => true,
'triggerOn' => '2023-11-07T05:31:56Z'
]
],
'counterId' => 'TEF_2016_aa_001',
'customFields' => [
[
'key' => 'internalReference',
'type' => 'string',
'value' => 'ACME-2026-001',
'displayName' => 'Internal reference'
]
],
'definitionLanguage' => 'en',
'documentCategory' => 'Contract',
'documentId' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'documentTitle' => 'Contract Agreement',
'expiresOn' => '2026-12-31T00:00:00.000Z',
'file' => [
[
'additionalInfo' => '<string>',
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'fileExtension' => 'docx',
'fileType' => 'word',
'hasPassword' => true,
'isConvertible' => true,
'mimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'name' => 'LegalNotes.docx',
'pages' => 8,
'public' => true,
'size' => 522481,
'timestamp' => '2023-11-07T05:31:56Z',
'user' => 'john.doe@example.com'
]
],
'folder' => [
'global' => [
'level' => 123,
'parentFolderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'path' => [
[
'folderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'level' => 123
]
],
'username' => 'john.doe@example.com'
],
'user' => [
'level' => 123,
'parentFolderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'path' => [
[
'folderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'level' => 123
]
],
'username' => 'john.doe@example.com'
]
],
'html' => '<string>',
'isFolder' => true,
'isSigned' => true,
'lastModified' => '2023-11-07T05:31:56Z',
'originalSignFields' => [
[
'align' => 'center',
'backgroundColor' => '#FFFF00',
'bold' => true,
'cancelled' => true,
'color' => '#000000',
'config' => '{"multipageType":"all","multiPageCustom":"1"}',
'fieldGroupId' => 123,
'fileName' => 'evidence.pdf',
'filled' => true,
'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,
'shareId' => [
'sd0oAvfpB4k0yDf787x4'
],
'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
]
],
'pdfFile' => [
'additionalInfo' => '<string>',
'content' => 'a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0',
'fileExtension' => 'pdf',
'fileType' => 'pdf',
'hasPassword' => true,
'isConvertible' => true,
'mimetype' => 'application/pdf',
'name' => 'Contract.pdf',
'pages' => 21,
'size' => 724158
],
'readBy' => [
'<string>'
],
'revision' => 3,
'rights' => [
'editGroups' => [
'<string>'
],
'editUsers' => [
'<string>'
],
'private' => true,
'readGroups' => [
'<string>'
],
'readUsers' => [
'<string>'
]
],
'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'
]
]
],
'showBarcode' => true,
'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'
]
]
],
'shareId' => [
'sd0oAvfpB4k0yDf787x4'
],
'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,
'shareId' => [
'sd0oAvfpB4k0yDf787x4'
],
'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
]
],
'submittedFiles' => [
[
'additionalInfo' => '<string>',
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'fileExtension' => 'pdf',
'fileType' => 'pdf',
'hasPassword' => true,
'mimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'name' => 'IDCardFront.pdf',
'pages' => 8,
'public' => true,
'size' => 522481,
'timestamp' => '2023-11-07T05:31:56Z',
'user' => 'john.doe@example.com'
]
],
'tags' => [
'global' => [
'Contract',
'2026'
],
'user' => [
'To review'
]
],
'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'
]
],
'tika' => [
'content_ocr' => '<string>',
'content_text' => '<string>',
'language' => '<string>'
],
'tikaStatus' => '<string>',
'usePdfA' => true,
'values' => [
[
'key' => 'documentType',
'value' => '"d_default"'
]
],
'workflow' => [
[
'archived' => true,
'group' => [
'<string>'
],
'history' => [
[
'action' => 123,
'comment' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'fileChanged' => true,
'fileName' => 'contract.pdf',
'groupReceiver' => [
'<string>'
],
'mentionedDocuments' => [
'<string>'
],
'mentionedUsers' => [
'jane.doe@example.com'
],
'mimetype' => 'application/pdf',
'name' => 'document_signed',
'newRevision' => 123,
'newTitle' => '<string>',
'originalFileName' => 'contract.docx',
'originalMimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'originalRevision' => 123,
'originalTitle' => '<string>',
'sent' => true,
'shareEmail' => '<string>',
'shareFinal' => true,
'shareGroup' => '<string>',
'shareType' => '<string>',
'shareUser' => '<string>',
'signatureComponents' => '<string>',
'state' => 123,
'tags' => [
'<string>'
],
'titleChanged' => true,
'type' => 'document_signed',
'user' => [
'name' => 'john.doe@example.com',
'type' => 'internal'
],
'userReceiver' => [
[
'name' => 'john.doe@example.com',
'type' => 'internal'
]
]
]
],
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc590',
'lastAction' => [
'archive' => true,
'commentRequired' => true,
'following' => '<string>',
'id' => 5,
'isInitial' => true,
'multipleReceivers' => true,
'name' => 'create',
'nextState' => 1,
'predefinedReceiver' => true,
'receiver' => 'john.doe@example.com',
'recipient' => true,
'rights' => '<string>',
'send' => true,
'stateId' => 0
],
'lastRequest' => [
'commentRequired' => true,
'id' => 5,
'isInitial' => true,
'multipleReceivers' => true,
'name' => 'request_approval',
'nextState' => 1,
'predefinedReceiver' => true,
'receiver' => 'john.doe@example.com',
'recipient' => true,
'resolvedBy' => 5,
'rework' => true,
'rights' => '<string>',
'sign' => true,
'stateId' => 0
],
'receivedDate' => '2023-11-07T05:31:56Z',
'state' => 1,
'stateName' => 'created',
'timeOfDuration' => 86400000,
'user' => [
[
'name' => 'john.doe@example.com',
'type' => 'internal'
]
],
'workflowType' => 'wf_archive'
]
]
],
'cloneFiles' => false,
'cloneMainFile' => false,
'source' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/drafts?token="
payload := strings.NewReader("{\n \"body\": {\n \"documentType\": \"d_default\",\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\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 \"definitionLanguage\": \"en\",\n \"documentCategory\": \"Contract\",\n \"documentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"documentTitle\": \"Contract Agreement\",\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"docx\",\n \"fileType\": \"word\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"LegalNotes.docx\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"folder\": {\n \"global\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n },\n \"user\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n }\n },\n \"html\": \"<string>\",\n \"isFolder\": true,\n \"isSigned\": true,\n \"lastModified\": \"2023-11-07T05:31:56Z\",\n \"originalSignFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"cancelled\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"filled\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"pdfFile\": {\n \"additionalInfo\": \"<string>\",\n \"content\": \"a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/pdf\",\n \"name\": \"Contract.pdf\",\n \"pages\": 21,\n \"size\": 724158\n },\n \"readBy\": [\n \"<string>\"\n ],\n \"revision\": 3,\n \"rights\": {\n \"editGroups\": [\n \"<string>\"\n ],\n \"editUsers\": [\n \"<string>\"\n ],\n \"private\": true,\n \"readGroups\": [\n \"<string>\"\n ],\n \"readUsers\": [\n \"<string>\"\n ]\n },\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 \"showBarcode\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"submittedFiles\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"IDCardFront.pdf\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"tags\": {\n \"global\": [\n \"Contract\",\n \"2026\"\n ],\n \"user\": [\n \"To review\"\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 \"tika\": {\n \"content_ocr\": \"<string>\",\n \"content_text\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tikaStatus\": \"<string>\",\n \"usePdfA\": true,\n \"values\": [\n {\n \"key\": \"documentType\",\n \"value\": \"\\\"d_default\\\"\"\n }\n ],\n \"workflow\": [\n {\n \"archived\": true,\n \"group\": [\n \"<string>\"\n ],\n \"history\": [\n {\n \"action\": 123,\n \"comment\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"fileChanged\": true,\n \"fileName\": \"contract.pdf\",\n \"groupReceiver\": [\n \"<string>\"\n ],\n \"mentionedDocuments\": [\n \"<string>\"\n ],\n \"mentionedUsers\": [\n \"jane.doe@example.com\"\n ],\n \"mimetype\": \"application/pdf\",\n \"name\": \"document_signed\",\n \"newRevision\": 123,\n \"newTitle\": \"<string>\",\n \"originalFileName\": \"contract.docx\",\n \"originalMimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"originalRevision\": 123,\n \"originalTitle\": \"<string>\",\n \"sent\": true,\n \"shareEmail\": \"<string>\",\n \"shareFinal\": true,\n \"shareGroup\": \"<string>\",\n \"shareType\": \"<string>\",\n \"shareUser\": \"<string>\",\n \"signatureComponents\": \"<string>\",\n \"state\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"titleChanged\": true,\n \"type\": \"document_signed\",\n \"user\": {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n },\n \"userReceiver\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ]\n }\n ],\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc590\",\n \"lastAction\": {\n \"archive\": true,\n \"commentRequired\": true,\n \"following\": \"<string>\",\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"create\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"rights\": \"<string>\",\n \"send\": true,\n \"stateId\": 0\n },\n \"lastRequest\": {\n \"commentRequired\": true,\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"request_approval\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"resolvedBy\": 5,\n \"rework\": true,\n \"rights\": \"<string>\",\n \"sign\": true,\n \"stateId\": 0\n },\n \"receivedDate\": \"2023-11-07T05:31:56Z\",\n \"state\": 1,\n \"stateName\": \"created\",\n \"timeOfDuration\": 86400000,\n \"user\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ],\n \"workflowType\": \"wf_archive\"\n }\n ]\n },\n \"cloneFiles\": false,\n \"cloneMainFile\": false,\n \"source\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.circularo.com/api/v1/drafts?token=")
.header("Content-Type", "application/json")
.body("{\n \"body\": {\n \"documentType\": \"d_default\",\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\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 \"definitionLanguage\": \"en\",\n \"documentCategory\": \"Contract\",\n \"documentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"documentTitle\": \"Contract Agreement\",\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"docx\",\n \"fileType\": \"word\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"LegalNotes.docx\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"folder\": {\n \"global\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n },\n \"user\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n }\n },\n \"html\": \"<string>\",\n \"isFolder\": true,\n \"isSigned\": true,\n \"lastModified\": \"2023-11-07T05:31:56Z\",\n \"originalSignFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"cancelled\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"filled\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"pdfFile\": {\n \"additionalInfo\": \"<string>\",\n \"content\": \"a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/pdf\",\n \"name\": \"Contract.pdf\",\n \"pages\": 21,\n \"size\": 724158\n },\n \"readBy\": [\n \"<string>\"\n ],\n \"revision\": 3,\n \"rights\": {\n \"editGroups\": [\n \"<string>\"\n ],\n \"editUsers\": [\n \"<string>\"\n ],\n \"private\": true,\n \"readGroups\": [\n \"<string>\"\n ],\n \"readUsers\": [\n \"<string>\"\n ]\n },\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 \"showBarcode\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"submittedFiles\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"IDCardFront.pdf\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"tags\": {\n \"global\": [\n \"Contract\",\n \"2026\"\n ],\n \"user\": [\n \"To review\"\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 \"tika\": {\n \"content_ocr\": \"<string>\",\n \"content_text\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tikaStatus\": \"<string>\",\n \"usePdfA\": true,\n \"values\": [\n {\n \"key\": \"documentType\",\n \"value\": \"\\\"d_default\\\"\"\n }\n ],\n \"workflow\": [\n {\n \"archived\": true,\n \"group\": [\n \"<string>\"\n ],\n \"history\": [\n {\n \"action\": 123,\n \"comment\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"fileChanged\": true,\n \"fileName\": \"contract.pdf\",\n \"groupReceiver\": [\n \"<string>\"\n ],\n \"mentionedDocuments\": [\n \"<string>\"\n ],\n \"mentionedUsers\": [\n \"jane.doe@example.com\"\n ],\n \"mimetype\": \"application/pdf\",\n \"name\": \"document_signed\",\n \"newRevision\": 123,\n \"newTitle\": \"<string>\",\n \"originalFileName\": \"contract.docx\",\n \"originalMimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"originalRevision\": 123,\n \"originalTitle\": \"<string>\",\n \"sent\": true,\n \"shareEmail\": \"<string>\",\n \"shareFinal\": true,\n \"shareGroup\": \"<string>\",\n \"shareType\": \"<string>\",\n \"shareUser\": \"<string>\",\n \"signatureComponents\": \"<string>\",\n \"state\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"titleChanged\": true,\n \"type\": \"document_signed\",\n \"user\": {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n },\n \"userReceiver\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ]\n }\n ],\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc590\",\n \"lastAction\": {\n \"archive\": true,\n \"commentRequired\": true,\n \"following\": \"<string>\",\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"create\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"rights\": \"<string>\",\n \"send\": true,\n \"stateId\": 0\n },\n \"lastRequest\": {\n \"commentRequired\": true,\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"request_approval\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"resolvedBy\": 5,\n \"rework\": true,\n \"rights\": \"<string>\",\n \"sign\": true,\n \"stateId\": 0\n },\n \"receivedDate\": \"2023-11-07T05:31:56Z\",\n \"state\": 1,\n \"stateName\": \"created\",\n \"timeOfDuration\": 86400000,\n \"user\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ],\n \"workflowType\": \"wf_archive\"\n }\n ]\n },\n \"cloneFiles\": false,\n \"cloneMainFile\": false,\n \"source\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/drafts?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": {\n \"documentType\": \"d_default\",\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\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 \"definitionLanguage\": \"en\",\n \"documentCategory\": \"Contract\",\n \"documentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"documentTitle\": \"Contract Agreement\",\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"docx\",\n \"fileType\": \"word\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"LegalNotes.docx\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"folder\": {\n \"global\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n },\n \"user\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n }\n },\n \"html\": \"<string>\",\n \"isFolder\": true,\n \"isSigned\": true,\n \"lastModified\": \"2023-11-07T05:31:56Z\",\n \"originalSignFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"cancelled\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"filled\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"pdfFile\": {\n \"additionalInfo\": \"<string>\",\n \"content\": \"a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/pdf\",\n \"name\": \"Contract.pdf\",\n \"pages\": 21,\n \"size\": 724158\n },\n \"readBy\": [\n \"<string>\"\n ],\n \"revision\": 3,\n \"rights\": {\n \"editGroups\": [\n \"<string>\"\n ],\n \"editUsers\": [\n \"<string>\"\n ],\n \"private\": true,\n \"readGroups\": [\n \"<string>\"\n ],\n \"readUsers\": [\n \"<string>\"\n ]\n },\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 \"showBarcode\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"submittedFiles\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"IDCardFront.pdf\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"tags\": {\n \"global\": [\n \"Contract\",\n \"2026\"\n ],\n \"user\": [\n \"To review\"\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 \"tika\": {\n \"content_ocr\": \"<string>\",\n \"content_text\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tikaStatus\": \"<string>\",\n \"usePdfA\": true,\n \"values\": [\n {\n \"key\": \"documentType\",\n \"value\": \"\\\"d_default\\\"\"\n }\n ],\n \"workflow\": [\n {\n \"archived\": true,\n \"group\": [\n \"<string>\"\n ],\n \"history\": [\n {\n \"action\": 123,\n \"comment\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"fileChanged\": true,\n \"fileName\": \"contract.pdf\",\n \"groupReceiver\": [\n \"<string>\"\n ],\n \"mentionedDocuments\": [\n \"<string>\"\n ],\n \"mentionedUsers\": [\n \"jane.doe@example.com\"\n ],\n \"mimetype\": \"application/pdf\",\n \"name\": \"document_signed\",\n \"newRevision\": 123,\n \"newTitle\": \"<string>\",\n \"originalFileName\": \"contract.docx\",\n \"originalMimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"originalRevision\": 123,\n \"originalTitle\": \"<string>\",\n \"sent\": true,\n \"shareEmail\": \"<string>\",\n \"shareFinal\": true,\n \"shareGroup\": \"<string>\",\n \"shareType\": \"<string>\",\n \"shareUser\": \"<string>\",\n \"signatureComponents\": \"<string>\",\n \"state\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"titleChanged\": true,\n \"type\": \"document_signed\",\n \"user\": {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n },\n \"userReceiver\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ]\n }\n ],\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc590\",\n \"lastAction\": {\n \"archive\": true,\n \"commentRequired\": true,\n \"following\": \"<string>\",\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"create\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"rights\": \"<string>\",\n \"send\": true,\n \"stateId\": 0\n },\n \"lastRequest\": {\n \"commentRequired\": true,\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"request_approval\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"resolvedBy\": 5,\n \"rework\": true,\n \"rights\": \"<string>\",\n \"sign\": true,\n \"stateId\": 0\n },\n \"receivedDate\": \"2023-11-07T05:31:56Z\",\n \"state\": 1,\n \"stateName\": \"created\",\n \"timeOfDuration\": 86400000,\n \"user\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ],\n \"workflowType\": \"wf_archive\"\n }\n ]\n },\n \"cloneFiles\": false,\n \"cloneMainFile\": false,\n \"source\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b",
"source": {
"alerts": [
{
"alertTo": "john.doe@example.com",
"message": "The contract expires next week.",
"sent": true,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"barcode": "g153bn7qeo63b5kzec7q9cvnxnd03n34d4zkfyjy8m728eqdznf3htxm8mh14d48",
"counterId": "TEF_2016_aa_001",
"createDate": "2023-11-07T05:31:56Z",
"createName": {
"name": "john.doe@example.com",
"type": "internal"
},
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"definitionLanguage": "en",
"definitionType": "edoc",
"documentCategory": "Contract",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Contract Agreement",
"draftType": "create",
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "docx",
"fileType": "word",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "LegalNotes.docx",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"folder": {
"global": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
},
"user": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
}
},
"html": "<string>",
"id": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"isFolder": true,
"isSigned": true,
"lastModified": "2023-11-07T05:31:56Z",
"lastUpdated": "2023-11-07T05:31:56Z",
"organization": "d0a72e51-728e-4a1d-9a5c-13796122b6f8",
"originalSignFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": true,
"cancelled": true,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"filled": true,
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"pdfFile": {
"additionalInfo": "<string>",
"content": "a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/pdf",
"name": "Contract.pdf",
"pages": 21,
"size": 724158
},
"readBy": [
"<string>"
],
"revision": 3,
"rights": {
"editGroups": [
"<string>"
],
"editUsers": [
"<string>"
],
"private": true,
"readGroups": [
"<string>"
],
"readUsers": [
"<string>"
]
},
"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": [
"email"
],
"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": [
"dateOfBirth"
],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [
"email"
],
"user": "john.doe@example.com"
}
]
},
"showBarcode": true,
"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": [
"idCard"
],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [
"dateOfBirth"
],
"kycFactors": [
"idVerification"
],
"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": [
"email"
],
"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"
}
}
],
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"submittedFiles": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "IDCardFront.pdf",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"tags": {
"global": [
"Contract",
"2026"
],
"user": [
"To review"
]
},
"term": {
"nextNotificationOn": "2026-11-30T08:00:00.000Z",
"nextRenewalOn": "2027-01-01T00:00:00.000Z",
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartDate": "2026-10-01T00:00:00.000Z"
},
"reminders": [
{
"nextReminderOn": "2026-11-30T08:00:00.000Z",
"notifyOwner": true,
"period": "30d",
"recipients": [
"jane.doe@example.com"
],
"sentOn": "2026-11-30T08:00:07.412Z",
"skipped": true,
"time": "09:00",
"timeZone": "Europe/Prague"
}
],
"renewal": {
"finalDate": "2030-12-31T00:00:00.000Z",
"lastRenewedOn": "2027-01-01T00:15:03.118Z",
"maxRenewals": 50,
"noticeDueOn": "2026-09-30T00:00:00.000Z",
"noticePeriod": "3M",
"period": "1y",
"renewedCount": 1,
"type": "auto"
},
"timeZone": "Europe/Prague"
},
"termType": "fixed_term",
"thumbnails": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"tika": {
"content_ocr": "<string>",
"content_text": "<string>",
"language": "<string>"
},
"tikaStatus": "<string>",
"usePdfA": true,
"version": 123,
"workflow": [
{
"archived": true,
"group": [
"<string>"
],
"history": [
{
"action": 123,
"comment": "<string>",
"date": "2023-11-07T05:31:56Z",
"fileChanged": true,
"fileName": "contract.pdf",
"groupReceiver": [
"<string>"
],
"mentionedDocuments": [
"<string>"
],
"mentionedUsers": [
"jane.doe@example.com"
],
"mimetype": "application/pdf",
"name": "document_signed",
"newRevision": 123,
"newTitle": "<string>",
"originalFileName": "contract.docx",
"originalMimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"originalRevision": 123,
"originalTitle": "<string>",
"sent": true,
"shareEmail": "<string>",
"shareFinal": true,
"shareGroup": "<string>",
"shareType": "<string>",
"shareUser": "<string>",
"signatureComponents": "<string>",
"state": 123,
"tags": [
"<string>"
],
"titleChanged": true,
"type": "document_signed",
"user": {
"name": "john.doe@example.com",
"type": "internal"
},
"userReceiver": [
{
"name": "john.doe@example.com",
"type": "internal"
}
]
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"lastAction": {
"archive": true,
"commentRequired": true,
"following": "<string>",
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "create",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"rights": "<string>",
"send": true,
"stateId": 0
},
"lastRequest": {
"commentRequired": true,
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "request_approval",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"resolvedBy": 5,
"rework": true,
"rights": "<string>",
"sign": true,
"stateId": 0
},
"receivedDate": "2023-11-07T05:31:56Z",
"state": 1,
"stateName": "created",
"timeOfDuration": 86400000,
"user": [
{
"name": "john.doe@example.com",
"type": "internal"
}
],
"workflowType": "wf_archive"
}
]
}
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Create a draft
POST /drafts
Stores the unfinished state of a document somebody is preparing, so the work survives leaving the screen and can be picked up later. The body is that work in progress itself, in the shape a draft is stored in, together with the metadata definition it is being prepared against and what it is meant to become.
A draft belongs to the user who created it and to nobody else: it is never shared, and no other user can read, change or delete it. The fields the server owns are ignored when sent - the creator, the timestamps, the organization, the barcode and the thumbnail.
The content is checked as far as an unfinished document can be. The metadata definition has to exist, every referenced file has to exist and be reachable by the caller, the limit on attached files is enforced, and the definition’s computed fields are resolved and stored with the draft - which is why the saved draft can differ from what was sent. Files are referenced rather than copied unless cloneMainFile or cloneFiles asks for the draft’s own copies.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/drafts?token=' \
--header 'Content-Type: application/json' \
--data '
{
"body": {
"documentType": "d_default",
"alerts": [
{
"alertTo": "john.doe@example.com",
"message": "The contract expires next week.",
"sent": true,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"definitionLanguage": "en",
"documentCategory": "Contract",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Contract Agreement",
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "docx",
"fileType": "word",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "LegalNotes.docx",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"folder": {
"global": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
},
"user": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
}
},
"html": "<string>",
"isFolder": true,
"isSigned": true,
"lastModified": "2023-11-07T05:31:56Z",
"originalSignFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": true,
"cancelled": true,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"filled": true,
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"pdfFile": {
"additionalInfo": "<string>",
"content": "a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/pdf",
"name": "Contract.pdf",
"pages": 21,
"size": 724158
},
"readBy": [
"<string>"
],
"revision": 3,
"rights": {
"editGroups": [
"<string>"
],
"editUsers": [
"<string>"
],
"private": true,
"readGroups": [
"<string>"
],
"readUsers": [
"<string>"
]
},
"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"
}
]
},
"showBarcode": true,
"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"
}
}
],
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"submittedFiles": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "IDCardFront.pdf",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"tags": {
"global": [
"Contract",
"2026"
],
"user": [
"To review"
]
},
"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"
}
},
"tika": {
"content_ocr": "<string>",
"content_text": "<string>",
"language": "<string>"
},
"tikaStatus": "<string>",
"usePdfA": true,
"values": [
{
"key": "documentType",
"value": "\"d_default\""
}
],
"workflow": [
{
"archived": true,
"group": [
"<string>"
],
"history": [
{
"action": 123,
"comment": "<string>",
"date": "2023-11-07T05:31:56Z",
"fileChanged": true,
"fileName": "contract.pdf",
"groupReceiver": [
"<string>"
],
"mentionedDocuments": [
"<string>"
],
"mentionedUsers": [
"jane.doe@example.com"
],
"mimetype": "application/pdf",
"name": "document_signed",
"newRevision": 123,
"newTitle": "<string>",
"originalFileName": "contract.docx",
"originalMimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"originalRevision": 123,
"originalTitle": "<string>",
"sent": true,
"shareEmail": "<string>",
"shareFinal": true,
"shareGroup": "<string>",
"shareType": "<string>",
"shareUser": "<string>",
"signatureComponents": "<string>",
"state": 123,
"tags": [
"<string>"
],
"titleChanged": true,
"type": "document_signed",
"user": {
"name": "john.doe@example.com",
"type": "internal"
},
"userReceiver": [
{
"name": "john.doe@example.com",
"type": "internal"
}
]
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"lastAction": {
"archive": true,
"commentRequired": true,
"following": "<string>",
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "create",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"rights": "<string>",
"send": true,
"stateId": 0
},
"lastRequest": {
"commentRequired": true,
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "request_approval",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"resolvedBy": 5,
"rework": true,
"rights": "<string>",
"sign": true,
"stateId": 0
},
"receivedDate": "2023-11-07T05:31:56Z",
"state": 1,
"stateName": "created",
"timeOfDuration": 86400000,
"user": [
{
"name": "john.doe@example.com",
"type": "internal"
}
],
"workflowType": "wf_archive"
}
]
},
"cloneFiles": false,
"cloneMainFile": false,
"source": false
}
'import requests
url = "https://sandbox.circularo.com/api/v1/drafts?token="
payload = {
"body": {
"documentType": "d_default",
"alerts": [
{
"alertTo": "john.doe@example.com",
"message": "The contract expires next week.",
"sent": True,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"counterId": "TEF_2016_aa_001",
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"definitionLanguage": "en",
"documentCategory": "Contract",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Contract Agreement",
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "docx",
"fileType": "word",
"hasPassword": True,
"isConvertible": True,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "LegalNotes.docx",
"pages": 8,
"public": True,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"folder": {
"global": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
},
"user": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
}
},
"html": "<string>",
"isFolder": True,
"isSigned": True,
"lastModified": "2023-11-07T05:31:56Z",
"originalSignFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": True,
"cancelled": True,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"filled": True,
"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,
"shareId": ["sd0oAvfpB4k0yDf787x4"],
"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
}
],
"pdfFile": {
"additionalInfo": "<string>",
"content": "a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": True,
"isConvertible": True,
"mimetype": "application/pdf",
"name": "Contract.pdf",
"pages": 21,
"size": 724158
},
"readBy": ["<string>"],
"revision": 3,
"rights": {
"editGroups": ["<string>"],
"editUsers": ["<string>"],
"private": True,
"readGroups": ["<string>"],
"readUsers": ["<string>"]
},
"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"
}
]
},
"showBarcode": True,
"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"
}
}
],
"shareId": ["sd0oAvfpB4k0yDf787x4"],
"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,
"shareId": ["sd0oAvfpB4k0yDf787x4"],
"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
}
],
"submittedFiles": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": True,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "IDCardFront.pdf",
"pages": 8,
"public": True,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"tags": {
"global": ["Contract", "2026"],
"user": ["To review"]
},
"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"
}
},
"tika": {
"content_ocr": "<string>",
"content_text": "<string>",
"language": "<string>"
},
"tikaStatus": "<string>",
"usePdfA": True,
"values": [
{
"key": "documentType",
"value": "\"d_default\""
}
],
"workflow": [
{
"archived": True,
"group": ["<string>"],
"history": [
{
"action": 123,
"comment": "<string>",
"date": "2023-11-07T05:31:56Z",
"fileChanged": True,
"fileName": "contract.pdf",
"groupReceiver": ["<string>"],
"mentionedDocuments": ["<string>"],
"mentionedUsers": ["jane.doe@example.com"],
"mimetype": "application/pdf",
"name": "document_signed",
"newRevision": 123,
"newTitle": "<string>",
"originalFileName": "contract.docx",
"originalMimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"originalRevision": 123,
"originalTitle": "<string>",
"sent": True,
"shareEmail": "<string>",
"shareFinal": True,
"shareGroup": "<string>",
"shareType": "<string>",
"shareUser": "<string>",
"signatureComponents": "<string>",
"state": 123,
"tags": ["<string>"],
"titleChanged": True,
"type": "document_signed",
"user": {
"name": "john.doe@example.com",
"type": "internal"
},
"userReceiver": [
{
"name": "john.doe@example.com",
"type": "internal"
}
]
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"lastAction": {
"archive": True,
"commentRequired": True,
"following": "<string>",
"id": 5,
"isInitial": True,
"multipleReceivers": True,
"name": "create",
"nextState": 1,
"predefinedReceiver": True,
"receiver": "john.doe@example.com",
"recipient": True,
"rights": "<string>",
"send": True,
"stateId": 0
},
"lastRequest": {
"commentRequired": True,
"id": 5,
"isInitial": True,
"multipleReceivers": True,
"name": "request_approval",
"nextState": 1,
"predefinedReceiver": True,
"receiver": "john.doe@example.com",
"recipient": True,
"resolvedBy": 5,
"rework": True,
"rights": "<string>",
"sign": True,
"stateId": 0
},
"receivedDate": "2023-11-07T05:31:56Z",
"state": 1,
"stateName": "created",
"timeOfDuration": 86400000,
"user": [
{
"name": "john.doe@example.com",
"type": "internal"
}
],
"workflowType": "wf_archive"
}
]
},
"cloneFiles": False,
"cloneMainFile": False,
"source": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify({
documentType: 'd_default',
alerts: [
{
alertTo: 'john.doe@example.com',
message: 'The contract expires next week.',
sent: true,
triggerOn: '2023-11-07T05:31:56Z'
}
],
counterId: 'TEF_2016_aa_001',
customFields: [
{
key: 'internalReference',
type: 'string',
value: 'ACME-2026-001',
displayName: 'Internal reference'
}
],
definitionLanguage: 'en',
documentCategory: 'Contract',
documentId: 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
documentTitle: 'Contract Agreement',
expiresOn: '2026-12-31T00:00:00.000Z',
file: [
{
additionalInfo: '<string>',
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
fileExtension: 'docx',
fileType: 'word',
hasPassword: true,
isConvertible: true,
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
name: 'LegalNotes.docx',
pages: 8,
public: true,
size: 522481,
timestamp: '2023-11-07T05:31:56Z',
user: 'john.doe@example.com'
}
],
folder: {
global: {
level: 123,
parentFolderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6',
path: [{folderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6', level: 123}],
username: 'john.doe@example.com'
},
user: {
level: 123,
parentFolderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6',
path: [{folderId: '97cfb9de-92dd-413a-b5e7-175eff7506d6', level: 123}],
username: 'john.doe@example.com'
}
},
html: '<string>',
isFolder: true,
isSigned: true,
lastModified: '2023-11-07T05:31:56Z',
originalSignFields: [
{
align: 'center',
backgroundColor: '#FFFF00',
bold: true,
cancelled: true,
color: '#000000',
config: '{"multipageType":"all","multiPageCustom":"1"}',
fieldGroupId: 123,
fileName: 'evidence.pdf',
filled: true,
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,
shareId: ['sd0oAvfpB4k0yDf787x4'],
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
}
],
pdfFile: {
additionalInfo: '<string>',
content: 'a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0',
fileExtension: 'pdf',
fileType: 'pdf',
hasPassword: true,
isConvertible: true,
mimetype: 'application/pdf',
name: 'Contract.pdf',
pages: 21,
size: 724158
},
readBy: ['<string>'],
revision: 3,
rights: {
editGroups: ['<string>'],
editUsers: ['<string>'],
private: true,
readGroups: ['<string>'],
readUsers: ['<string>']
},
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'
}
]
},
showBarcode: true,
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'
}
}
],
shareId: ['sd0oAvfpB4k0yDf787x4'],
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,
shareId: ['sd0oAvfpB4k0yDf787x4'],
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
}
],
submittedFiles: [
{
additionalInfo: '<string>',
content: 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
fileExtension: 'pdf',
fileType: 'pdf',
hasPassword: true,
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
name: 'IDCardFront.pdf',
pages: 8,
public: true,
size: 522481,
timestamp: '2023-11-07T05:31:56Z',
user: 'john.doe@example.com'
}
],
tags: {global: ['Contract', '2026'], user: ['To review']},
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'
}
},
tika: {content_ocr: '<string>', content_text: '<string>', language: '<string>'},
tikaStatus: '<string>',
usePdfA: true,
values: [{key: 'documentType', value: '"d_default"'}],
workflow: [
{
archived: true,
group: ['<string>'],
history: [
{
action: 123,
comment: '<string>',
date: '2023-11-07T05:31:56Z',
fileChanged: true,
fileName: 'contract.pdf',
groupReceiver: ['<string>'],
mentionedDocuments: ['<string>'],
mentionedUsers: ['jane.doe@example.com'],
mimetype: 'application/pdf',
name: 'document_signed',
newRevision: 123,
newTitle: '<string>',
originalFileName: 'contract.docx',
originalMimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
originalRevision: 123,
originalTitle: '<string>',
sent: true,
shareEmail: '<string>',
shareFinal: true,
shareGroup: '<string>',
shareType: '<string>',
shareUser: '<string>',
signatureComponents: '<string>',
state: 123,
tags: ['<string>'],
titleChanged: true,
type: 'document_signed',
user: {name: 'john.doe@example.com', type: 'internal'},
userReceiver: [{name: 'john.doe@example.com', type: 'internal'}]
}
],
id: 'a0d01c9d-f72f-4c57-af11-e26bda19cc590',
lastAction: {
archive: true,
commentRequired: true,
following: '<string>',
id: 5,
isInitial: true,
multipleReceivers: true,
name: 'create',
nextState: 1,
predefinedReceiver: true,
receiver: 'john.doe@example.com',
recipient: true,
rights: '<string>',
send: true,
stateId: 0
},
lastRequest: {
commentRequired: true,
id: 5,
isInitial: true,
multipleReceivers: true,
name: 'request_approval',
nextState: 1,
predefinedReceiver: true,
receiver: 'john.doe@example.com',
recipient: true,
resolvedBy: 5,
rework: true,
rights: '<string>',
sign: true,
stateId: 0
},
receivedDate: '2023-11-07T05:31:56Z',
state: 1,
stateName: 'created',
timeOfDuration: 86400000,
user: [{name: 'john.doe@example.com', type: 'internal'}],
workflowType: 'wf_archive'
}
]
}),
cloneFiles: false,
cloneMainFile: false,
source: false
})
};
fetch('https://sandbox.circularo.com/api/v1/drafts?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/drafts?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => [
'documentType' => 'd_default',
'alerts' => [
[
'alertTo' => 'john.doe@example.com',
'message' => 'The contract expires next week.',
'sent' => true,
'triggerOn' => '2023-11-07T05:31:56Z'
]
],
'counterId' => 'TEF_2016_aa_001',
'customFields' => [
[
'key' => 'internalReference',
'type' => 'string',
'value' => 'ACME-2026-001',
'displayName' => 'Internal reference'
]
],
'definitionLanguage' => 'en',
'documentCategory' => 'Contract',
'documentId' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc59',
'documentTitle' => 'Contract Agreement',
'expiresOn' => '2026-12-31T00:00:00.000Z',
'file' => [
[
'additionalInfo' => '<string>',
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'fileExtension' => 'docx',
'fileType' => 'word',
'hasPassword' => true,
'isConvertible' => true,
'mimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'name' => 'LegalNotes.docx',
'pages' => 8,
'public' => true,
'size' => 522481,
'timestamp' => '2023-11-07T05:31:56Z',
'user' => 'john.doe@example.com'
]
],
'folder' => [
'global' => [
'level' => 123,
'parentFolderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'path' => [
[
'folderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'level' => 123
]
],
'username' => 'john.doe@example.com'
],
'user' => [
'level' => 123,
'parentFolderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'path' => [
[
'folderId' => '97cfb9de-92dd-413a-b5e7-175eff7506d6',
'level' => 123
]
],
'username' => 'john.doe@example.com'
]
],
'html' => '<string>',
'isFolder' => true,
'isSigned' => true,
'lastModified' => '2023-11-07T05:31:56Z',
'originalSignFields' => [
[
'align' => 'center',
'backgroundColor' => '#FFFF00',
'bold' => true,
'cancelled' => true,
'color' => '#000000',
'config' => '{"multipageType":"all","multiPageCustom":"1"}',
'fieldGroupId' => 123,
'fileName' => 'evidence.pdf',
'filled' => true,
'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,
'shareId' => [
'sd0oAvfpB4k0yDf787x4'
],
'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
]
],
'pdfFile' => [
'additionalInfo' => '<string>',
'content' => 'a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0',
'fileExtension' => 'pdf',
'fileType' => 'pdf',
'hasPassword' => true,
'isConvertible' => true,
'mimetype' => 'application/pdf',
'name' => 'Contract.pdf',
'pages' => 21,
'size' => 724158
],
'readBy' => [
'<string>'
],
'revision' => 3,
'rights' => [
'editGroups' => [
'<string>'
],
'editUsers' => [
'<string>'
],
'private' => true,
'readGroups' => [
'<string>'
],
'readUsers' => [
'<string>'
]
],
'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'
]
]
],
'showBarcode' => true,
'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'
]
]
],
'shareId' => [
'sd0oAvfpB4k0yDf787x4'
],
'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,
'shareId' => [
'sd0oAvfpB4k0yDf787x4'
],
'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
]
],
'submittedFiles' => [
[
'additionalInfo' => '<string>',
'content' => 'as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth',
'fileExtension' => 'pdf',
'fileType' => 'pdf',
'hasPassword' => true,
'mimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'name' => 'IDCardFront.pdf',
'pages' => 8,
'public' => true,
'size' => 522481,
'timestamp' => '2023-11-07T05:31:56Z',
'user' => 'john.doe@example.com'
]
],
'tags' => [
'global' => [
'Contract',
'2026'
],
'user' => [
'To review'
]
],
'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'
]
],
'tika' => [
'content_ocr' => '<string>',
'content_text' => '<string>',
'language' => '<string>'
],
'tikaStatus' => '<string>',
'usePdfA' => true,
'values' => [
[
'key' => 'documentType',
'value' => '"d_default"'
]
],
'workflow' => [
[
'archived' => true,
'group' => [
'<string>'
],
'history' => [
[
'action' => 123,
'comment' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'fileChanged' => true,
'fileName' => 'contract.pdf',
'groupReceiver' => [
'<string>'
],
'mentionedDocuments' => [
'<string>'
],
'mentionedUsers' => [
'jane.doe@example.com'
],
'mimetype' => 'application/pdf',
'name' => 'document_signed',
'newRevision' => 123,
'newTitle' => '<string>',
'originalFileName' => 'contract.docx',
'originalMimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'originalRevision' => 123,
'originalTitle' => '<string>',
'sent' => true,
'shareEmail' => '<string>',
'shareFinal' => true,
'shareGroup' => '<string>',
'shareType' => '<string>',
'shareUser' => '<string>',
'signatureComponents' => '<string>',
'state' => 123,
'tags' => [
'<string>'
],
'titleChanged' => true,
'type' => 'document_signed',
'user' => [
'name' => 'john.doe@example.com',
'type' => 'internal'
],
'userReceiver' => [
[
'name' => 'john.doe@example.com',
'type' => 'internal'
]
]
]
],
'id' => 'a0d01c9d-f72f-4c57-af11-e26bda19cc590',
'lastAction' => [
'archive' => true,
'commentRequired' => true,
'following' => '<string>',
'id' => 5,
'isInitial' => true,
'multipleReceivers' => true,
'name' => 'create',
'nextState' => 1,
'predefinedReceiver' => true,
'receiver' => 'john.doe@example.com',
'recipient' => true,
'rights' => '<string>',
'send' => true,
'stateId' => 0
],
'lastRequest' => [
'commentRequired' => true,
'id' => 5,
'isInitial' => true,
'multipleReceivers' => true,
'name' => 'request_approval',
'nextState' => 1,
'predefinedReceiver' => true,
'receiver' => 'john.doe@example.com',
'recipient' => true,
'resolvedBy' => 5,
'rework' => true,
'rights' => '<string>',
'sign' => true,
'stateId' => 0
],
'receivedDate' => '2023-11-07T05:31:56Z',
'state' => 1,
'stateName' => 'created',
'timeOfDuration' => 86400000,
'user' => [
[
'name' => 'john.doe@example.com',
'type' => 'internal'
]
],
'workflowType' => 'wf_archive'
]
]
],
'cloneFiles' => false,
'cloneMainFile' => false,
'source' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/drafts?token="
payload := strings.NewReader("{\n \"body\": {\n \"documentType\": \"d_default\",\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\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 \"definitionLanguage\": \"en\",\n \"documentCategory\": \"Contract\",\n \"documentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"documentTitle\": \"Contract Agreement\",\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"docx\",\n \"fileType\": \"word\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"LegalNotes.docx\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"folder\": {\n \"global\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n },\n \"user\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n }\n },\n \"html\": \"<string>\",\n \"isFolder\": true,\n \"isSigned\": true,\n \"lastModified\": \"2023-11-07T05:31:56Z\",\n \"originalSignFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"cancelled\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"filled\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"pdfFile\": {\n \"additionalInfo\": \"<string>\",\n \"content\": \"a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/pdf\",\n \"name\": \"Contract.pdf\",\n \"pages\": 21,\n \"size\": 724158\n },\n \"readBy\": [\n \"<string>\"\n ],\n \"revision\": 3,\n \"rights\": {\n \"editGroups\": [\n \"<string>\"\n ],\n \"editUsers\": [\n \"<string>\"\n ],\n \"private\": true,\n \"readGroups\": [\n \"<string>\"\n ],\n \"readUsers\": [\n \"<string>\"\n ]\n },\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 \"showBarcode\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"submittedFiles\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"IDCardFront.pdf\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"tags\": {\n \"global\": [\n \"Contract\",\n \"2026\"\n ],\n \"user\": [\n \"To review\"\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 \"tika\": {\n \"content_ocr\": \"<string>\",\n \"content_text\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tikaStatus\": \"<string>\",\n \"usePdfA\": true,\n \"values\": [\n {\n \"key\": \"documentType\",\n \"value\": \"\\\"d_default\\\"\"\n }\n ],\n \"workflow\": [\n {\n \"archived\": true,\n \"group\": [\n \"<string>\"\n ],\n \"history\": [\n {\n \"action\": 123,\n \"comment\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"fileChanged\": true,\n \"fileName\": \"contract.pdf\",\n \"groupReceiver\": [\n \"<string>\"\n ],\n \"mentionedDocuments\": [\n \"<string>\"\n ],\n \"mentionedUsers\": [\n \"jane.doe@example.com\"\n ],\n \"mimetype\": \"application/pdf\",\n \"name\": \"document_signed\",\n \"newRevision\": 123,\n \"newTitle\": \"<string>\",\n \"originalFileName\": \"contract.docx\",\n \"originalMimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"originalRevision\": 123,\n \"originalTitle\": \"<string>\",\n \"sent\": true,\n \"shareEmail\": \"<string>\",\n \"shareFinal\": true,\n \"shareGroup\": \"<string>\",\n \"shareType\": \"<string>\",\n \"shareUser\": \"<string>\",\n \"signatureComponents\": \"<string>\",\n \"state\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"titleChanged\": true,\n \"type\": \"document_signed\",\n \"user\": {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n },\n \"userReceiver\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ]\n }\n ],\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc590\",\n \"lastAction\": {\n \"archive\": true,\n \"commentRequired\": true,\n \"following\": \"<string>\",\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"create\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"rights\": \"<string>\",\n \"send\": true,\n \"stateId\": 0\n },\n \"lastRequest\": {\n \"commentRequired\": true,\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"request_approval\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"resolvedBy\": 5,\n \"rework\": true,\n \"rights\": \"<string>\",\n \"sign\": true,\n \"stateId\": 0\n },\n \"receivedDate\": \"2023-11-07T05:31:56Z\",\n \"state\": 1,\n \"stateName\": \"created\",\n \"timeOfDuration\": 86400000,\n \"user\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ],\n \"workflowType\": \"wf_archive\"\n }\n ]\n },\n \"cloneFiles\": false,\n \"cloneMainFile\": false,\n \"source\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.circularo.com/api/v1/drafts?token=")
.header("Content-Type", "application/json")
.body("{\n \"body\": {\n \"documentType\": \"d_default\",\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\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 \"definitionLanguage\": \"en\",\n \"documentCategory\": \"Contract\",\n \"documentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"documentTitle\": \"Contract Agreement\",\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"docx\",\n \"fileType\": \"word\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"LegalNotes.docx\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"folder\": {\n \"global\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n },\n \"user\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n }\n },\n \"html\": \"<string>\",\n \"isFolder\": true,\n \"isSigned\": true,\n \"lastModified\": \"2023-11-07T05:31:56Z\",\n \"originalSignFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"cancelled\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"filled\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"pdfFile\": {\n \"additionalInfo\": \"<string>\",\n \"content\": \"a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/pdf\",\n \"name\": \"Contract.pdf\",\n \"pages\": 21,\n \"size\": 724158\n },\n \"readBy\": [\n \"<string>\"\n ],\n \"revision\": 3,\n \"rights\": {\n \"editGroups\": [\n \"<string>\"\n ],\n \"editUsers\": [\n \"<string>\"\n ],\n \"private\": true,\n \"readGroups\": [\n \"<string>\"\n ],\n \"readUsers\": [\n \"<string>\"\n ]\n },\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 \"showBarcode\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"submittedFiles\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"IDCardFront.pdf\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"tags\": {\n \"global\": [\n \"Contract\",\n \"2026\"\n ],\n \"user\": [\n \"To review\"\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 \"tika\": {\n \"content_ocr\": \"<string>\",\n \"content_text\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tikaStatus\": \"<string>\",\n \"usePdfA\": true,\n \"values\": [\n {\n \"key\": \"documentType\",\n \"value\": \"\\\"d_default\\\"\"\n }\n ],\n \"workflow\": [\n {\n \"archived\": true,\n \"group\": [\n \"<string>\"\n ],\n \"history\": [\n {\n \"action\": 123,\n \"comment\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"fileChanged\": true,\n \"fileName\": \"contract.pdf\",\n \"groupReceiver\": [\n \"<string>\"\n ],\n \"mentionedDocuments\": [\n \"<string>\"\n ],\n \"mentionedUsers\": [\n \"jane.doe@example.com\"\n ],\n \"mimetype\": \"application/pdf\",\n \"name\": \"document_signed\",\n \"newRevision\": 123,\n \"newTitle\": \"<string>\",\n \"originalFileName\": \"contract.docx\",\n \"originalMimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"originalRevision\": 123,\n \"originalTitle\": \"<string>\",\n \"sent\": true,\n \"shareEmail\": \"<string>\",\n \"shareFinal\": true,\n \"shareGroup\": \"<string>\",\n \"shareType\": \"<string>\",\n \"shareUser\": \"<string>\",\n \"signatureComponents\": \"<string>\",\n \"state\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"titleChanged\": true,\n \"type\": \"document_signed\",\n \"user\": {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n },\n \"userReceiver\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ]\n }\n ],\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc590\",\n \"lastAction\": {\n \"archive\": true,\n \"commentRequired\": true,\n \"following\": \"<string>\",\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"create\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"rights\": \"<string>\",\n \"send\": true,\n \"stateId\": 0\n },\n \"lastRequest\": {\n \"commentRequired\": true,\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"request_approval\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"resolvedBy\": 5,\n \"rework\": true,\n \"rights\": \"<string>\",\n \"sign\": true,\n \"stateId\": 0\n },\n \"receivedDate\": \"2023-11-07T05:31:56Z\",\n \"state\": 1,\n \"stateName\": \"created\",\n \"timeOfDuration\": 86400000,\n \"user\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ],\n \"workflowType\": \"wf_archive\"\n }\n ]\n },\n \"cloneFiles\": false,\n \"cloneMainFile\": false,\n \"source\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/drafts?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": {\n \"documentType\": \"d_default\",\n \"alerts\": [\n {\n \"alertTo\": \"john.doe@example.com\",\n \"message\": \"The contract expires next week.\",\n \"sent\": true,\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 \"definitionLanguage\": \"en\",\n \"documentCategory\": \"Contract\",\n \"documentId\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc59\",\n \"documentTitle\": \"Contract Agreement\",\n \"expiresOn\": \"2026-12-31T00:00:00.000Z\",\n \"file\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"docx\",\n \"fileType\": \"word\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"LegalNotes.docx\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"folder\": {\n \"global\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n },\n \"user\": {\n \"level\": 123,\n \"parentFolderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"path\": [\n {\n \"folderId\": \"97cfb9de-92dd-413a-b5e7-175eff7506d6\",\n \"level\": 123\n }\n ],\n \"username\": \"john.doe@example.com\"\n }\n },\n \"html\": \"<string>\",\n \"isFolder\": true,\n \"isSigned\": true,\n \"lastModified\": \"2023-11-07T05:31:56Z\",\n \"originalSignFields\": [\n {\n \"align\": \"center\",\n \"backgroundColor\": \"#FFFF00\",\n \"bold\": true,\n \"cancelled\": true,\n \"color\": \"#000000\",\n \"config\": \"{\\\"multipageType\\\":\\\"all\\\",\\\"multiPageCustom\\\":\\\"1\\\"}\",\n \"fieldGroupId\": 123,\n \"fileName\": \"evidence.pdf\",\n \"filled\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"pdfFile\": {\n \"additionalInfo\": \"<string>\",\n \"content\": \"a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"isConvertible\": true,\n \"mimetype\": \"application/pdf\",\n \"name\": \"Contract.pdf\",\n \"pages\": 21,\n \"size\": 724158\n },\n \"readBy\": [\n \"<string>\"\n ],\n \"revision\": 3,\n \"rights\": {\n \"editGroups\": [\n \"<string>\"\n ],\n \"editUsers\": [\n \"<string>\"\n ],\n \"private\": true,\n \"readGroups\": [\n \"<string>\"\n ],\n \"readUsers\": [\n \"<string>\"\n ]\n },\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 \"showBarcode\": true,\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\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 \"shareId\": [\n \"sd0oAvfpB4k0yDf787x4\"\n ],\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 \"submittedFiles\": [\n {\n \"additionalInfo\": \"<string>\",\n \"content\": \"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth\",\n \"fileExtension\": \"pdf\",\n \"fileType\": \"pdf\",\n \"hasPassword\": true,\n \"mimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"name\": \"IDCardFront.pdf\",\n \"pages\": 8,\n \"public\": true,\n \"size\": 522481,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"user\": \"john.doe@example.com\"\n }\n ],\n \"tags\": {\n \"global\": [\n \"Contract\",\n \"2026\"\n ],\n \"user\": [\n \"To review\"\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 \"tika\": {\n \"content_ocr\": \"<string>\",\n \"content_text\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tikaStatus\": \"<string>\",\n \"usePdfA\": true,\n \"values\": [\n {\n \"key\": \"documentType\",\n \"value\": \"\\\"d_default\\\"\"\n }\n ],\n \"workflow\": [\n {\n \"archived\": true,\n \"group\": [\n \"<string>\"\n ],\n \"history\": [\n {\n \"action\": 123,\n \"comment\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"fileChanged\": true,\n \"fileName\": \"contract.pdf\",\n \"groupReceiver\": [\n \"<string>\"\n ],\n \"mentionedDocuments\": [\n \"<string>\"\n ],\n \"mentionedUsers\": [\n \"jane.doe@example.com\"\n ],\n \"mimetype\": \"application/pdf\",\n \"name\": \"document_signed\",\n \"newRevision\": 123,\n \"newTitle\": \"<string>\",\n \"originalFileName\": \"contract.docx\",\n \"originalMimetype\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"originalRevision\": 123,\n \"originalTitle\": \"<string>\",\n \"sent\": true,\n \"shareEmail\": \"<string>\",\n \"shareFinal\": true,\n \"shareGroup\": \"<string>\",\n \"shareType\": \"<string>\",\n \"shareUser\": \"<string>\",\n \"signatureComponents\": \"<string>\",\n \"state\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"titleChanged\": true,\n \"type\": \"document_signed\",\n \"user\": {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n },\n \"userReceiver\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ]\n }\n ],\n \"id\": \"a0d01c9d-f72f-4c57-af11-e26bda19cc590\",\n \"lastAction\": {\n \"archive\": true,\n \"commentRequired\": true,\n \"following\": \"<string>\",\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"create\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"rights\": \"<string>\",\n \"send\": true,\n \"stateId\": 0\n },\n \"lastRequest\": {\n \"commentRequired\": true,\n \"id\": 5,\n \"isInitial\": true,\n \"multipleReceivers\": true,\n \"name\": \"request_approval\",\n \"nextState\": 1,\n \"predefinedReceiver\": true,\n \"receiver\": \"john.doe@example.com\",\n \"recipient\": true,\n \"resolvedBy\": 5,\n \"rework\": true,\n \"rights\": \"<string>\",\n \"sign\": true,\n \"stateId\": 0\n },\n \"receivedDate\": \"2023-11-07T05:31:56Z\",\n \"state\": 1,\n \"stateName\": \"created\",\n \"timeOfDuration\": 86400000,\n \"user\": [\n {\n \"name\": \"john.doe@example.com\",\n \"type\": \"internal\"\n }\n ],\n \"workflowType\": \"wf_archive\"\n }\n ]\n },\n \"cloneFiles\": false,\n \"cloneMainFile\": false,\n \"source\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b",
"source": {
"alerts": [
{
"alertTo": "john.doe@example.com",
"message": "The contract expires next week.",
"sent": true,
"triggerOn": "2023-11-07T05:31:56Z"
}
],
"barcode": "g153bn7qeo63b5kzec7q9cvnxnd03n34d4zkfyjy8m728eqdznf3htxm8mh14d48",
"counterId": "TEF_2016_aa_001",
"createDate": "2023-11-07T05:31:56Z",
"createName": {
"name": "john.doe@example.com",
"type": "internal"
},
"customFields": [
{
"key": "internalReference",
"type": "string",
"value": "ACME-2026-001",
"displayName": "Internal reference"
}
],
"definitionLanguage": "en",
"definitionType": "edoc",
"documentCategory": "Contract",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Contract Agreement",
"draftType": "create",
"expiresOn": "2026-12-31T00:00:00.000Z",
"file": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "docx",
"fileType": "word",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "LegalNotes.docx",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"folder": {
"global": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
},
"user": {
"level": 123,
"parentFolderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"path": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"level": 123
}
],
"username": "john.doe@example.com"
}
},
"html": "<string>",
"id": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"isFolder": true,
"isSigned": true,
"lastModified": "2023-11-07T05:31:56Z",
"lastUpdated": "2023-11-07T05:31:56Z",
"organization": "d0a72e51-728e-4a1d-9a5c-13796122b6f8",
"originalSignFields": [
{
"align": "center",
"backgroundColor": "#FFFF00",
"bold": true,
"cancelled": true,
"color": "#000000",
"config": "{\"multipageType\":\"all\",\"multiPageCustom\":\"1\"}",
"fieldGroupId": 123,
"fileName": "evidence.pdf",
"filled": true,
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"pdfFile": {
"additionalInfo": "<string>",
"content": "a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"isConvertible": true,
"mimetype": "application/pdf",
"name": "Contract.pdf",
"pages": 21,
"size": 724158
},
"readBy": [
"<string>"
],
"revision": 3,
"rights": {
"editGroups": [
"<string>"
],
"editUsers": [
"<string>"
],
"private": true,
"readGroups": [
"<string>"
],
"readUsers": [
"<string>"
]
},
"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": [
"email"
],
"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": [
"dateOfBirth"
],
"user": "john.doe@example.com"
}
],
"usersWithOAuthFactors": [
{
"oauthFactors": [
{
"type": "phoneNumber",
"value": "+420777123456"
}
],
"oauthFactorTypes": [
"email"
],
"user": "john.doe@example.com"
}
]
},
"showBarcode": true,
"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": [
"idCard"
],
"kycExpectedData": {
"dateOfBirth": "1988-11-13T00:00:00.000Z",
"documentNumber": "X1234567",
"nationality": "CZE"
},
"kycExpectedDataFields": [
"dateOfBirth"
],
"kycFactors": [
"idVerification"
],
"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": [
"email"
],
"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"
}
}
],
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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,
"shareId": [
"sd0oAvfpB4k0yDf787x4"
],
"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
}
],
"submittedFiles": [
{
"additionalInfo": "<string>",
"content": "as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth",
"fileExtension": "pdf",
"fileType": "pdf",
"hasPassword": true,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"name": "IDCardFront.pdf",
"pages": 8,
"public": true,
"size": 522481,
"timestamp": "2023-11-07T05:31:56Z",
"user": "john.doe@example.com"
}
],
"tags": {
"global": [
"Contract",
"2026"
],
"user": [
"To review"
]
},
"term": {
"nextNotificationOn": "2026-11-30T08:00:00.000Z",
"nextRenewalOn": "2027-01-01T00:00:00.000Z",
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartDate": "2026-10-01T00:00:00.000Z"
},
"reminders": [
{
"nextReminderOn": "2026-11-30T08:00:00.000Z",
"notifyOwner": true,
"period": "30d",
"recipients": [
"jane.doe@example.com"
],
"sentOn": "2026-11-30T08:00:07.412Z",
"skipped": true,
"time": "09:00",
"timeZone": "Europe/Prague"
}
],
"renewal": {
"finalDate": "2030-12-31T00:00:00.000Z",
"lastRenewedOn": "2027-01-01T00:15:03.118Z",
"maxRenewals": 50,
"noticeDueOn": "2026-09-30T00:00:00.000Z",
"noticePeriod": "3M",
"period": "1y",
"renewedCount": 1,
"type": "auto"
},
"timeZone": "Europe/Prague"
},
"termType": "fixed_term",
"thumbnails": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"tika": {
"content_ocr": "<string>",
"content_text": "<string>",
"language": "<string>"
},
"tikaStatus": "<string>",
"usePdfA": true,
"version": 123,
"workflow": [
{
"archived": true,
"group": [
"<string>"
],
"history": [
{
"action": 123,
"comment": "<string>",
"date": "2023-11-07T05:31:56Z",
"fileChanged": true,
"fileName": "contract.pdf",
"groupReceiver": [
"<string>"
],
"mentionedDocuments": [
"<string>"
],
"mentionedUsers": [
"jane.doe@example.com"
],
"mimetype": "application/pdf",
"name": "document_signed",
"newRevision": 123,
"newTitle": "<string>",
"originalFileName": "contract.docx",
"originalMimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"originalRevision": 123,
"originalTitle": "<string>",
"sent": true,
"shareEmail": "<string>",
"shareFinal": true,
"shareGroup": "<string>",
"shareType": "<string>",
"shareUser": "<string>",
"signatureComponents": "<string>",
"state": 123,
"tags": [
"<string>"
],
"titleChanged": true,
"type": "document_signed",
"user": {
"name": "john.doe@example.com",
"type": "internal"
},
"userReceiver": [
{
"name": "john.doe@example.com",
"type": "internal"
}
]
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"lastAction": {
"archive": true,
"commentRequired": true,
"following": "<string>",
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "create",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"rights": "<string>",
"send": true,
"stateId": 0
},
"lastRequest": {
"commentRequired": true,
"id": 5,
"isInitial": true,
"multipleReceivers": true,
"name": "request_approval",
"nextState": 1,
"predefinedReceiver": true,
"receiver": "john.doe@example.com",
"recipient": true,
"resolvedBy": 5,
"rework": true,
"rights": "<string>",
"sign": true,
"stateId": 0
},
"receivedDate": "2023-11-07T05:31:56Z",
"state": 1,
"stateName": "created",
"timeOfDuration": 86400000,
"user": [
{
"name": "john.doe@example.com",
"type": "internal"
}
],
"workflowType": "wf_archive"
}
]
}
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Body
Response
Returns the identifier of the stored draft.