curl --request POST \
--url https://api.sandbox.lead.bank/v0/entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "individual",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
'import requests
url = "https://api.sandbox.lead.bank/v0/entities"
payload = {
"type": "individual",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": { "other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
] },
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'individual',
individual_details: {
first_name: '<string>',
last_name: '<string>',
identification_details: {
type: 'us_entity',
identification_documents: [
{
identification_number: '<string>',
issuing_country: '<string>',
client_document_id: '<string>',
description: '<string>',
expiration_date: '2023-12-25',
issuing_state: '<string>'
}
]
},
preferred_first_name: '<string>',
middle_name: '<string>',
date_of_birth: '2002-02-15',
occupation: '<string>',
contact_methods: [{type: 'email', email: 'abc@gmail.com'}],
address_details: {
other_addresses: [
{
line_1: '123 Main St.',
city: 'Denver',
country: 'US',
line_2: 'Apt 25',
postal_code: 80014,
state: 'CO'
}
]
},
additional_documents: [{client_document_id: '<string>', description: '<string>'}]
},
client_customer_id: '<string>',
intended_roles: 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
credit_details: [{credit_pulled_at: '2023-11-07T05:31:56Z', credit_score: '<string>'}],
metadata: {}
})
};
fetch('https://api.sandbox.lead.bank/v0/entities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v0/entities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'individual',
'individual_details' => [
'first_name' => '<string>',
'last_name' => '<string>',
'identification_details' => [
'type' => 'us_entity',
'identification_documents' => [
[
'identification_number' => '<string>',
'issuing_country' => '<string>',
'client_document_id' => '<string>',
'description' => '<string>',
'expiration_date' => '2023-12-25',
'issuing_state' => '<string>'
]
]
],
'preferred_first_name' => '<string>',
'middle_name' => '<string>',
'date_of_birth' => '2002-02-15',
'occupation' => '<string>',
'contact_methods' => [
[
'type' => 'email',
'email' => 'abc@gmail.com'
]
],
'address_details' => [
'other_addresses' => [
[
'line_1' => '123 Main St.',
'city' => 'Denver',
'country' => 'US',
'line_2' => 'Apt 25',
'postal_code' => 80014,
'state' => 'CO'
]
]
],
'additional_documents' => [
[
'client_document_id' => '<string>',
'description' => '<string>'
]
]
],
'client_customer_id' => '<string>',
'intended_roles' => 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
'credit_details' => [
[
'credit_pulled_at' => '2023-11-07T05:31:56Z',
'credit_score' => '<string>'
]
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v0/entities"
payload := strings.NewReader("{\n \"type\": \"individual\",\n \"individual_details\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"preferred_first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"<string>\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"client_customer_id\": \"<string>\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.lead.bank/v0/entities")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"individual\",\n \"individual_details\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"preferred_first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"<string>\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"client_customer_id\": \"<string>\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"individual\",\n \"individual_details\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"preferred_first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"<string>\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"client_customer_id\": \"<string>\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "individual",
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"tax_identification": {
"value": "<string>"
},
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"mailing_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"rfi_details": {
"requested_at": "2023-11-07T05:31:56Z"
},
"ofac_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"kyc_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"role_details": [
{
"status": "active",
"criteria_details": [
{
"failed_checks": [
"<string>"
],
"entity_id": "<string>"
}
]
}
],
"metadata": {}
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Create an Entity
Create an Individual, Sole Prop or Business Entity.
curl --request POST \
--url https://api.sandbox.lead.bank/v0/entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "individual",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
'import requests
url = "https://api.sandbox.lead.bank/v0/entities"
payload = {
"type": "individual",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": { "other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
] },
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'individual',
individual_details: {
first_name: '<string>',
last_name: '<string>',
identification_details: {
type: 'us_entity',
identification_documents: [
{
identification_number: '<string>',
issuing_country: '<string>',
client_document_id: '<string>',
description: '<string>',
expiration_date: '2023-12-25',
issuing_state: '<string>'
}
]
},
preferred_first_name: '<string>',
middle_name: '<string>',
date_of_birth: '2002-02-15',
occupation: '<string>',
contact_methods: [{type: 'email', email: 'abc@gmail.com'}],
address_details: {
other_addresses: [
{
line_1: '123 Main St.',
city: 'Denver',
country: 'US',
line_2: 'Apt 25',
postal_code: 80014,
state: 'CO'
}
]
},
additional_documents: [{client_document_id: '<string>', description: '<string>'}]
},
client_customer_id: '<string>',
intended_roles: 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
credit_details: [{credit_pulled_at: '2023-11-07T05:31:56Z', credit_score: '<string>'}],
metadata: {}
})
};
fetch('https://api.sandbox.lead.bank/v0/entities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v0/entities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'individual',
'individual_details' => [
'first_name' => '<string>',
'last_name' => '<string>',
'identification_details' => [
'type' => 'us_entity',
'identification_documents' => [
[
'identification_number' => '<string>',
'issuing_country' => '<string>',
'client_document_id' => '<string>',
'description' => '<string>',
'expiration_date' => '2023-12-25',
'issuing_state' => '<string>'
]
]
],
'preferred_first_name' => '<string>',
'middle_name' => '<string>',
'date_of_birth' => '2002-02-15',
'occupation' => '<string>',
'contact_methods' => [
[
'type' => 'email',
'email' => 'abc@gmail.com'
]
],
'address_details' => [
'other_addresses' => [
[
'line_1' => '123 Main St.',
'city' => 'Denver',
'country' => 'US',
'line_2' => 'Apt 25',
'postal_code' => 80014,
'state' => 'CO'
]
]
],
'additional_documents' => [
[
'client_document_id' => '<string>',
'description' => '<string>'
]
]
],
'client_customer_id' => '<string>',
'intended_roles' => 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
'credit_details' => [
[
'credit_pulled_at' => '2023-11-07T05:31:56Z',
'credit_score' => '<string>'
]
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v0/entities"
payload := strings.NewReader("{\n \"type\": \"individual\",\n \"individual_details\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"preferred_first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"<string>\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"client_customer_id\": \"<string>\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.lead.bank/v0/entities")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"individual\",\n \"individual_details\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"preferred_first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"<string>\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"client_customer_id\": \"<string>\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"individual\",\n \"individual_details\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"preferred_first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"<string>\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"client_customer_id\": \"<string>\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "individual",
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"tax_identification": {
"value": "<string>"
},
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"mailing_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"rfi_details": {
"requested_at": "2023-11-07T05:31:56Z"
},
"ofac_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"kyc_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"role_details": [
{
"status": "active",
"criteria_details": [
{
"failed_checks": [
"<string>"
],
"entity_id": "<string>"
}
]
}
],
"metadata": {}
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
255Body
- Individual
- Business
- Sole Prop
Type of entity = individual.
^individual$Details for the individual entity
Show child attributes
Show child attributes
Client customer ID for the entity object. Limit of 64 characters.
64The entity's intended role. Lead highly recommends using this field to confirm data requirements for different roles to minimize errors later. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. Lead currently supports:
authorized_user: Individual entity with restricted access to the account, without legal responsibility. Only applies to individual entity.authorized_signer: Individual entity allowed to sign on behalf of the account holder, without legal responsibility. Only applies to individual entity.account_holder: Entity with full control and legal responsibility for the account. Applies to all entity types.
authorized_user, authorized_signer, account_holder "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided"
The entity's risk score, mapped to Lead by the client. Client should have provided risk score mapping to Lead.
low, medium, high Show child attributes
Show child attributes
Details on OFAC on the entity.
Show child attributes
Show child attributes
Details on KYC on the entity.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
Response
Entity object created.
- Individual
- Business
- Sole Prop
Unique ID for the Entity object.
Timestamp at which the entity object is created.
Timestamp at which the entity object was last updated.
Type of entity = individual.
^individual$Client customer ID for the entity object. Limit of 64 characters.
64The entity's intended role. Lead highly recommends using this field to confirm data requirements for different roles to minimize errors later. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. Lead currently supports:
authorized_user: Individual entity with restricted access to the account, without legal responsibility. Only applies to individual entity.authorized_signer: Individual entity allowed to sign on behalf of the account holder, without legal responsibility. Only applies to individual entity.account_holder: Entity with full control and legal responsibility for the account. Applies to all entity types.
authorized_user, authorized_signer, account_holder "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided"
The entity's risk score, mapped to Lead by the client. Client should have provided risk score mapping to Lead.
low, medium, high Details for the individual entity
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Details on OFAC on the entity.
Show child attributes
Show child attributes
Details on KYC on the entity.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
Was this page helpful?

