from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.upload_kyb_documents(
"33333333-4444-5555-6666-777777777777",
documents=[open("document.pdf", "rb")],
)
print(result)import Didit, { fileFromPath } from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.uploadKybDocuments("33333333-4444-5555-6666-777777777777", {
documents: [await fileFromPath("document.pdf")],
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.UploadKYBDocuments(ctx, "33333333-4444-5555-6666-777777777777", didit.SessionsUploadKYBDocumentsParams{
Documents: []didit.File{didit.FileFromPath("document.pdf")},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.nio.file.Path;
import java.util.List;
import me.didit.Didit;
import me.didit.types.SessionsUploadKybDocumentsParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().uploadKybDocuments("33333333-4444-5555-6666-777777777777", SessionsUploadKybDocumentsParams.builder()
.documents(List.of(Path.of("document.pdf")))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
use Didit\File;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->uploadKybDocuments('33333333-4444-5555-6666-777777777777', [
'documents' => [File::fromPath('document.pdf')],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.upload_kyb_documents(
"33333333-4444-5555-6666-777777777777",
documents: [Pathname("document.pdf")]
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Sessions.UploadKybDocumentsAsync("33333333-4444-5555-6666-777777777777", new SessionsUploadKybDocumentsParams
{
Documents = new FileUpload[] { FileUpload.FromPath("document.pdf") },
});
Console.WriteLine(JsonSerializer.Serialize(result));curl --request POST \
--url https://verification.didit.me/v3/session/{sessionId}/kyb/documents/ \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form documents=@example-file \
--form 'document_passwords=<string>' \
--form 'locale=<string>'{
"valid": true,
"next_step": "KYB_KEY_PEOPLE",
"kyb_status": "In Progress"
}Upload KYB Documents API
Upload corporate documents to a Business Verification session from your own server, with the hosted pipeline’s OCR and checks.
from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.upload_kyb_documents(
"33333333-4444-5555-6666-777777777777",
documents=[open("document.pdf", "rb")],
)
print(result)import Didit, { fileFromPath } from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.uploadKybDocuments("33333333-4444-5555-6666-777777777777", {
documents: [await fileFromPath("document.pdf")],
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.UploadKYBDocuments(ctx, "33333333-4444-5555-6666-777777777777", didit.SessionsUploadKYBDocumentsParams{
Documents: []didit.File{didit.FileFromPath("document.pdf")},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.nio.file.Path;
import java.util.List;
import me.didit.Didit;
import me.didit.types.SessionsUploadKybDocumentsParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().uploadKybDocuments("33333333-4444-5555-6666-777777777777", SessionsUploadKybDocumentsParams.builder()
.documents(List.of(Path.of("document.pdf")))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
use Didit\File;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->uploadKybDocuments('33333333-4444-5555-6666-777777777777', [
'documents' => [File::fromPath('document.pdf')],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.upload_kyb_documents(
"33333333-4444-5555-6666-777777777777",
documents: [Pathname("document.pdf")]
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Sessions.UploadKybDocumentsAsync("33333333-4444-5555-6666-777777777777", new SessionsUploadKybDocumentsParams
{
Documents = new FileUpload[] { FileUpload.FromPath("document.pdf") },
});
Console.WriteLine(JsonSerializer.Serialize(result));curl --request POST \
--url https://verification.didit.me/v3/session/{sessionId}/kyb/documents/ \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form documents=@example-file \
--form 'document_passwords=<string>' \
--form 'locale=<string>'{
"valid": true,
"next_step": "KYB_KEY_PEOPLE",
"kyb_status": "In Progress"
}Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Path Parameters
UUID of the Business Verification (KYB) session. It must belong to the application of the API key.
"33333333-4444-5555-6666-777777777777"
Query Parameters
Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.
Body
Files to upload: JPG, JPEG, PNG, TIFF, WEBP, PDF or ZIP archives of them. PDFs up to 50 MB, photos up to 6 MB before compression.
One entry per file in documents, in the same order: the password of a protected PDF, empty for any other file.
Required document group this upload answers.
LEGAL_PRESENCE, COMPANY_DETAILS, OWNERSHIP_STRUCTURE, REPRESENTATIVES_AUTHORIZATION Locale used to translate the response of the next step.
10Response
Documents processed. When every required group is satisfied the session advances and next_step names the next step; otherwise it stays on the Documents step and document_groups and document_answer say what is still missing.