curl --fail \
https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/generate-pdf/ \
-H 'x-api-key: YOUR_API_KEY' \
--output report.pdffrom didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
content = client.sessions.generate_pdf(
"11111111-2222-3333-4444-555555555555",
)
with open("download.pdf", "wb") as file:
file.write(content)import { writeFile } from "node:fs/promises";
import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const content = await didit.sessions.generatePdf("11111111-2222-3333-4444-555555555555");
await writeFile("download.pdf", Buffer.from(await content.arrayBuffer()));ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
resp, err := client.Sessions.GeneratePDF(ctx, "11111111-2222-3333-4444-555555555555")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
file, err := os.Create("download.pdf")
if err != nil {
log.Fatal(err)
}
defer file.Close()
if _, err := io.Copy(file, resp.Body); err != nil {
log.Fatal(err)
}import java.nio.file.Path;
import me.didit.Didit;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
client.sessions().generatePdf("11111111-2222-3333-4444-555555555555")
.writeTo(Path.of("download.pdf"));<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$content = $didit->sessions->generatePdf('11111111-2222-3333-4444-555555555555');
$content->saveTo('download.pdf');require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
content = didit.sessions.generate_pdf("11111111-2222-3333-4444-555555555555")
File.binwrite("download.pdf", content)using System;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var content = await client.Sessions.GeneratePdfAsync("11111111-2222-3333-4444-555555555555");
await content.SaveToAsync("download.pdf");"<string>"Generate PDF API: KYC & KYB Compliance Reports
GET /v3/session//generate-pdf/ to download branded compliance reports for KYC or KYB sessions. White-label, audit-ready, pay-per-use pricing.
curl --fail \
https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/generate-pdf/ \
-H 'x-api-key: YOUR_API_KEY' \
--output report.pdffrom didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
content = client.sessions.generate_pdf(
"11111111-2222-3333-4444-555555555555",
)
with open("download.pdf", "wb") as file:
file.write(content)import { writeFile } from "node:fs/promises";
import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const content = await didit.sessions.generatePdf("11111111-2222-3333-4444-555555555555");
await writeFile("download.pdf", Buffer.from(await content.arrayBuffer()));ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
resp, err := client.Sessions.GeneratePDF(ctx, "11111111-2222-3333-4444-555555555555")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
file, err := os.Create("download.pdf")
if err != nil {
log.Fatal(err)
}
defer file.Close()
if _, err := io.Copy(file, resp.Body); err != nil {
log.Fatal(err)
}import java.nio.file.Path;
import me.didit.Didit;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
client.sessions().generatePdf("11111111-2222-3333-4444-555555555555")
.writeTo(Path.of("download.pdf"));<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$content = $didit->sessions->generatePdf('11111111-2222-3333-4444-555555555555');
$content->saveTo('download.pdf');require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
content = didit.sessions.generate_pdf("11111111-2222-3333-4444-555555555555")
File.binwrite("download.pdf", content)using System;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var content = await client.Sessions.GeneratePdfAsync("11111111-2222-3333-4444-555555555555");
await content.SaveToAsync("download.pdf");"<string>"KYC and KYB support
Works for both User Verification (KYC) and Business Verification (KYB) sessions. Didit routes to the appropriate PDF template automatically:- User Verification (KYC) session → report with ID verification, liveness, face match, AML, POA sections.
- Business Verification (KYB) session → report with company registry, key people (UBOs/officers), documents, AML, questionnaire, phone, email, and IP analysis sections when those features are part of the workflow.
Filename convention
| Kind | Filename |
|---|---|
| User | session_<session_id>.pdf |
| Business | business_<session_id>.pdf |
Content-Disposition: attachment; filename=... header.
Status requirement
The session must be inAPPROVED, DECLINED, or IN_REVIEW to generate a PDF. In-progress or not-started sessions return 403.
Examples
- User Verification (KYC) PDF
- Business Verification (KYB) PDF
curl https://verification.didit.me/v3/session/4c5c7f3a-.../generate-pdf/ \
-H "x-api-key: YOUR_API_KEY" \
-o kyc-report.pdf
curl https://verification.didit.me/v3/session/bs-01HJX1.../generate-pdf/ \
-H "x-api-key: YOUR_API_KEY" \
-o kyb-report.pdf
White-label
When the application has white-label customization enabled, the PDF uses your logo and privacy-policy URL. Configure at Console → Customization.Permission
Requiresread:sessions. Same scope for both kinds.
Related
- Sessions overview
- Retrieve session — JSON version of the same decision
- Download user history PDF — every reportable session of one user in a single file
- KYB response schema — fields included in business PDFs
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 wrong, revoked or expired; 403 means no key was sent, 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 User Verification (KYC) or Business Verification (KYB) session to render — the session_id returned by POST /v3/session/. The same path works for both session kinds; use the Content-Disposition filename on the response to tell which report type you received.
Must be a well-formed, lowercase UUID. The route only matches valid UUIDs, so a malformed value is rejected by the URL router before any application code runs and the response is a 404 HTML page rather than the JSON {"detail": ...} envelope shown below. The route's UUID converter only matches the canonical lowercase form — uppercase-hex UUIDs are rejected with the HTML 404.
"11111111-2222-3333-4444-555555555555"
Response
The rendered PDF document, returned directly as binary application/pdf — there is no JSON wrapper and no download-URL indirection. The body starts with the %PDF magic bytes (PDF 1.7). Save it to a .pdf file or stream it through to your caller.
The response is of type file.