> ## Documentation Index
> Fetch the complete documentation index at: https://docs.txcloud.thetekcircle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create verification

> Performs a full identity verification including document OCR, 
face matching, liveness detection, and fraud checks.

**Checks Available:**
- `ocr` - Extract data from document
- `face_match` - Compare selfie to document photo
- `liveness` - Detect if selfie is a live person
- `fraud` - Check for document tampering
- `duplicate` - Check for duplicate submissions

**Processing Modes:**
- `sync` - Wait for results (default, up to 30s)
- `async` - Return immediately, results via webhook




## OpenAPI

````yaml openapi/identity.yaml post /identity/verify
openapi: 3.0.3
info:
  title: TXCloud Identity API
  version: 1.0.0
  description: >
    The TXCloud Identity API enables identity verification through document
    OCR, 

    face matching, liveness detection, and fraud checks.


    ## Base URL

    ```

    https://api.txcloud.io/v1

    ```


    ## Authentication

    All requests require a Bearer token in the Authorization header:

    ```

    Authorization: Bearer txc_live_your_api_key

    ```


    ## Rate Limits

    | Plan | Requests/min |

    |------|--------------|

    | Starter | 60 |

    | Growth | 300 |

    | Scale | 1,000 |

    | Enterprise | Custom |
  termsOfService: https://txcloud.io/terms
  contact:
    name: TXCloud API Support
    email: support@txcloud.io
    url: https://docs.txcloud.io
  license:
    name: Proprietary
    url: https://txcloud.io/license
  x-logo:
    url: https://txcloud.io/logo.png
servers:
  - url: https://api.txcloud.io/v1
    description: Production
  - url: https://sandbox.api.txcloud.io/v1
    description: Sandbox (test environment)
security:
  - BearerAuth: []
tags:
  - name: Verification
    description: Core identity verification endpoints
  - name: Management
    description: Manage and retrieve verifications
  - name: Sessions
    description: Multi-step verification sessions
  - name: Documents
    description: Document management
  - name: Configuration
    description: Supported documents and countries
paths:
  /identity/verify:
    post:
      tags:
        - Verification
      summary: Create verification
      description: |
        Performs a full identity verification including document OCR, 
        face matching, liveness detection, and fraud checks.

        **Checks Available:**
        - `ocr` - Extract data from document
        - `face_match` - Compare selfie to document photo
        - `liveness` - Detect if selfie is a live person
        - `fraud` - Check for document tampering
        - `duplicate` - Check for duplicate submissions

        **Processing Modes:**
        - `sync` - Wait for results (default, up to 30s)
        - `async` - Return immediately, results via webhook
      operationId: createVerification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VerificationRequestMultipart'
      responses:
        '200':
          description: Verification completed (sync mode)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Verification'
        '201':
          description: Verification created (async mode)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationPending'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    VerificationRequest:
      type: object
      required:
        - document_front
        - document_type
        - country
      properties:
        document_front:
          type: string
          format: byte
          description: Base64 encoded front of document
        document_back:
          type: string
          format: byte
          description: Base64 encoded back of document
        selfie:
          type: string
          format: byte
          description: Base64 encoded selfie image
        document_type:
          type: string
          enum:
            - cin
            - cni
            - passport
            - permit
            - residence_card
        country:
          type: string
          pattern: ^[A-Z]{2}$
          example: MA
        checks:
          type: array
          items:
            type: string
            enum:
              - ocr
              - face_match
              - liveness
              - fraud
              - duplicate
          default:
            - ocr
            - face_match
            - liveness
            - fraud
        mode:
          type: string
          enum:
            - sync
            - async
          default: sync
        webhook_url:
          type: string
          format: uri
          description: Webhook URL for async results
        metadata:
          type: object
          additionalProperties: true
          description: Custom metadata
    VerificationRequestMultipart:
      type: object
      required:
        - document_front
        - document_type
        - country
      properties:
        document_front:
          type: string
          format: binary
        document_back:
          type: string
          format: binary
        selfie:
          type: string
          format: binary
        document_type:
          type: string
        country:
          type: string
    Verification:
      type: object
      properties:
        id:
          type: string
          example: ver_a1b2c3d4e5f6
        object:
          type: string
          enum:
            - identity.verification
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - pending
            - verified
            - rejected
            - review
            - expired
            - error
        document_type:
          type: string
        country:
          type: string
        extracted_data:
          $ref: '#/components/schemas/ExtractedData'
        checks:
          $ref: '#/components/schemas/VerificationChecks'
        risk_score:
          type: integer
          minimum: 0
          maximum: 1000
        risk_level:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
        fraud_signals:
          type: array
          items:
            $ref: '#/components/schemas/FraudSignal'
        metadata:
          type: object
    VerificationPending:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - identity.verification
        status:
          type: string
          enum:
            - pending
        created_at:
          type: string
          format: date-time
    ExtractedData:
      type: object
      properties:
        document_number:
          type: string
          example: AE123456
        first_name:
          type: string
          example: Mohammed
        last_name:
          type: string
          example: El Amrani
        first_name_arabic:
          type: string
        last_name_arabic:
          type: string
        date_of_birth:
          type: string
          format: date
        gender:
          type: string
          enum:
            - M
            - F
        nationality:
          type: string
        issue_date:
          type: string
          format: date
        expiry_date:
          type: string
          format: date
        address:
          type: string
        place_of_birth:
          type: string
        mrz:
          type: string
        field_confidences:
          type: object
          additionalProperties:
            type: number
    VerificationChecks:
      type: object
      properties:
        ocr:
          $ref: '#/components/schemas/CheckResult'
        face_match:
          $ref: '#/components/schemas/FaceMatchCheck'
        liveness:
          $ref: '#/components/schemas/LivenessCheck'
        fraud:
          $ref: '#/components/schemas/FraudCheck'
        duplicate:
          $ref: '#/components/schemas/CheckResult'
    FraudSignal:
      type: object
      properties:
        code:
          type: string
        severity:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
        message:
          type: string
    CheckResult:
      type: object
      properties:
        status:
          type: string
          enum:
            - passed
            - failed
            - skipped
            - error
        confidence:
          type: number
          format: float
          minimum: 0
          maximum: 1
    FaceMatchCheck:
      allOf:
        - $ref: '#/components/schemas/CheckResult'
        - type: object
          properties:
            similarity_score:
              type: number
              format: float
            threshold:
              type: number
              format: float
    LivenessCheck:
      allOf:
        - $ref: '#/components/schemas/CheckResult'
        - type: object
          properties:
            is_live:
              type: boolean
            spoof_probability:
              type: number
              format: float
    FraudCheck:
      allOf:
        - $ref: '#/components/schemas/CheckResult'
        - type: object
          properties:
            tampering_detected:
              type: boolean
            signals:
              type: array
              items:
                type: string
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  type:
                    type: string
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
    UnprocessableEntity:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
    RateLimited:
      description: Rate Limited
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key as Bearer token

````