API Reference
Search…
Upload image attachment
post
https://api.complycube.com
/v1/documents/:id/upload/:documentSide
Upload an image attachment

Example request

cURL
Node.js
Python
PHP
.NET
curl -X POST https://api.complycube.com/v1/documents/{:documentId}/upload/{:documentSide} \
-H 'Authorization: <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "front-test.jpg",
"data": "<BASE64_DATA_CONTENT>"
}'
const { ComplyCube } = require("@complycube/api");
const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });
await complycube.document.upload("DOCUMENT_ID", {
fileName: "front-test.jpg",
data: "<BASE64_DATA_CONTENT>"
}, "DOCUMENT_SIDE");
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')
doc_front = {
'fileName': 'passport_front.jpg',
'data': '<BASE_64_ENCODED>'
}
img = cc_api.documents.upload('DOCUMENT_ID','DOCUMENT_SIDE',**doc_front)
use ComplyCube\ComplyCubeClient;
$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
$img = $ccapi->documents()->upload('DOCUMENT_ID',
'front',
['fileName' => 'passport_front.jpg',
'data' => '<BASE64_CONTENT>']);
using ComplyCube.Net;
using ComplyCube.Net.Resources.Documents;
using ComplyCube.Net.Resources.Images;
var docApi = new DocumentApi(new ComplyCubeClient("<YOUR_API_KEY>"));
var docFront = new ImageRequest
{
fileName = "front-test.jpg",
data= "<BASE64_CONTENT>"
};
var img = await docApi.UploadImageAsync("DOCUMENT_ID", "front", docFront);