PlatformXeDocs
Get API Key

Verify Identity

API reference for verifying identity data against national databases with name matching.

Verify an identity number against national databases and optionally match the returned profile against expected biographical data.

Endpoint

POST /api/v1/identity/verify

Scope: identity:resolve

Request body

FieldTypeRequiredDescription
typestringYesIdentity type: bvn, nin, tin, voter, passport, phone, license
valuestringYesThe identity number to verify
matchAgainstobjectNoBiographical data to match against the resolved profile
matchAgainst.firstNamestringNoExpected first name
matchAgainst.lastNamestringNoExpected last name
matchAgainst.dateOfBirthstringNoExpected date of birth (ISO 8601 date, e.g. 1990-05-15)
consentobjectYesConsent proof (see below)
consent.referencestringYesYour application's consent reference ID
consent.obtainedAtstringYesISO 8601 timestamp when consent was obtained

The consent field is mandatory. Requests without a valid consent reference are rejected with a BAD_REQUEST error. See Consent & NDPR for compliance details.

Response

{
  "success": true,
  "data": {
    "verified": true,
    "matchScore": 0.94,
    "matches": {
      "firstName": { "match": true, "score": 0.96 },
      "lastName": { "match": true, "score": 1.0 },
      "dateOfBirth": { "match": true, "score": 1.0 }
    },
    "profile": {
      "firstName": "Adaeze",
      "lastName": "Okonkwo",
      "dateOfBirth": "1990-05-15",
      "gender": "female",
      "phone": "+2348012345678"
    },
    "provider": "primary",
    "verifiedAt": "2026-04-05T14:30:00.000Z"
  }
}
FieldTypeDescription
verifiedbooleanOverall verification result (true if all provided matchAgainst fields pass)
matchScorenumberAggregate match score between 0 and 1
matchesobjectPer-field match results with individual scores
profileobjectProfile data returned from the identity provider
providerstringWhich provider in the fallback chain answered the request
verifiedAtstringISO 8601 timestamp of verification

If matchAgainst is omitted, the endpoint still resolves the identity and returns the profile, but verified will be null and matches will be empty. Use the Resolve endpoint if you only need profile data without matching.

Examples

curl

curl -X POST https://api.platformxe.com/api/v1/identity/verify \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "type": "bvn",
    "value": "22345678901",
    "matchAgainst": {
      "firstName": "Adaeze",
      "lastName": "Okonkwo",
      "dateOfBirth": "1990-05-15"
    },
    "consent": {
      "reference": "consent_ref_abc123",
      "obtainedAt": "2026-04-01T10:00:00.000Z"
    }
  }'

SDK

import { PlatformXe } from '@caldera/platformxe-sdk';

const px = new PlatformXe({ apiKey: 'pxk_live_your_api_key_here' });

const result = await px.identity.verify({
  type: 'bvn',
  value: '22345678901',
  matchAgainst: {
    firstName: 'Adaeze',
    lastName: 'Okonkwo',
    dateOfBirth: '1990-05-15',
  },
  consent: {
    reference: 'consent_ref_abc123',
    obtainedAt: '2026-04-01T10:00:00.000Z',
  },
});

if (result.data.verified) {
  console.log('Identity verified with score:', result.data.matchScore);
  // "Identity verified with score: 0.94"
} else {
  console.log('Verification failed. Matches:', result.data.matches);
}

Verify without name matching

const result = await px.identity.verify({
  type: 'nin',
  value: '12345678901',
  consent: {
    reference: 'consent_ref_def456',
    obtainedAt: '2026-04-01T10:00:00.000Z',
  },
});

// verified is null when matchAgainst is not provided
console.log(result.data.profile.firstName);
// "Adaeze"

Error responses

CodeDescription
BAD_REQUESTMissing required fields, invalid identity type, or missing consent
NOT_FOUNDNo identity record found for the given type and value
FORBIDDENAPI key does not have the identity:resolve scope
RATE_LIMITEDExceeded plan limit for identity verification requests