curl -X POST 'https://verification.didit.me/v3/questionnaires/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"title": "Customer Onboarding",
"default_language": "en",
"languages": ["en"],
"form_elements": [
{
"id": "occupation",
"element_type": "short_text",
"label": {"en": "What is your occupation?"},
"is_required": true
}
]
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.questionnaires.create(
title="Customer Onboarding",
description="Additional information needed for verification",
languages=["en"],
default_language="en",
is_active=True,
form_elements=[{
"id": "occupation",
"element_type": "short_text",
"label": {"en": "What is your occupation?"},
"placeholder": {"en": "Software engineer"},
"is_required": True,
}, {
"id": "source_of_funds",
"element_type": "multiple_choice",
"label": {"en": "Source of funds"},
"is_required": True,
"options": [{
"value": "employment",
"label": {"en": "Employment"},
}, {
"value": "business",
"label": {"en": "Business"},
}, {
"value": "investments",
"label": {"en": "Investments"},
}, {
"value": "other",
"label": {"en": "Other"},
}],
}],
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.questionnaires.create({
title: "Customer Onboarding",
description: "Additional information needed for verification",
languages: ["en"],
default_language: "en",
is_active: true,
form_elements: [{
id: "occupation",
element_type: "short_text",
label: { en: "What is your occupation?" },
placeholder: { en: "Software engineer" },
is_required: true,
}, {
id: "source_of_funds",
element_type: "multiple_choice",
label: { en: "Source of funds" },
is_required: true,
options: [{
value: "employment",
label: { en: "Employment" },
}, {
value: "business",
label: { en: "Business" },
}, {
value: "investments",
label: { en: "Investments" },
}, {
value: "other",
label: { en: "Other" },
}],
}],
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Questionnaires.Create(ctx, didit.SimpleQuestionnaireRequest{
Title: "Customer Onboarding",
Description: didit.String("Additional information needed for verification"),
Languages: []string{"en"},
DefaultLanguage: didit.String("en"),
IsActive: didit.Bool(true),
FormElements: []didit.SimpleQuestionnaireElement{{
ID: didit.String("occupation"),
ElementType: "short_text",
Label: map[string]string{"en": "What is your occupation?"},
Placeholder: didit.Some(map[string]string{"en": "Software engineer"}),
IsRequired: didit.Bool(true),
}, {
ID: didit.String("source_of_funds"),
ElementType: "multiple_choice",
Label: map[string]string{"en": "Source of funds"},
IsRequired: didit.Bool(true),
Options: didit.Some([]didit.SimpleQuestionnaireElementOptions{{
Value: didit.String("employment"),
Label: map[string]string{"en": "Employment"},
}, {
Value: didit.String("business"),
Label: map[string]string{"en": "Business"},
}, {
Value: didit.String("investments"),
Label: map[string]string{"en": "Investments"},
}, {
Value: didit.String("other"),
Label: map[string]string{"en": "Other"},
}}),
}},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import java.util.Map;
import me.didit.Didit;
import me.didit.types.SimpleQuestionnaireElement;
import me.didit.types.SimpleQuestionnaireRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.questionnaires().create(SimpleQuestionnaireRequest.builder()
.title("Customer Onboarding")
.description("Additional information needed for verification")
.languages(List.of("en"))
.defaultLanguage("en")
.isActive(true)
.formElements(List.of(
SimpleQuestionnaireElement.builder()
.id("occupation")
.elementType(SimpleQuestionnaireElement.ElementType.of("short_text"))
.label(Map.of("en", "What is your occupation?"))
.placeholder(Map.of("en", "Software engineer"))
.isRequired(true)
.build(),
SimpleQuestionnaireElement.builder()
.id("source_of_funds")
.elementType(SimpleQuestionnaireElement.ElementType.of("multiple_choice"))
.label(Map.of("en", "Source of funds"))
.isRequired(true)
.options(List.of(
SimpleQuestionnaireElement.Options.builder()
.value("employment")
.label(Map.of("en", "Employment"))
.build(),
SimpleQuestionnaireElement.Options.builder()
.value("business")
.label(Map.of("en", "Business"))
.build(),
SimpleQuestionnaireElement.Options.builder()
.value("investments")
.label(Map.of("en", "Investments"))
.build(),
SimpleQuestionnaireElement.Options.builder()
.value("other")
.label(Map.of("en", "Other"))
.build()))
.build()))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->questionnaires->create([
'title' => 'Customer Onboarding',
'description' => 'Additional information needed for verification',
'languages' => ['en'],
'default_language' => 'en',
'is_active' => true,
'form_elements' => [[
'id' => 'occupation',
'element_type' => 'short_text',
'label' => ['en' => 'What is your occupation?'],
'placeholder' => ['en' => 'Software engineer'],
'is_required' => true,
], [
'id' => 'source_of_funds',
'element_type' => 'multiple_choice',
'label' => ['en' => 'Source of funds'],
'is_required' => true,
'options' => [[
'value' => 'employment',
'label' => ['en' => 'Employment'],
], [
'value' => 'business',
'label' => ['en' => 'Business'],
], [
'value' => 'investments',
'label' => ['en' => 'Investments'],
], [
'value' => 'other',
'label' => ['en' => 'Other'],
]],
]],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.questionnaires.create(
title: "Customer Onboarding",
description: "Additional information needed for verification",
languages: ["en"],
default_language: "en",
is_active: true,
form_elements: [{
id: "occupation",
element_type: "short_text",
label: { en: "What is your occupation?" },
placeholder: { en: "Software engineer" },
is_required: true,
}, {
id: "source_of_funds",
element_type: "multiple_choice",
label: { en: "Source of funds" },
is_required: true,
options: [{
value: "employment",
label: { en: "Employment" },
}, {
value: "business",
label: { en: "Business" },
}, {
value: "investments",
label: { en: "Investments" },
}, {
value: "other",
label: { en: "Other" },
}],
}]
)
puts result.to_husing System;
using System.Collections.Generic;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Questionnaires.CreateAsync(new SimpleQuestionnaireRequest
{
Title = "Customer Onboarding",
Description = "Additional information needed for verification",
Languages = new string[] { "en" },
DefaultLanguage = "en",
IsActive = true,
FormElements = new SimpleQuestionnaireElement[]
{
new()
{
Id = "occupation",
ElementType = "short_text",
Label = new Dictionary<string, string> { ["en"] = "What is your occupation?" },
Placeholder = new Dictionary<string, string> { ["en"] = "Software engineer" },
IsRequired = true,
},
new()
{
Id = "source_of_funds",
ElementType = "multiple_choice",
Label = new Dictionary<string, string> { ["en"] = "Source of funds" },
IsRequired = true,
Options = new SimpleQuestionnaireElementOptions[]
{
new()
{
Value = "employment",
Label = new Dictionary<string, string> { ["en"] = "Employment" },
},
new()
{
Value = "business",
Label = new Dictionary<string, string> { ["en"] = "Business" },
},
new()
{
Value = "investments",
Label = new Dictionary<string, string> { ["en"] = "Investments" },
},
new()
{
Value = "other",
Label = new Dictionary<string, string> { ["en"] = "Other" },
},
},
},
},
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"questionnaire_id": "11111111-2222-3333-4444-555555555555",
"title": "Customer Onboarding",
"description": "Additional information needed for verification",
"languages": [
"en"
],
"default_language": "en",
"is_active": true,
"is_simple_questionnaire": true,
"graph": {
"start_node": "occupation",
"nodes": {
"occupation": {
"element_type": "SHORT_TEXT",
"is_required": true,
"title": {
"en": "What is your occupation?"
},
"next": "source_of_funds"
},
"source_of_funds": {
"element_type": "MULTIPLE_CHOICE",
"is_required": true,
"title": {
"en": "Source of funds"
},
"choices": [
{
"value": "employment",
"label": {
"en": "Employment"
}
},
{
"value": "business",
"label": {
"en": "Business"
}
}
],
"next": null
}
}
},
"sections": [],
"questionnaire_group_id": "11111111-2222-3333-4444-555555555555",
"version": 1,
"status": "published",
"published_at": "2026-04-23T10:00:00Z",
"is_editable": false
}Create Questionnaire API: Custom KYC Form
Build custom KYC and compliance questionnaires programmatically with ordered questions, options, and 54 language translations. Pay-per-call from Didit.
curl -X POST 'https://verification.didit.me/v3/questionnaires/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"title": "Customer Onboarding",
"default_language": "en",
"languages": ["en"],
"form_elements": [
{
"id": "occupation",
"element_type": "short_text",
"label": {"en": "What is your occupation?"},
"is_required": true
}
]
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.questionnaires.create(
title="Customer Onboarding",
description="Additional information needed for verification",
languages=["en"],
default_language="en",
is_active=True,
form_elements=[{
"id": "occupation",
"element_type": "short_text",
"label": {"en": "What is your occupation?"},
"placeholder": {"en": "Software engineer"},
"is_required": True,
}, {
"id": "source_of_funds",
"element_type": "multiple_choice",
"label": {"en": "Source of funds"},
"is_required": True,
"options": [{
"value": "employment",
"label": {"en": "Employment"},
}, {
"value": "business",
"label": {"en": "Business"},
}, {
"value": "investments",
"label": {"en": "Investments"},
}, {
"value": "other",
"label": {"en": "Other"},
}],
}],
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.questionnaires.create({
title: "Customer Onboarding",
description: "Additional information needed for verification",
languages: ["en"],
default_language: "en",
is_active: true,
form_elements: [{
id: "occupation",
element_type: "short_text",
label: { en: "What is your occupation?" },
placeholder: { en: "Software engineer" },
is_required: true,
}, {
id: "source_of_funds",
element_type: "multiple_choice",
label: { en: "Source of funds" },
is_required: true,
options: [{
value: "employment",
label: { en: "Employment" },
}, {
value: "business",
label: { en: "Business" },
}, {
value: "investments",
label: { en: "Investments" },
}, {
value: "other",
label: { en: "Other" },
}],
}],
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Questionnaires.Create(ctx, didit.SimpleQuestionnaireRequest{
Title: "Customer Onboarding",
Description: didit.String("Additional information needed for verification"),
Languages: []string{"en"},
DefaultLanguage: didit.String("en"),
IsActive: didit.Bool(true),
FormElements: []didit.SimpleQuestionnaireElement{{
ID: didit.String("occupation"),
ElementType: "short_text",
Label: map[string]string{"en": "What is your occupation?"},
Placeholder: didit.Some(map[string]string{"en": "Software engineer"}),
IsRequired: didit.Bool(true),
}, {
ID: didit.String("source_of_funds"),
ElementType: "multiple_choice",
Label: map[string]string{"en": "Source of funds"},
IsRequired: didit.Bool(true),
Options: didit.Some([]didit.SimpleQuestionnaireElementOptions{{
Value: didit.String("employment"),
Label: map[string]string{"en": "Employment"},
}, {
Value: didit.String("business"),
Label: map[string]string{"en": "Business"},
}, {
Value: didit.String("investments"),
Label: map[string]string{"en": "Investments"},
}, {
Value: didit.String("other"),
Label: map[string]string{"en": "Other"},
}}),
}},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import java.util.Map;
import me.didit.Didit;
import me.didit.types.SimpleQuestionnaireElement;
import me.didit.types.SimpleQuestionnaireRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.questionnaires().create(SimpleQuestionnaireRequest.builder()
.title("Customer Onboarding")
.description("Additional information needed for verification")
.languages(List.of("en"))
.defaultLanguage("en")
.isActive(true)
.formElements(List.of(
SimpleQuestionnaireElement.builder()
.id("occupation")
.elementType(SimpleQuestionnaireElement.ElementType.of("short_text"))
.label(Map.of("en", "What is your occupation?"))
.placeholder(Map.of("en", "Software engineer"))
.isRequired(true)
.build(),
SimpleQuestionnaireElement.builder()
.id("source_of_funds")
.elementType(SimpleQuestionnaireElement.ElementType.of("multiple_choice"))
.label(Map.of("en", "Source of funds"))
.isRequired(true)
.options(List.of(
SimpleQuestionnaireElement.Options.builder()
.value("employment")
.label(Map.of("en", "Employment"))
.build(),
SimpleQuestionnaireElement.Options.builder()
.value("business")
.label(Map.of("en", "Business"))
.build(),
SimpleQuestionnaireElement.Options.builder()
.value("investments")
.label(Map.of("en", "Investments"))
.build(),
SimpleQuestionnaireElement.Options.builder()
.value("other")
.label(Map.of("en", "Other"))
.build()))
.build()))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->questionnaires->create([
'title' => 'Customer Onboarding',
'description' => 'Additional information needed for verification',
'languages' => ['en'],
'default_language' => 'en',
'is_active' => true,
'form_elements' => [[
'id' => 'occupation',
'element_type' => 'short_text',
'label' => ['en' => 'What is your occupation?'],
'placeholder' => ['en' => 'Software engineer'],
'is_required' => true,
], [
'id' => 'source_of_funds',
'element_type' => 'multiple_choice',
'label' => ['en' => 'Source of funds'],
'is_required' => true,
'options' => [[
'value' => 'employment',
'label' => ['en' => 'Employment'],
], [
'value' => 'business',
'label' => ['en' => 'Business'],
], [
'value' => 'investments',
'label' => ['en' => 'Investments'],
], [
'value' => 'other',
'label' => ['en' => 'Other'],
]],
]],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.questionnaires.create(
title: "Customer Onboarding",
description: "Additional information needed for verification",
languages: ["en"],
default_language: "en",
is_active: true,
form_elements: [{
id: "occupation",
element_type: "short_text",
label: { en: "What is your occupation?" },
placeholder: { en: "Software engineer" },
is_required: true,
}, {
id: "source_of_funds",
element_type: "multiple_choice",
label: { en: "Source of funds" },
is_required: true,
options: [{
value: "employment",
label: { en: "Employment" },
}, {
value: "business",
label: { en: "Business" },
}, {
value: "investments",
label: { en: "Investments" },
}, {
value: "other",
label: { en: "Other" },
}],
}]
)
puts result.to_husing System;
using System.Collections.Generic;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Questionnaires.CreateAsync(new SimpleQuestionnaireRequest
{
Title = "Customer Onboarding",
Description = "Additional information needed for verification",
Languages = new string[] { "en" },
DefaultLanguage = "en",
IsActive = true,
FormElements = new SimpleQuestionnaireElement[]
{
new()
{
Id = "occupation",
ElementType = "short_text",
Label = new Dictionary<string, string> { ["en"] = "What is your occupation?" },
Placeholder = new Dictionary<string, string> { ["en"] = "Software engineer" },
IsRequired = true,
},
new()
{
Id = "source_of_funds",
ElementType = "multiple_choice",
Label = new Dictionary<string, string> { ["en"] = "Source of funds" },
IsRequired = true,
Options = new SimpleQuestionnaireElementOptions[]
{
new()
{
Value = "employment",
Label = new Dictionary<string, string> { ["en"] = "Employment" },
},
new()
{
Value = "business",
Label = new Dictionary<string, string> { ["en"] = "Business" },
},
new()
{
Value = "investments",
Label = new Dictionary<string, string> { ["en"] = "Investments" },
},
new()
{
Value = "other",
Label = new Dictionary<string, string> { ["en"] = "Other" },
},
},
},
},
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"questionnaire_id": "11111111-2222-3333-4444-555555555555",
"title": "Customer Onboarding",
"description": "Additional information needed for verification",
"languages": [
"en"
],
"default_language": "en",
"is_active": true,
"is_simple_questionnaire": true,
"graph": {
"start_node": "occupation",
"nodes": {
"occupation": {
"element_type": "SHORT_TEXT",
"is_required": true,
"title": {
"en": "What is your occupation?"
},
"next": "source_of_funds"
},
"source_of_funds": {
"element_type": "MULTIPLE_CHOICE",
"is_required": true,
"title": {
"en": "Source of funds"
},
"choices": [
{
"value": "employment",
"label": {
"en": "Employment"
}
},
{
"value": "business",
"label": {
"en": "Business"
}
}
],
"next": null
}
}
},
"sections": [],
"questionnaire_group_id": "11111111-2222-3333-4444-555555555555",
"version": 1,
"status": "published",
"published_at": "2026-04-23T10:00:00Z",
"is_editable": false
}form_elements array in the order users should answer the questions. Didit builds the internal questionnaire graph for you.
The API supports simple linear questionnaires only. Do not send graph, branches, next, or conditional rules.
Required fields
titleis the internal questionnaire name.languagesmust includeen.form_elementsmust contain at least one question.- Each form element needs an
element_typeand a translatedlabel.
description to a form element as its help text. It is accepted on every element type except separator, and it is returned as the item’s description in the questionnaire report.
Element types
Use lowercase values such asshort_text, multiple_choice, email, file_upload, or date_picker. Uppercase enum values such as SHORT_TEXT are also accepted.
For dropdown, single_choice, and multiple_choice, add options. If you omit an option value, Didit generates one from the label.
{
"title": "Customer Onboarding",
"languages": ["en"],
"default_language": "en",
"form_elements": [
{
"id": "occupation",
"element_type": "short_text",
"label": { "en": "What is your occupation?" },
"is_required": true
},
{
"id": "source_of_funds",
"element_type": "multiple_choice",
"label": { "en": "Source of funds" },
"is_required": true,
"options": [
{ "value": "employment", "label": { "en": "Employment" } },
{ "value": "business", "label": { "en": "Business" } },
{ "value": "investments", "label": { "en": "Investments" } }
]
}
]
}
Field validation
Add an optionalvalidation object to a short_text, long_text, or number element to enforce a format on the user’s answer. This is useful for identifiers with strict formats such as tax IDs, national IDs, or card numbers. Validation runs while the user fills the field (the user cannot proceed until it passes) and is re-enforced by the API on submission.
| Field | Applies to | Description |
|---|---|---|
pattern | short_text, long_text | Regular expression the value must fully match. Use the portable ECMA-262 subset; do not add ^/$ anchors (the whole value is matched). |
min_length | short_text, long_text | Minimum number of characters. |
max_length | short_text, long_text | Maximum number of characters. |
min | number | Minimum numeric value. |
max | number | Maximum numeric value. |
error_message | all of the above | Translated message shown when the value does not pass. Falls back to a generic message if omitted. |
{
"title": "Customer Onboarding",
"languages": ["en"],
"default_language": "en",
"form_elements": [
{
"id": "tax_id",
"element_type": "short_text",
"label": { "en": "Tax ID" },
"is_required": true,
"validation": {
"pattern": "[A-Z]{2}[0-9]{9}",
"min_length": 11,
"max_length": 11,
"error_message": { "en": "Enter a valid Tax ID (2 letters followed by 9 digits)." }
}
}
]
}
questionnaire_id. Store it, because you will use it as questionnaire_uuid when you add the questionnaire to a workflow.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.
Headers
Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.
1 - 255Body
Create a simple linear questionnaire. The API converts form_elements into the internal questionnaire graph.
Response
Questionnaire created. The response includes the questionnaire_id — store it to reference this questionnaire from workflows or future update/delete calls.
Full questionnaire detail returned from GET, POST (create) and PATCH (update) endpoints.