Create new session
curl --request POST \
--url https://api.beltic.com/v1/identity/sessions \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"data": {
"attributes": {
"account_id": "12345",
"creator_id": "12345",
"creator_type": "user"
}
},
"meta": {
"auto_create_account_external_id": "12345"
}
}
'import requests
url = "https://api.beltic.com/v1/identity/sessions"
payload = {
"data": { "attributes": {
"account_id": "12345",
"creator_id": "12345",
"creator_type": "user"
} },
"meta": { "auto_create_account_external_id": "12345" }
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {attributes: {account_id: '12345', creator_id: '12345', creator_type: 'user'}},
meta: {auto_create_account_external_id: '12345'}
})
};
fetch('https://api.beltic.com/v1/identity/sessions', 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.beltic.com/v1/identity/sessions",
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([
'data' => [
'attributes' => [
'account_id' => '12345',
'creator_id' => '12345',
'creator_type' => 'user'
]
],
'meta' => [
'auto_create_account_external_id' => '12345'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-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.beltic.com/v1/identity/sessions"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"account_id\": \"12345\",\n \"creator_id\": \"12345\",\n \"creator_type\": \"user\"\n }\n },\n \"meta\": {\n \"auto_create_account_external_id\": \"12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.beltic.com/v1/identity/sessions")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"attributes\": {\n \"account_id\": \"12345\",\n \"creator_id\": \"12345\",\n \"creator_type\": \"user\"\n }\n },\n \"meta\": {\n \"auto_create_account_external_id\": \"12345\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beltic.com/v1/identity/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"account_id\": \"12345\",\n \"creator_id\": \"12345\",\n \"creator_type\": \"user\"\n }\n },\n \"meta\": {\n \"auto_create_account_external_id\": \"12345\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "session",
"attributes": {
"creator_id": "<string>",
"person": {
"name": {
"first": "<string>",
"middle": "<string>",
"last": "<string>"
},
"birth_date": "<string>"
},
"business": {
"legal_name": "<string>",
"registration_date": "<string>",
"shareholders": [
{
"name": "<string>",
"shareholder_type": "<string>",
"date_of_birth": "<string>",
"id_type": "<string>",
"id_number": "<string>",
"number_of_share": "<string>",
"percentage_of_share": 123
}
]
},
"identity_numbers": {
"number": "<string>",
"issuing_country_code": "<string>",
"class": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"phone": "<string>"
},
"address": {
"line1": "<string>",
"line2": "<string>",
"sublocality": "<string>",
"locality": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"behavior_analysis": {
"completion_time_seconds": 123,
"autofill_cancels": 123,
"autofill_starts": 123,
"bot_score": 123,
"shortcut_copies": 123,
"shortcut_pastes": 123,
"distraction_events": 123,
"devtools_open": true,
"debugger_attached": true,
"request_spoof_attempts": 123,
"user_agent_spoof_attempts": 123,
"hesitation_baseline": 123,
"hesitation_count": 123,
"hesitation_percentage": 123,
"hesitation_time": 123
},
"created_at": "<string>",
"updated_at": "<string>",
"started_at": "<string>",
"expires_at": "<string>",
"completed_at": "<string>",
"failed_at": "<string>",
"marked_for_review_at": "<string>",
"decisioned_at": "<string>",
"expired_at": "<string>",
"redacted_at": "<string>"
},
"relationships": {
"account": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"business": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"documents": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
},
"session_devices": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
},
"verifications": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
}
}
},
"meta": {},
"links": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}Identity API — Sessions (Legacy)
Create Session
Create a new session with the provided attributes
POST
/
v1
/
identity
/
sessions
Create new session
curl --request POST \
--url https://api.beltic.com/v1/identity/sessions \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"data": {
"attributes": {
"account_id": "12345",
"creator_id": "12345",
"creator_type": "user"
}
},
"meta": {
"auto_create_account_external_id": "12345"
}
}
'import requests
url = "https://api.beltic.com/v1/identity/sessions"
payload = {
"data": { "attributes": {
"account_id": "12345",
"creator_id": "12345",
"creator_type": "user"
} },
"meta": { "auto_create_account_external_id": "12345" }
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {attributes: {account_id: '12345', creator_id: '12345', creator_type: 'user'}},
meta: {auto_create_account_external_id: '12345'}
})
};
fetch('https://api.beltic.com/v1/identity/sessions', 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.beltic.com/v1/identity/sessions",
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([
'data' => [
'attributes' => [
'account_id' => '12345',
'creator_id' => '12345',
'creator_type' => 'user'
]
],
'meta' => [
'auto_create_account_external_id' => '12345'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-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.beltic.com/v1/identity/sessions"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"account_id\": \"12345\",\n \"creator_id\": \"12345\",\n \"creator_type\": \"user\"\n }\n },\n \"meta\": {\n \"auto_create_account_external_id\": \"12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.beltic.com/v1/identity/sessions")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"attributes\": {\n \"account_id\": \"12345\",\n \"creator_id\": \"12345\",\n \"creator_type\": \"user\"\n }\n },\n \"meta\": {\n \"auto_create_account_external_id\": \"12345\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beltic.com/v1/identity/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"account_id\": \"12345\",\n \"creator_id\": \"12345\",\n \"creator_type\": \"user\"\n }\n },\n \"meta\": {\n \"auto_create_account_external_id\": \"12345\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "session",
"attributes": {
"creator_id": "<string>",
"person": {
"name": {
"first": "<string>",
"middle": "<string>",
"last": "<string>"
},
"birth_date": "<string>"
},
"business": {
"legal_name": "<string>",
"registration_date": "<string>",
"shareholders": [
{
"name": "<string>",
"shareholder_type": "<string>",
"date_of_birth": "<string>",
"id_type": "<string>",
"id_number": "<string>",
"number_of_share": "<string>",
"percentage_of_share": 123
}
]
},
"identity_numbers": {
"number": "<string>",
"issuing_country_code": "<string>",
"class": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"phone": "<string>"
},
"address": {
"line1": "<string>",
"line2": "<string>",
"sublocality": "<string>",
"locality": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"behavior_analysis": {
"completion_time_seconds": 123,
"autofill_cancels": 123,
"autofill_starts": 123,
"bot_score": 123,
"shortcut_copies": 123,
"shortcut_pastes": 123,
"distraction_events": 123,
"devtools_open": true,
"debugger_attached": true,
"request_spoof_attempts": 123,
"user_agent_spoof_attempts": 123,
"hesitation_baseline": 123,
"hesitation_count": 123,
"hesitation_percentage": 123,
"hesitation_time": 123
},
"created_at": "<string>",
"updated_at": "<string>",
"started_at": "<string>",
"expires_at": "<string>",
"completed_at": "<string>",
"failed_at": "<string>",
"marked_for_review_at": "<string>",
"decisioned_at": "<string>",
"expired_at": "<string>",
"redacted_at": "<string>"
},
"relationships": {
"account": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"business": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"documents": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
},
"session_devices": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
},
"verifications": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
}
}
},
"meta": {},
"links": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"id": "<string>",
"code": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
],
"meta": {}
}Authorizations
API key for authentication. Access https://console.beltic.com/ to obtain your API key.
Body
application/json
Was this page helpful?
⌘I