curl -X POST 'https://verification.didit.me/v3/bank/links/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"mode": "connect",
"access": "ongoing",
"country": "ESP",
"segment": "business",
"data": [
"accounts",
"balances",
"transactions"
],
"history_from": "2026-01-01",
"consent_days": 180,
"ownership": {
"compare": "none"
},
"end_user": {
"reference": "client-7731",
"email": "ana@example.com"
},
"redirect_url": "https://app.example.com/bank/return",
"allowed_origins": [
"https://app.example.com"
],
"language": "es",
"vendor_data": "client-7731"
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.bank.create_link(
mode="connect",
access="ongoing",
country="ESP",
segment="business",
data=["accounts", "balances", "transactions"],
history_from="2026-01-01",
consent_days=180,
ownership={
"compare": "none",
},
end_user={
"reference": "client-7731",
"email": "ana@example.com",
},
redirect_url="https://app.example.com/bank/return",
allowed_origins=["https://app.example.com"],
language="es",
vendor_data="client-7731",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.bank.createLink({
mode: "connect",
access: "ongoing",
country: "ESP",
segment: "business",
data: ["accounts", "balances", "transactions"],
history_from: "2026-01-01",
consent_days: 180,
ownership: {
compare: "none",
},
end_user: {
reference: "client-7731",
email: "ana@example.com",
},
redirect_url: "https://app.example.com/bank/return",
allowed_origins: ["https://app.example.com"],
language: "es",
vendor_data: "client-7731",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Bank.CreateLink(ctx, didit.BankCreateLinkParams{
Body: didit.BankLinkCreateRequest{
Mode: didit.Some(didit.BankLinkCreateRequestMode("connect")),
Access: didit.Some(didit.BankLinkCreateRequestAccess("ongoing")),
Country: didit.String("ESP"),
Segment: didit.Some(didit.BankLinkCreateRequestSegment("business")),
Data: didit.Some([]didit.BankLinkCreateRequestData{"accounts", "balances", "transactions"}),
HistoryFrom: didit.String("2026-01-01"),
ConsentDays: didit.Int(180),
Ownership: didit.Some(didit.BankLinkOwnershipRequest{
Compare: didit.Some(didit.BankLinkOwnershipRequestCompare("none")),
}),
EndUser: didit.Some(didit.BankLinkEndUser{
Reference: didit.String("client-7731"),
Email: didit.String("ana@example.com"),
}),
RedirectURL: didit.String("https://app.example.com/bank/return"),
AllowedOrigins: didit.Some([]string{"https://app.example.com"}),
Language: didit.String("es"),
VendorData: didit.String("client-7731"),
},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.time.LocalDate;
import java.util.List;
import me.didit.Didit;
import me.didit.types.BankLinkCreateRequest;
import me.didit.types.BankLinkEndUser;
import me.didit.types.BankLinkOwnershipRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.bank().createLink(BankLinkCreateRequest.builder()
.mode(BankLinkCreateRequest.Mode.of("connect"))
.access(BankLinkCreateRequest.Access.of("ongoing"))
.country("ESP")
.segment(BankLinkCreateRequest.Segment.of("business"))
.data(List.of(BankLinkCreateRequest.Data.of("accounts"), BankLinkCreateRequest.Data.of("balances"), BankLinkCreateRequest.Data.of("transactions")))
.historyFrom(LocalDate.parse("2026-01-01"))
.consentDays(180L)
.ownership(BankLinkOwnershipRequest.builder()
.compare(BankLinkOwnershipRequest.Compare.of("none"))
.build())
.endUser(BankLinkEndUser.builder()
.reference("client-7731")
.email("ana@example.com")
.build())
.redirectUrl("https://app.example.com/bank/return")
.allowedOrigins(List.of("https://app.example.com"))
.language("es")
.vendorData("client-7731")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->bank->createLink([
'mode' => 'connect',
'access' => 'ongoing',
'country' => 'ESP',
'segment' => 'business',
'data' => ['accounts', 'balances', 'transactions'],
'history_from' => '2026-01-01',
'consent_days' => 180,
'ownership' => [
'compare' => 'none',
],
'end_user' => [
'reference' => 'client-7731',
'email' => 'ana@example.com',
],
'redirect_url' => 'https://app.example.com/bank/return',
'allowed_origins' => ['https://app.example.com'],
'language' => 'es',
'vendor_data' => 'client-7731',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.bank.create_link(
mode: "connect",
access: "ongoing",
country: "ESP",
segment: "business",
data: ["accounts", "balances", "transactions"],
history_from: "2026-01-01",
consent_days: 180,
ownership: {
compare: "none",
},
end_user: {
reference: "client-7731",
email: "ana@example.com",
},
redirect_url: "https://app.example.com/bank/return",
allowed_origins: ["https://app.example.com"],
language: "es",
vendor_data: "client-7731"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Bank.CreateLinkAsync(new BankLinkCreateRequest
{
Mode = new BankLinkCreateRequestMode("connect"),
Access = new BankLinkCreateRequestAccess("ongoing"),
Country = "ESP",
Segment = new BankLinkCreateRequestSegment("business"),
Data = new BankLinkCreateRequestData[] { "accounts", "balances", "transactions" },
HistoryFrom = "2026-01-01",
ConsentDays = 180,
Ownership = new BankLinkOwnershipRequest
{
Compare = new BankLinkOwnershipRequestCompare("none"),
},
EndUser = new BankLinkEndUser
{
Reference = "client-7731",
Email = "ana@example.com",
},
RedirectUrl = "https://app.example.com/bank/return",
AllowedOrigins = new string[] { "https://app.example.com" },
Language = "es",
VendorData = "client-7731",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"id": "0b9c4f1e-6a2d-4e8b-9f31-7c5d2e1a8b40",
"mode": "connect",
"access": "ongoing",
"status": "created",
"url": "https://verify.didit.me/bank/link/example-link-token",
"client_token": "example-client-token",
"expires_at": "2026-11-21T13:00:00Z",
"connection_id": null,
"check_id": null,
"reused": false,
"error": null,
"quote": {
"id": "7a3e9c52-1d84-4b06-8f2a-c5e0b9d17a43",
"lines": [
{
"meter": "bank_data_connection_month",
"unit": "connection_month",
"price_usd": "0.9000"
}
],
"fallback_lines": null,
"total_usd": "0.9000",
"valid_until": "2026-11-21T13:00:00Z",
"scopes": [
"accounts",
"balances",
"transactions"
]
},
"vendor_data": "client-7731"
}Create a Bank Link API: Connect or Renew a Bank
Didit’s Create a Bank Link endpoint starts one run of Bank Link on your server and returns the hosted url where the person connects a bank.
curl -X POST 'https://verification.didit.me/v3/bank/links/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"mode": "connect",
"access": "ongoing",
"country": "ESP",
"segment": "business",
"data": [
"accounts",
"balances",
"transactions"
],
"history_from": "2026-01-01",
"consent_days": 180,
"ownership": {
"compare": "none"
},
"end_user": {
"reference": "client-7731",
"email": "ana@example.com"
},
"redirect_url": "https://app.example.com/bank/return",
"allowed_origins": [
"https://app.example.com"
],
"language": "es",
"vendor_data": "client-7731"
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.bank.create_link(
mode="connect",
access="ongoing",
country="ESP",
segment="business",
data=["accounts", "balances", "transactions"],
history_from="2026-01-01",
consent_days=180,
ownership={
"compare": "none",
},
end_user={
"reference": "client-7731",
"email": "ana@example.com",
},
redirect_url="https://app.example.com/bank/return",
allowed_origins=["https://app.example.com"],
language="es",
vendor_data="client-7731",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.bank.createLink({
mode: "connect",
access: "ongoing",
country: "ESP",
segment: "business",
data: ["accounts", "balances", "transactions"],
history_from: "2026-01-01",
consent_days: 180,
ownership: {
compare: "none",
},
end_user: {
reference: "client-7731",
email: "ana@example.com",
},
redirect_url: "https://app.example.com/bank/return",
allowed_origins: ["https://app.example.com"],
language: "es",
vendor_data: "client-7731",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Bank.CreateLink(ctx, didit.BankCreateLinkParams{
Body: didit.BankLinkCreateRequest{
Mode: didit.Some(didit.BankLinkCreateRequestMode("connect")),
Access: didit.Some(didit.BankLinkCreateRequestAccess("ongoing")),
Country: didit.String("ESP"),
Segment: didit.Some(didit.BankLinkCreateRequestSegment("business")),
Data: didit.Some([]didit.BankLinkCreateRequestData{"accounts", "balances", "transactions"}),
HistoryFrom: didit.String("2026-01-01"),
ConsentDays: didit.Int(180),
Ownership: didit.Some(didit.BankLinkOwnershipRequest{
Compare: didit.Some(didit.BankLinkOwnershipRequestCompare("none")),
}),
EndUser: didit.Some(didit.BankLinkEndUser{
Reference: didit.String("client-7731"),
Email: didit.String("ana@example.com"),
}),
RedirectURL: didit.String("https://app.example.com/bank/return"),
AllowedOrigins: didit.Some([]string{"https://app.example.com"}),
Language: didit.String("es"),
VendorData: didit.String("client-7731"),
},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.time.LocalDate;
import java.util.List;
import me.didit.Didit;
import me.didit.types.BankLinkCreateRequest;
import me.didit.types.BankLinkEndUser;
import me.didit.types.BankLinkOwnershipRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.bank().createLink(BankLinkCreateRequest.builder()
.mode(BankLinkCreateRequest.Mode.of("connect"))
.access(BankLinkCreateRequest.Access.of("ongoing"))
.country("ESP")
.segment(BankLinkCreateRequest.Segment.of("business"))
.data(List.of(BankLinkCreateRequest.Data.of("accounts"), BankLinkCreateRequest.Data.of("balances"), BankLinkCreateRequest.Data.of("transactions")))
.historyFrom(LocalDate.parse("2026-01-01"))
.consentDays(180L)
.ownership(BankLinkOwnershipRequest.builder()
.compare(BankLinkOwnershipRequest.Compare.of("none"))
.build())
.endUser(BankLinkEndUser.builder()
.reference("client-7731")
.email("ana@example.com")
.build())
.redirectUrl("https://app.example.com/bank/return")
.allowedOrigins(List.of("https://app.example.com"))
.language("es")
.vendorData("client-7731")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->bank->createLink([
'mode' => 'connect',
'access' => 'ongoing',
'country' => 'ESP',
'segment' => 'business',
'data' => ['accounts', 'balances', 'transactions'],
'history_from' => '2026-01-01',
'consent_days' => 180,
'ownership' => [
'compare' => 'none',
],
'end_user' => [
'reference' => 'client-7731',
'email' => 'ana@example.com',
],
'redirect_url' => 'https://app.example.com/bank/return',
'allowed_origins' => ['https://app.example.com'],
'language' => 'es',
'vendor_data' => 'client-7731',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.bank.create_link(
mode: "connect",
access: "ongoing",
country: "ESP",
segment: "business",
data: ["accounts", "balances", "transactions"],
history_from: "2026-01-01",
consent_days: 180,
ownership: {
compare: "none",
},
end_user: {
reference: "client-7731",
email: "ana@example.com",
},
redirect_url: "https://app.example.com/bank/return",
allowed_origins: ["https://app.example.com"],
language: "es",
vendor_data: "client-7731"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Bank.CreateLinkAsync(new BankLinkCreateRequest
{
Mode = new BankLinkCreateRequestMode("connect"),
Access = new BankLinkCreateRequestAccess("ongoing"),
Country = "ESP",
Segment = new BankLinkCreateRequestSegment("business"),
Data = new BankLinkCreateRequestData[] { "accounts", "balances", "transactions" },
HistoryFrom = "2026-01-01",
ConsentDays = 180,
Ownership = new BankLinkOwnershipRequest
{
Compare = new BankLinkOwnershipRequestCompare("none"),
},
EndUser = new BankLinkEndUser
{
Reference = "client-7731",
Email = "ana@example.com",
},
RedirectUrl = "https://app.example.com/bank/return",
AllowedOrigins = new string[] { "https://app.example.com" },
Language = "es",
VendorData = "client-7731",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"id": "0b9c4f1e-6a2d-4e8b-9f31-7c5d2e1a8b40",
"mode": "connect",
"access": "ongoing",
"status": "created",
"url": "https://verify.didit.me/bank/link/example-link-token",
"client_token": "example-client-token",
"expires_at": "2026-11-21T13:00:00Z",
"connection_id": null,
"check_id": null,
"reused": false,
"error": null,
"quote": {
"id": "7a3e9c52-1d84-4b06-8f2a-c5e0b9d17a43",
"lines": [
{
"meter": "bank_data_connection_month",
"unit": "connection_month",
"price_usd": "0.9000"
}
],
"fallback_lines": null,
"total_usd": "0.9000",
"valid_until": "2026-11-21T13:00:00Z",
"scopes": [
"accounts",
"balances",
"transactions"
]
},
"vendor_data": "client-7731"
}url.
Every field has a default, so the smallest request is {} plus what you want.
Keep the returned id with your user and confirm the outcome yourself with Get a bank link or the bank.link.completed webhook.
See the quickstart and Bank Link.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 Bank Link. The smallest request is {} plus what you want: every field has a default.
one_time (default) reads the data once. ongoing keeps access open until the consent ends or someone stops it. With institution_id set, a bank that cannot keep access open answers 400 ongoing_access_not_available before any screen. Without it, the bank picker lists only banks that can.
one_time, ongoing Ongoing only. How many days to ask the bank to keep access open, 1 or more. Default: the longest the bank allows. The connection reports the date the bank actually granted in consent.expires_at. With access: one_time it answers 400 invalid_request with field: consent_days.
1 <= x <= 32767Where the browser goes at the end, with link_id, status and a signed state (for display only: the webhook and get_link are authoritative). In a sandbox application a plain http address of localhost, 127.0.0.1 or [::1] (any port and path, no credentials, no fragment) needs no registration. Any other address answers 400 redirect_url_not_registered: registering other addresses is not available yet. Without a redirect_url the person finishes on Didit's own result page.
2048With ongoing, lets the person continue with a one-time read at a bank that cannot keep access open, after confirming the reduced access on its own screen. The quote shows what that costs. Only with access: ongoing: with one-time access it answers 400 invalid_request with field: allow_one_time_fallback.
Response
The link was created.
One run of Bank Link for one person: connect a bank, or renew a connection. Confirm a link yourself with get_link: never trust an id sent by the browser.