Request a KYC session for a specific action.
curl --request POST \
--url https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"level": 1,
"type": "OCC_RULES_ENGINE"
},
"customer": {
"external_id": "customer_PK",
"wallet": {
"address": "0xaac17f958d2ee523a2206206994597c13d831ec2",
"blockchain": "sepolia"
}
}
}
'import requests
url = "https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc"
payload = {
"action": {
"level": 1,
"type": "OCC_RULES_ENGINE"
},
"customer": {
"external_id": "customer_PK",
"wallet": {
"address": "0xaac17f958d2ee523a2206206994597c13d831ec2",
"blockchain": "sepolia"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
action: {level: 1, type: 'OCC_RULES_ENGINE'},
customer: {
external_id: 'customer_PK',
wallet: {address: '0xaac17f958d2ee523a2206206994597c13d831ec2', blockchain: 'sepolia'}
}
})
};
fetch('https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc', 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://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc",
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([
'action' => [
'level' => 1,
'type' => 'OCC_RULES_ENGINE'
],
'customer' => [
'external_id' => 'customer_PK',
'wallet' => [
'address' => '0xaac17f958d2ee523a2206206994597c13d831ec2',
'blockchain' => 'sepolia'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc"
payload := strings.NewReader("{\n \"action\": {\n \"level\": 1,\n \"type\": \"OCC_RULES_ENGINE\"\n },\n \"customer\": {\n \"external_id\": \"customer_PK\",\n \"wallet\": {\n \"address\": \"0xaac17f958d2ee523a2206206994597c13d831ec2\",\n \"blockchain\": \"sepolia\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": {\n \"level\": 1,\n \"type\": \"OCC_RULES_ENGINE\"\n },\n \"customer\": {\n \"external_id\": \"customer_PK\",\n \"wallet\": {\n \"address\": \"0xaac17f958d2ee523a2206206994597c13d831ec2\",\n \"blockchain\": \"sepolia\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": {\n \"level\": 1,\n \"type\": \"OCC_RULES_ENGINE\"\n },\n \"customer\": {\n \"external_id\": \"customer_PK\",\n \"wallet\": {\n \"address\": \"0xaac17f958d2ee523a2206206994597c13d831ec2\",\n \"blockchain\": \"sepolia\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"error_code": "ERR01",
"flow": "KYC_OCC",
"widget_data": null
}
}{
"data": {
"error_code": null,
"flow": "KYC_OCC",
"widget_data": "eyJhY2Nlc3NfdG9rZW4iOiAiZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhjSEJmYVdRaU9pSmxPRFk0WWpCak55MDFObVJtTFRReFpUUXRZVFpsTkMwMk9ESm1PVEkyTUdVM1kySWlMQ0pqZFhOMGIyMWxjbDlwWkNJNklqVTBZbVUxWXpkakxURTFNbVF0TkdaaFppMDROVFl6TFRObE9EZGpNR0l5T1dNME1pSXNJbVZ0WVdsc1gyRmtaSEpsYzNNaU9pSjBaWE4wYVc1blFHNXZjblJvWlhKdWJHRmljeTVqWVNJc0ltVnRZV2xzWDNabGNtbG1hV1ZrSWpwbVlXeHpaU3dpWlhod0lqb3hOamt5TURRMU1USTVMQ0pwYzNNaU9pSm1iM0owWlY5aGRYUm9YM04yWXlJc0ltMWxjbU5vWVc1MFgybGtJam9pTTJWak1qYzNNV0V0Wm1VeFppMDBOR1U1TFdGall6VXRPV0ZtTVdFNU9XVm1aR1l4SWl3aWRHOXJaVzVmZEhsd1pTSTZJbVY0ZEdWeWJtRnNYM1J2YTJWdUluMC5xUjRydmVMejVFQUt1eE91cTFOS0JhQ0ktM2hoMFVRVWlMQmpNaC1WT2QwIiwgImt5Y19hdHRyaWJ1dGVzIjogWyJOQU1FIiwgIkFERFJFU1MiLCAiRE9CIiwgIlBIT05FX05VTUJFUiJdLCAia3ljX3Nlc3Npb24iOiAiNzcyNTVhYmEtZmE3NS00NzgzLWEyYmItNjQ3MWQzZmFlM2QzIn0="
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"code": 123,
"reason": "Forbidden",
"status": 403,
"message": "<string>"
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}Forte Compliance
Create KYC Intent
Request a KYC session for a specific action.
POST
/
compliance
/
v2
/
kyc
Request a KYC session for a specific action.
curl --request POST \
--url https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"level": 1,
"type": "OCC_RULES_ENGINE"
},
"customer": {
"external_id": "customer_PK",
"wallet": {
"address": "0xaac17f958d2ee523a2206206994597c13d831ec2",
"blockchain": "sepolia"
}
}
}
'import requests
url = "https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc"
payload = {
"action": {
"level": 1,
"type": "OCC_RULES_ENGINE"
},
"customer": {
"external_id": "customer_PK",
"wallet": {
"address": "0xaac17f958d2ee523a2206206994597c13d831ec2",
"blockchain": "sepolia"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
action: {level: 1, type: 'OCC_RULES_ENGINE'},
customer: {
external_id: 'customer_PK',
wallet: {address: '0xaac17f958d2ee523a2206206994597c13d831ec2', blockchain: 'sepolia'}
}
})
};
fetch('https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc', 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://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc",
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([
'action' => [
'level' => 1,
'type' => 'OCC_RULES_ENGINE'
],
'customer' => [
'external_id' => 'customer_PK',
'wallet' => [
'address' => '0xaac17f958d2ee523a2206206994597c13d831ec2',
'blockchain' => 'sepolia'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc"
payload := strings.NewReader("{\n \"action\": {\n \"level\": 1,\n \"type\": \"OCC_RULES_ENGINE\"\n },\n \"customer\": {\n \"external_id\": \"customer_PK\",\n \"wallet\": {\n \"address\": \"0xaac17f958d2ee523a2206206994597c13d831ec2\",\n \"blockchain\": \"sepolia\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": {\n \"level\": 1,\n \"type\": \"OCC_RULES_ENGINE\"\n },\n \"customer\": {\n \"external_id\": \"customer_PK\",\n \"wallet\": {\n \"address\": \"0xaac17f958d2ee523a2206206994597c13d831ec2\",\n \"blockchain\": \"sepolia\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.sandbox.lemmax.com/compliance/v2/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": {\n \"level\": 1,\n \"type\": \"OCC_RULES_ENGINE\"\n },\n \"customer\": {\n \"external_id\": \"customer_PK\",\n \"wallet\": {\n \"address\": \"0xaac17f958d2ee523a2206206994597c13d831ec2\",\n \"blockchain\": \"sepolia\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"error_code": "ERR01",
"flow": "KYC_OCC",
"widget_data": null
}
}{
"data": {
"error_code": null,
"flow": "KYC_OCC",
"widget_data": "eyJhY2Nlc3NfdG9rZW4iOiAiZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhjSEJmYVdRaU9pSmxPRFk0WWpCak55MDFObVJtTFRReFpUUXRZVFpsTkMwMk9ESm1PVEkyTUdVM1kySWlMQ0pqZFhOMGIyMWxjbDlwWkNJNklqVTBZbVUxWXpkakxURTFNbVF0TkdaaFppMDROVFl6TFRObE9EZGpNR0l5T1dNME1pSXNJbVZ0WVdsc1gyRmtaSEpsYzNNaU9pSjBaWE4wYVc1blFHNXZjblJvWlhKdWJHRmljeTVqWVNJc0ltVnRZV2xzWDNabGNtbG1hV1ZrSWpwbVlXeHpaU3dpWlhod0lqb3hOamt5TURRMU1USTVMQ0pwYzNNaU9pSm1iM0owWlY5aGRYUm9YM04yWXlJc0ltMWxjbU5vWVc1MFgybGtJam9pTTJWak1qYzNNV0V0Wm1VeFppMDBOR1U1TFdGall6VXRPV0ZtTVdFNU9XVm1aR1l4SWl3aWRHOXJaVzVmZEhsd1pTSTZJbVY0ZEdWeWJtRnNYM1J2YTJWdUluMC5xUjRydmVMejVFQUt1eE91cTFOS0JhQ0ktM2hoMFVRVWlMQmpNaC1WT2QwIiwgImt5Y19hdHRyaWJ1dGVzIjogWyJOQU1FIiwgIkFERFJFU1MiLCAiRE9CIiwgIlBIT05FX05VTUJFUiJdLCAia3ljX3Nlc3Npb24iOiAiNzcyNTVhYmEtZmE3NS00NzgzLWEyYmItNjQ3MWQzZmFlM2QzIn0="
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"code": 123,
"reason": "Forbidden",
"status": 403,
"message": "<string>"
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}{
"error": {
"message": "The Foo resource could not be found",
"reason": "Not Found",
"status": 404
}
}Authorizations
Body
application/json
Start KYC Workflow Request
Response
When this API is called, there is a certain case that won't start the KYC submission process, but the response is communicated under 200 HTTP code. This is to signal to the Developers that widget should still be initialized and the response from this API should be provided directly to the widget initialization.