Skip to main content
POST
/
identity
/
verify
Create verification
curl --request POST \
  --url https://api.txcloud.io/v1/identity/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "document_front": "aSDinaTvuI8gbWludGxpZnk=",
  "document_type": "cin",
  "country": "MA",
  "document_back": "aSDinaTvuI8gbWludGxpZnk=",
  "selfie": "aSDinaTvuI8gbWludGxpZnk=",
  "checks": [
    "ocr",
    "face_match",
    "liveness",
    "fraud"
  ],
  "mode": "sync",
  "webhook_url": "<string>",
  "metadata": {}
}
'
{
  "id": "ver_a1b2c3d4e5f6",
  "object": "identity.verification",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status": "pending",
  "document_type": "<string>",
  "country": "<string>",
  "extracted_data": {
    "document_number": "AE123456",
    "first_name": "Mohammed",
    "last_name": "El Amrani",
    "first_name_arabic": "<string>",
    "last_name_arabic": "<string>",
    "date_of_birth": "2023-12-25",
    "gender": "M",
    "nationality": "<string>",
    "issue_date": "2023-12-25",
    "expiry_date": "2023-12-25",
    "address": "<string>",
    "place_of_birth": "<string>",
    "mrz": "<string>",
    "field_confidences": {}
  },
  "checks": {
    "ocr": {
      "status": "passed",
      "confidence": 0.5
    },
    "face_match": {
      "status": "passed",
      "confidence": 0.5,
      "similarity_score": 123,
      "threshold": 123
    },
    "liveness": {
      "status": "passed",
      "confidence": 0.5,
      "is_live": true,
      "spoof_probability": 123
    },
    "fraud": {
      "status": "passed",
      "confidence": 0.5,
      "tampering_detected": true,
      "signals": [
        "<string>"
      ]
    },
    "duplicate": {
      "status": "passed",
      "confidence": 0.5
    }
  },
  "risk_score": 500,
  "risk_level": "low",
  "fraud_signals": [
    {
      "code": "<string>",
      "severity": "low",
      "message": "<string>"
    }
  ],
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API key as Bearer token

Body

document_front
string<byte>
required

Base64 encoded front of document

document_type
enum<string>
required
Available options:
cin,
cni,
passport,
permit,
residence_card
country
string
required
Example:

"MA"

document_back
string<byte>

Base64 encoded back of document

selfie
string<byte>

Base64 encoded selfie image

checks
enum<string>[]
Available options:
ocr,
face_match,
liveness,
fraud,
duplicate
mode
enum<string>
default:sync
Available options:
sync,
async
webhook_url
string<uri>

Webhook URL for async results

metadata
object

Custom metadata

Response

Verification completed (sync mode)

id
string
Example:

"ver_a1b2c3d4e5f6"

object
enum<string>
Available options:
identity.verification
created_at
string<date-time>
updated_at
string<date-time>
status
enum<string>
Available options:
pending,
verified,
rejected,
review,
expired,
error
document_type
string
country
string
extracted_data
object
checks
object
risk_score
integer
Required range: 0 <= x <= 1000
risk_level
enum<string>
Available options:
low,
medium,
high,
critical
fraud_signals
object[]
metadata
object