from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.preview_resubmission(
"11111111-2222-3333-4444-555555555555",
nodes_to_resubmit=[{
"node_id": "feature_poa_1",
"feature": "POA",
}],
email_language="en",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.previewResubmission("11111111-2222-3333-4444-555555555555", {
nodes_to_resubmit: [{
node_id: "feature_poa_1",
feature: "POA",
}],
email_language: "en",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.PreviewResubmission(ctx, "11111111-2222-3333-4444-555555555555", didit.SessionsPreviewResubmissionParams{
NodesToResubmit: didit.Some([]didit.SessionsPreviewResubmissionParamsNodesToResubmit{{
NodeID: "feature_poa_1",
Feature: "POA",
}}),
EmailLanguage: didit.String("en"),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import me.didit.Didit;
import me.didit.types.SessionsPreviewResubmissionParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().previewResubmission("11111111-2222-3333-4444-555555555555", SessionsPreviewResubmissionParams.builder()
.nodesToResubmit(List.of(SessionsPreviewResubmissionParams.NodesToResubmit.builder()
.nodeId("feature_poa_1")
.feature(SessionsPreviewResubmissionParams.NodesToResubmit.Feature.of("POA"))
.build()))
.emailLanguage("en")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->previewResubmission('11111111-2222-3333-4444-555555555555', [
'nodes_to_resubmit' => [[
'node_id' => 'feature_poa_1',
'feature' => 'POA',
]],
'email_language' => 'en',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.preview_resubmission(
"11111111-2222-3333-4444-555555555555",
nodes_to_resubmit: [{
node_id: "feature_poa_1",
feature: "POA",
}],
email_language: "en"
)
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.PreviewResubmissionAsync("11111111-2222-3333-4444-555555555555", new SessionsPreviewResubmissionParams
{
NodesToResubmit = new SessionsPreviewResubmissionParamsNodesToResubmit[]
{
new()
{
NodeId = "feature_poa_1",
Feature = "POA",
},
},
EmailLanguage = "en",
});
Console.WriteLine(JsonSerializer.Serialize(result));curl --request POST \
--url https://verification.didit.me/v3/session/{sessionId}/resubmission-preview/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"nodes_to_resubmit": [
{
"node_id": "feature_poa_1",
"feature": "POA"
}
],
"email_language": "en"
}
'{
"recipient": "person@example.com",
"recipient_source": "email_verification",
"sender": "Example App <no-reply@mail.example.com>",
"sender_name": "Example App",
"sender_email": "no-reply@mail.example.com",
"sender_kind": "customer",
"subject": "Action Required: Complete your verification in Example App",
"html": "<!DOCTYPE html><html><body>...</body></html>",
"language": "en",
"will_be_sent": true,
"not_sent_reason": null,
"nodes_to_resubmit": [
{
"node_id": "feature_poa_1",
"feature": "PROOF_OF_ADDRESS"
}
],
"requires_user_action": true,
"preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
}Preview Resubmission Email
Review the recipient, sender, localized message and verification link before requesting resubmission.
from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.preview_resubmission(
"11111111-2222-3333-4444-555555555555",
nodes_to_resubmit=[{
"node_id": "feature_poa_1",
"feature": "POA",
}],
email_language="en",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.previewResubmission("11111111-2222-3333-4444-555555555555", {
nodes_to_resubmit: [{
node_id: "feature_poa_1",
feature: "POA",
}],
email_language: "en",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.PreviewResubmission(ctx, "11111111-2222-3333-4444-555555555555", didit.SessionsPreviewResubmissionParams{
NodesToResubmit: didit.Some([]didit.SessionsPreviewResubmissionParamsNodesToResubmit{{
NodeID: "feature_poa_1",
Feature: "POA",
}}),
EmailLanguage: didit.String("en"),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import me.didit.Didit;
import me.didit.types.SessionsPreviewResubmissionParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().previewResubmission("11111111-2222-3333-4444-555555555555", SessionsPreviewResubmissionParams.builder()
.nodesToResubmit(List.of(SessionsPreviewResubmissionParams.NodesToResubmit.builder()
.nodeId("feature_poa_1")
.feature(SessionsPreviewResubmissionParams.NodesToResubmit.Feature.of("POA"))
.build()))
.emailLanguage("en")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->previewResubmission('11111111-2222-3333-4444-555555555555', [
'nodes_to_resubmit' => [[
'node_id' => 'feature_poa_1',
'feature' => 'POA',
]],
'email_language' => 'en',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.preview_resubmission(
"11111111-2222-3333-4444-555555555555",
nodes_to_resubmit: [{
node_id: "feature_poa_1",
feature: "POA",
}],
email_language: "en"
)
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.PreviewResubmissionAsync("11111111-2222-3333-4444-555555555555", new SessionsPreviewResubmissionParams
{
NodesToResubmit = new SessionsPreviewResubmissionParamsNodesToResubmit[]
{
new()
{
NodeId = "feature_poa_1",
Feature = "POA",
},
},
EmailLanguage = "en",
});
Console.WriteLine(JsonSerializer.Serialize(result));curl --request POST \
--url https://verification.didit.me/v3/session/{sessionId}/resubmission-preview/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"nodes_to_resubmit": [
{
"node_id": "feature_poa_1",
"feature": "POA"
}
],
"email_language": "en"
}
'{
"recipient": "person@example.com",
"recipient_source": "email_verification",
"sender": "Example App <no-reply@mail.example.com>",
"sender_name": "Example App",
"sender_email": "no-reply@mail.example.com",
"sender_kind": "customer",
"subject": "Action Required: Complete your verification in Example App",
"html": "<!DOCTYPE html><html><body>...</body></html>",
"language": "en",
"will_be_sent": true,
"not_sent_reason": null,
"nodes_to_resubmit": [
{
"node_id": "feature_poa_1",
"feature": "PROOF_OF_ADDRESS"
}
],
"requires_user_action": true,
"preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
}preview_token as email_preview_token.
The receipt expires after 15 minutes.
A changed or expired receipt returns 409 before the session is changed or an email is sent.
Generate a fresh preview after a conflict.
Existing API integrations may omit the receipt; the console supplies it when confirming a preview.
The sender and branding follow your existing white-label configuration.
Message content comes from the translated verification template; arbitrary subjects, message bodies and action URLs are not accepted as template inputs.
Who receives the email
email_address is optional.
Without it, the email goes to the person’s own address: the one they verified in an email verification step of the flow, else the one given in contact_details when the session was created.
An address you pass in email_address wins.
recipient_source tells you which address applies:
recipient_source | Where recipient comes from |
|---|---|
email_verification | The address the person verified in the flow |
contact_details | The address given in contact_details when the session was created |
request | The email_address you passed |
"" (empty) | No address is known: recipient and preview_token are empty and no email can be sent |
Whether the email goes out
will_be_sent is true when confirming the resubmission with send_email: true sends the email.
When it is false, not_sent_reason says why:
not_sent_reason | What it means |
|---|---|
no_user_action | Every selected step runs without the person (for example AML or Database Validation), so the resubmission finishes on its own and no email goes out. requires_user_action is false too. |
no_recipient | No address is known for the person and you passed none. |
sandbox | The session is a sandbox session and the recipient has not opted into sandbox email delivery, so the email is only simulated. See email opt-in. |
Confirm the resubmission
Call Update Session Status with these fields:| Update Session Status field | Value |
|---|---|
new_status | Resubmitted |
nodes_to_resubmit | The same selection you previewed (leave it out if you left it out here) |
send_email | true |
email_address | recipient from the preview |
email_language | The same email_language you sent to the preview |
email_preview_token | preview_token from the preview |
language is the language the email is written in: English when the one you asked for is not offered.
Repeated backend-only resubmissions
When every step to resubmit runs without the person (AML, Database Validation or IP Analysis), a session can be resubmitted for them only once every 30 seconds. Within that window the preview returns429, as Update Session Status would, with the wait in the Retry-After header.
Related
- Update Session Status: confirm the resubmission.
- Preview Decision Email: preview the Approved or Declined email instead.
- White label: the sender and branding the email uses.
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 - 255Path Parameters
Body
Response
Preview only. The session is unchanged and no email is sent.
Where recipient comes from. request: the email_address you passed. email_verification: the address the person verified in an email verification step of the flow. contact_details: the address given in contact_details when the session was created. An empty string when there is no address.
email_verification, contact_details, request, "email_verification"
Why confirming would send no email, or null when it will be sent. no_user_action: every selected step runs without the person, so the resubmission finishes on its own and no email goes out. no_recipient: no address is known for the person and you passed none. sandbox: a sandbox session whose recipient has not opted into sandbox email delivery, so the send is only simulated.
no_user_action, no_recipient, sandbox, null null
Signed receipt for this exact email, valid for 15 minutes. Pass it as email_preview_token to Update Session Status. An empty string when there is no recipient.
"eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"