curl --request POST \
--url https://api-sandbox.synctera.com/v0/documents/{document_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form 'description=<string>' \
--form 'name=<string>'import requests
url = "https://api-sandbox.synctera.com/v0/documents/{document_id}/versions"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"description": "<string>",
"name": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('description', '<string>');
form.append('name', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api-sandbox.synctera.com/v0/documents/{document_id}/versions', 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://api-sandbox.synctera.com/v0/documents/{document_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://api-sandbox.synctera.com/v0/documents/{document_id}/versions"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.synctera.com/v0/documents/{document_id}/versions")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.synctera.com/v0/documents/{document_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"available_versions": [
123
],
"available_versions_info": [
{
"creation_time": "2010-05-06T12:23:34.321Z",
"file_name": "<string>",
"last_updated_time": "2010-05-06T12:23:34.321Z",
"version": 123
}
],
"batch_id": "<string>",
"creation_time": "2010-05-06T12:23:34.321Z",
"deletion_reason": "<string>",
"description": "<string>",
"encryption": "NOT_REQUIRED",
"file_name": "<string>",
"id": "b01db9c7-78f2-4a99-8aca-1231d32f9b96",
"last_updated_time": "2010-05-06T12:23:34.321Z",
"metadata": {},
"name": "<string>",
"related_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"related_resource_type": "ACCOUNT",
"tenant": "abcdef_ghijkl",
"type": "ADDRESS_VERIFICATION",
"version": 123
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}Create a new document version
Docs
curl --request POST \
--url https://api-sandbox.synctera.com/v0/documents/{document_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form 'description=<string>' \
--form 'name=<string>'import requests
url = "https://api-sandbox.synctera.com/v0/documents/{document_id}/versions"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"description": "<string>",
"name": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('description', '<string>');
form.append('name', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api-sandbox.synctera.com/v0/documents/{document_id}/versions', 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://api-sandbox.synctera.com/v0/documents/{document_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://api-sandbox.synctera.com/v0/documents/{document_id}/versions"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.synctera.com/v0/documents/{document_id}/versions")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.synctera.com/v0/documents/{document_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"available_versions": [
123
],
"available_versions_info": [
{
"creation_time": "2010-05-06T12:23:34.321Z",
"file_name": "<string>",
"last_updated_time": "2010-05-06T12:23:34.321Z",
"version": 123
}
],
"batch_id": "<string>",
"creation_time": "2010-05-06T12:23:34.321Z",
"deletion_reason": "<string>",
"description": "<string>",
"encryption": "NOT_REQUIRED",
"file_name": "<string>",
"id": "b01db9c7-78f2-4a99-8aca-1231d32f9b96",
"last_updated_time": "2010-05-06T12:23:34.321Z",
"metadata": {},
"name": "<string>",
"related_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"related_resource_type": "ACCOUNT",
"tenant": "abcdef_ghijkl",
"type": "ADDRESS_VERIFICATION",
"version": 123
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}Authorizations
Path Parameters
Body
Whether the file will be encrypted by the Synctera platform before storing. All documents containing PII must be encrypted. When creating a new document version, the encryption value must match the encryption value of the previous version. Due to this, we recommend that you omit this property when creating a new document version. This property is deprecated and will be removed in a future release.
NOT_REQUIRED, REQUIRED The type of the document. The type can be changed after the document is created, except that a non-encrypted document cannot be changed to a type that requires encryption.
ADDRESS_VERIFICATION, APPLICATION_DOCUMENTATION, BILLING_DOCUMENT, CHECK_IMAGE, COMPANY_PROFILE_DOCUMENT, COMPLIANCE_REPORT, DATE_OF_BIRTH_VERIFICATION, FINANCIAL_FILE, IDENTITY_DOCUMENTATION, INCOME_DOCUMENTATION, STATEMENT, STATEMENT_DISCLOSURE, TAX_FORM, TERMS_OF_SERVICE Response
Created document representation.
Whether the file will be encrypted by the Synctera platform before storing. All documents containing PII must be encrypted.
Creating and retrieving encrypted documents requires documents_encrypted:write and documents_encrypted:read permissions, respectively.
If encryption is not specified, a default will be chosen based on the document type. See the following table.
Document types with a default of REQUIRED must be encrypted. It is an error to explicitly set encryption to NOT_REQUIRED for these document types.
Document types with a default of NOT_REQUIRED may optionally be encrypted by explicitly setting encryption to REQUIRED.
| Document Type | Default Encryption |
|---|---|
| ADDRESS_VERIFICATION | REQUIRED |
| APPLICATION_DOCUMENTATION | NOT_REQUIRED |
| BILLING_DOCUMENT | NOT_REQUIRED |
| CHECK_IMAGE | REQUIRED |
| COMPANY_PROFILE_DOCUMENT | NOT_REQUIRED |
| COMPLIANCE_REPORT | REQUIRED |
| DATE_OF_BIRTH_VERIFICATION | REQUIRED |
| FINANCIAL_FILE | REQUIRED |
| IDENTITY_DOCUMENTATION | REQUIRED |
| INCOME_DOCUMENTATION | REQUIRED |
| STATEMENT | NOT_REQUIRED |
| STATEMENT_DISCLOSURE | NOT_REQUIRED |
| TAX_FORM | REQUIRED |
| TERMS_OF_SERVICE | NOT_REQUIRED |
NOT_REQUIRED, REQUIRED The type of the document. The type can be changed after the document is created, except that a non-encrypted document cannot be changed to a type that requires encryption.
ADDRESS_VERIFICATION, APPLICATION_DOCUMENTATION, BILLING_DOCUMENT, CHECK_IMAGE, COMPANY_PROFILE_DOCUMENT, COMPLIANCE_REPORT, DATE_OF_BIRTH_VERIFICATION, FINANCIAL_FILE, IDENTITY_DOCUMENTATION, INCOME_DOCUMENTATION, STATEMENT, STATEMENT_DISCLOSURE, TAX_FORM, TERMS_OF_SERVICE Was this page helpful?

