DEVELOPER DOCS

API Documentation

Integrate Veriflo's verification, PII detection, and redaction capabilities into your application with our REST API. Simple authentication, powerful endpoints, and comprehensive response data.

Quick Start

Get up and running with the Veriflo API in three simple steps.

1

Get Your API Key

Navigate to your dashboard settings to generate or copy your API key. Keep it secure and never share it publicly.

Go to API Keys
2

Make a Request

Send a POST request to any endpoint with your API key in the Authorization header.

curl -X POST \
  https://app.useveriflo.com/api/v1/verify \
  -H "Authorization: Bearer vf_..." \
  -F "file=@document.pdf"
3

Get Results

Receive a JSON response with verification results, PII data, or redacted file URLs.

{
  "status": "success",
  "data": {
    "integrity_score": 85,
    ...
  }
}

Authentication

All API requests require Bearer token authentication using your API key.

Bearer Token Format

Include your API key in the Authorization header with every request:

Authorization: Bearer vf_xxxxx...

Replace vf_xxxxx... with your actual API key.

API Key Management

API keys are tied to your Veriflo account and can be rotated at any time from your account settings.

  • Each key is unique to your account
  • Never expose keys in client-side code
  • Rotate regularly for security
Manage Keys

API Endpoints

Three powerful endpoints for document verification, PII detection, and secure redaction.

POST/api/v1/verify

Document Integrity Verification

Verify the integrity of PDF or image documents, detect AI-generated content, identify template matches, and analyze document metadata.

Request

Multipart Form Data:

  • file: File (PDF or image)

OR JSON Body:

{
  "file_base64": "string (base64)",
  "file_name": "document.pdf",
  "mime_type": "application/pdf"
}

Response

{
  "status": "success",
  "data": {
    "integrity_score": 85,
    "risk_level": "low",
    "findings": [
      {
        "type": "suspicious_pattern",
        "severity": "info",
        "description": "..."
      }
    ],
    "ai_detection": {
      "text": {
        "is_ai_generated": false,
        "confidence": 0.92
      },
      "image": {
        "is_ai_generated": false,
        "confidence": 0.88
      }
    },
    "template_match": {
      "matched": true,
      "template_name": "Standard Contract",
      "confidence": 0.92
    },
    "file_info": {
      "name": "contract.pdf",
      "size": 12345,
      "type": "application/pdf",
      "sha256": "abc123..."
    },
    "execution_time_ms": 1234
  }
}

Rate Limit Headers

X-RateLimit-Limit: 60

X-RateLimit-Remaining: 59

X-RateLimit-Reset: 1708534023

POST/api/v1/mask/detect

Detect PII in Documents

Scan PDF documents for personally identifiable information (PII) across multiple categories. Returns detailed matches with locations and confidence scores.

Request

Multipart Form Data:

  • file: File (PDF)

OR JSON Body:

{
  "file_base64": "string (base64)",
  "file_name": "contract.pdf",
  "mime_type": "application/pdf"
}

Response

{
  "status": "success",
  "data": {
    "fileName": "contract.pdf",
    "fileSize": 54321,
    "totalMatches": 7,
    "categoryCounts": {
      "email": 3,
      "phone": 2,
      "ssn": 1,
      "address": 1
    },
    "matches": [
      {
        "type": "email",
        "text": "john@example.com",
        "startIndex": 150,
        "confidence": 0.98
      }
    ],
    "execution_time_ms": 456
  }
}

Supported PII Categories

Email addresses
Phone numbers
SSNs
Addresses
Bank accounts
Credit cards
Dates of birth
Passport numbers
POST/api/v1/mask/redact

Redact PII from Documents

Automatically redact specified PII categories from PDF documents. Returns a download URL for the redacted file and a summary of redacted data.

Request

Multipart Form Data:

  • file: File (PDF)
  • categories: JSON array string

OR JSON Body:

{
  "file_base64": "string (base64)",
  "file_name": "contract.pdf",
  "mime_type": "application/pdf",
  "categories": [
    "email",
    "phone",
    "ssn"
  ]
}

Response

{
  "status": "success",
  "data": {
    "redactionId": "uuid-12345...",
    "downloadUrl": "https://app.useveriflo.com/...",
    "fileName": "contract-redacted.pdf",
    "redactionSummary": {
      "totalRedactions": 7,
      "categoriesRedacted": [
        "email",
        "phone",
        "ssn"
      ],
      "piiSummary": {
        "email": 3,
        "phone": 2,
        "ssn": 2
      },
      "processingTimeMs": 890
    },
    "execution_time_ms": 890
  }
}

Available Categories

• email
• phone
• ssn
• bank_account
• credit_card
• date_of_birth
• passport
• address

Rate Limits & Usage

API usage limits depend on your subscription plan. Rate limits reset every minute.

PlanRate LimitIntegrity ChecksPII DetectionsPII Redactions
FreeNo API access10/month5/month5/month
Pro ($49/mo)60 req/min100/month100/month50/month
Enterprise ($149/mo)600 req/minUnlimitedUnlimitedUnlimited

Rate Limit Headers

Every successful API response includes rate limit information in the response headers:

X-RateLimit-Limit: 60

X-RateLimit-Remaining: 45

X-RateLimit-Reset: 1708534080

Check these headers to monitor your rate limit status and avoid hitting limits.

Error Handling

The API uses standard HTTP status codes to indicate success or failure.

Status CodeError CodeDescription
200successRequest succeeded. Check response data.
400bad_requestInvalid request format or missing required parameters.
401unauthorizedInvalid, missing, or expired API key.
429rate_limit_exceededRate limit or usage quota exceeded. Retry after reset time.
500internal_server_errorServer error. Try again later or contact support.

Error Response Format

{
  "status": "error",
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key"
  }
}

Code Examples

Example implementations for the document verification endpoint in different languages.

cURL

curl -X POST \
  https://app.useveriflo.com/api/v1/verify \
  -H "Authorization: Bearer vf_your_api_key" \
  -F "file=@document.pdf"

Python

import requests

response = requests.post(
    "https://app.useveriflo.com/api/v1/verify",
    headers={
      "Authorization": 
        "Bearer vf_your_api_key"
    },
    files={"file": open("document.pdf", "rb")}
)
print(response.json())

JavaScript

const formData = new FormData();
formData.append("file", 
  fileInput.files[0]);

const response = await fetch(
  "https://app.useveriflo.com/api/v1/verify",
  {
    method: "POST",
    headers: {
      "Authorization": 
        "Bearer vf_your_api_key"
    },
    body: formData
  }
);
const data = await response.json();

Ready to Integrate?

Start building with Veriflo's API today. Get your API key in seconds and integrate document verification and PII management into your application.