Identity Verification
Batch Verify Identities
Verify multiple customer identities on-chain in a single transaction
POST
/
customers
/
api
/
identity
/
batch-verify
curl -X POST "https://api.trusset.org/customers/api/identity/batch-verify" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"entries": [
{ "walletAddress": "0xAbC123...", "country": "DE", "investorType": "PROFESSIONAL" },
{ "walletAddress": "0xDef456...", "country": "FR", "investorType": "RETAIL" }
]
}'
const response = await fetch(
'https://api.trusset.org/customers/api/identity/batch-verify',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
entries: [
{ walletAddress: '0xAbC123...', country: 'DE', investorType: 'PROFESSIONAL' },
{ walletAddress: '0xDef456...', country: 'FR', investorType: 'RETAIL' }
]
})
}
);
const { data } = await response.json();
const tx = await wallet.sendTransaction(data.transaction);
await tx.wait();
await fetch('https://api.trusset.org/customers/api/identity/batch-verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({ entries, txHash: tx.hash })
});
{
"success": true,
"data": {
"action": "SIGN_TRANSACTION",
"transaction": {
"to": "0x5B3c9D1e7F2a4B6c8D0e2F4a6B8c0D2e4F6a8B0c",
"data": "0x2c9d7f18..."
},
"functionName": "batchVerifyIdentities",
"description": "Batch verify 2 identities",
"submitted": 2,
"accepted": 2,
"totalEntries": 2,
"rejectedCount": 0,
"rejected": [],
"entries": [
{ "walletAddress": "0xabc123...", "country": "DE", "kycHash": "0xdead...beef" },
{ "walletAddress": "0xdef456...", "country": "FR", "kycHash": "0xfeed...face" }
],
"confirmWith": {
"endpoint": "POST /customers/api/identity/batch-verify",
"field": "txHash"
}
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
{
"success": true,
"data": {
"submitted": 2,
"accepted": 2,
"totalEntries": 2,
"rejectedCount": 0,
"rejected": [],
"txHash": "0xabc123def456789012345678901234567890abc123def456789012345678901234",
"gasUsed": "168042"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
{
"success": false,
"error": {
"code": "INVALID_INPUT",
"message": "Provide 1-500 entries"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
Builds a single registry call that verifies many identities at once. Invalid entries (malformed addresses, missing country) are filtered out and reported back in
rejected rather than failing the request.
Call it once without txHash to get the calldata, and again with the same entries plus txHash once you have broadcast it. The off-chain records are created or updated on the second call.
Request Body
array
required
Array of identity objects to verify. Minimum 1, maximum 500 entries. Each entry accepts the same fields as Verify Identity.
string
Hash of the transaction you broadcast. Send it, along with the same
entries, to confirm the batch and write the records. Omit it to receive the calldata.Response Fields
object
Show child attributes
Show child attributes
string
SIGN_TRANSACTION. Returned when txHash is omitted.object
to (the identity registry) and data. Returned when txHash is omitted.string
Always
batchVerifyIdentities. Returned when txHash is omitted.array
The accepted entries with their computed
kycHash. Returned when txHash is omitted.object
Where to send the hash once broadcast, as
endpoint and field. Returned when txHash is omitted.integer
Number of entries you sent.
integer
Number that passed validation and went into the call.
integer
Same as
accepted.integer
Number filtered out.
array
The filtered entries with the reason each was dropped.
string
The confirmed transaction hash. Returned when confirming with
txHash.string
Gas consumed. Returned when confirming with
txHash.Send the identical
entries array on both calls. Confirmation compares the addresses decoded from the receipt against the entries you submitted and rejects the call with TX_ENTRIES_MISMATCH if the sets differ, so no records are written from a transaction that verified a different batch.curl -X POST "https://api.trusset.org/customers/api/identity/batch-verify" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"entries": [
{ "walletAddress": "0xAbC123...", "country": "DE", "investorType": "PROFESSIONAL" },
{ "walletAddress": "0xDef456...", "country": "FR", "investorType": "RETAIL" }
]
}'
const response = await fetch(
'https://api.trusset.org/customers/api/identity/batch-verify',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
entries: [
{ walletAddress: '0xAbC123...', country: 'DE', investorType: 'PROFESSIONAL' },
{ walletAddress: '0xDef456...', country: 'FR', investorType: 'RETAIL' }
]
})
}
);
const { data } = await response.json();
const tx = await wallet.sendTransaction(data.transaction);
await tx.wait();
await fetch('https://api.trusset.org/customers/api/identity/batch-verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({ entries, txHash: tx.hash })
});
{
"success": true,
"data": {
"action": "SIGN_TRANSACTION",
"transaction": {
"to": "0x5B3c9D1e7F2a4B6c8D0e2F4a6B8c0D2e4F6a8B0c",
"data": "0x2c9d7f18..."
},
"functionName": "batchVerifyIdentities",
"description": "Batch verify 2 identities",
"submitted": 2,
"accepted": 2,
"totalEntries": 2,
"rejectedCount": 0,
"rejected": [],
"entries": [
{ "walletAddress": "0xabc123...", "country": "DE", "kycHash": "0xdead...beef" },
{ "walletAddress": "0xdef456...", "country": "FR", "kycHash": "0xfeed...face" }
],
"confirmWith": {
"endpoint": "POST /customers/api/identity/batch-verify",
"field": "txHash"
}
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
{
"success": true,
"data": {
"submitted": 2,
"accepted": 2,
"totalEntries": 2,
"rejectedCount": 0,
"rejected": [],
"txHash": "0xabc123def456789012345678901234567890abc123def456789012345678901234",
"gasUsed": "168042"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
{
"success": false,
"error": {
"code": "INVALID_INPUT",
"message": "Provide 1-500 entries"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
⌘I
curl -X POST "https://api.trusset.org/customers/api/identity/batch-verify" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"entries": [
{ "walletAddress": "0xAbC123...", "country": "DE", "investorType": "PROFESSIONAL" },
{ "walletAddress": "0xDef456...", "country": "FR", "investorType": "RETAIL" }
]
}'
const response = await fetch(
'https://api.trusset.org/customers/api/identity/batch-verify',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
entries: [
{ walletAddress: '0xAbC123...', country: 'DE', investorType: 'PROFESSIONAL' },
{ walletAddress: '0xDef456...', country: 'FR', investorType: 'RETAIL' }
]
})
}
);
const { data } = await response.json();
const tx = await wallet.sendTransaction(data.transaction);
await tx.wait();
await fetch('https://api.trusset.org/customers/api/identity/batch-verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({ entries, txHash: tx.hash })
});
{
"success": true,
"data": {
"action": "SIGN_TRANSACTION",
"transaction": {
"to": "0x5B3c9D1e7F2a4B6c8D0e2F4a6B8c0D2e4F6a8B0c",
"data": "0x2c9d7f18..."
},
"functionName": "batchVerifyIdentities",
"description": "Batch verify 2 identities",
"submitted": 2,
"accepted": 2,
"totalEntries": 2,
"rejectedCount": 0,
"rejected": [],
"entries": [
{ "walletAddress": "0xabc123...", "country": "DE", "kycHash": "0xdead...beef" },
{ "walletAddress": "0xdef456...", "country": "FR", "kycHash": "0xfeed...face" }
],
"confirmWith": {
"endpoint": "POST /customers/api/identity/batch-verify",
"field": "txHash"
}
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
{
"success": true,
"data": {
"submitted": 2,
"accepted": 2,
"totalEntries": 2,
"rejectedCount": 0,
"rejected": [],
"txHash": "0xabc123def456789012345678901234567890abc123def456789012345678901234",
"gasUsed": "168042"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
{
"success": false,
"error": {
"code": "INVALID_INPUT",
"message": "Provide 1-500 entries"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
