🎉 Unlimited Free KYC - Forever!!

Identity Verification
API Reference
Proof of Address

Proof of Address Verification API

The Proof of Address (POA) Verification API allows you to verify address documents by submitting document images or PDFs. This API extracts and validates address information, performs authenticity checks, and returns structured data from the document.

  • Base URL: https://verification.didit.me
  • Endpoint: /v2/poa/
  • Authentication: Client Token (Bearer Token)
⚠️

The authentication endpoint uses a different base URL than the API endpoints. Ensure you use the correct URLs to avoid connectivity issues.

This API requires a Pro Plan subscription and has an associated cost per call. Results won't be saved in your console. For pricing details, visit our API Pricing page.

Process Overview

Follow these steps to submit address documents for verification:

Step 1: Authenticate

Obtain a valid access_token by following the Authentication documentation. This token is required in the Authorization header of your request.

ℹ️

The access_token is valid for 24 hours. You only need to re-authenticate once it expires.

Step 2: Prepare Request Parameters

ParameterTypeRequired?DescriptionExample Value
documentfileYesProof of address document (PDF, JPEG, PNG, or WebP)Binary file
optionsjsonNoCustomization options for address verificationSee options details below

Options Object

The options parameter allows you to customize the POA verification process:

OptionTypeRequired?DescriptionDefault Value
poa_languages_allowedobjectNoLanguages allowed for proof of address documents. Format is a map of language codes to boolean values.See example below
poa_document_age_monthsobjectNoMaximum age in months for each type of proof of address document to be considered valid.See example below
poa_name_mismatch_actionstringNoAction to take when the name on proof of address doesn't match provided name. Valid values: "NO_ACTION", "DECLINE""DECLINE"
poa_document_issues_actionstringNoAction to take when document quality or file integrity is poor. Valid values: "NO_ACTION", "DECLINE""DECLINE"
poa_expired_document_actionstringNoAction to take when the proof of address document is expired. Valid values: "NO_ACTION", "DECLINE""DECLINE"
poa_unsupported_language_actionstringNoAction to take when document language is not supported. Valid values: "NO_ACTION", "DECLINE""DECLINE"
poa_address_mismatch_actionstringNoAction to take when address doesn't match provided address. Valid values: "NO_ACTION", "DECLINE""DECLINE"
poa_issuer_not_identified_actionstringNoAction to take when issuer is not identified. Valid values: "NO_ACTION", "DECLINE""DECLINE"
poa_issue_date_not_detected_actionstringNoAction to take when issue date is not detected. Valid values: "NO_ACTION", "DECLINE""DECLINE"

Example of poa_languages_allowed object:

{
  "poa_languages_allowed": {
    "en": true,
    "es": true,
    "fr": true,
    "de": true,
    "it": false
  }
}

By default, all 47 supported languages are accepted on the Supported Languages page are allowed. You can selectively enable or disable specific languages by setting their values to true or false in the poa_languages_allowed object.

Example of poa_document_age_months object:

{
  "poa_document_age_months": {
    "utility_bill": 3,
    "bank_statement": 3,
    "government_issued_document": 12,
  }
}

Document Requirements

  • Document files must be in PDF, JPEG, PNG, or WebP format
  • Maximum file size: 15MB
  • Document must be clearly visible, well-lit, and unobstructed
  • Address information must be clearly legible
  • Document should be from an accepted issuer (bank, utility company, government, etc.)
  • Document should be recent, according to configured age restrictions

Step 3: Send the Request

Make a POST request to /v2/poa/ with the prepared parameters and include the access_token obtained in step 1 in the header.

Example Request

POST /v2/poa/ HTTP/1.1
Host: verification.didit.me
Content-Type: multipart/form-data
Authorization: Bearer {access_token}
 
--boundary
Content-Disposition: form-data; name="document"; filename="utility_bill.pdf"
Content-Type: application/pdf
 
[Binary file data]
--boundary
Content-Disposition: form-data; name="options"
Content-Type: application/json
 
{
  "poa_languages_allowed": {
    "EN": true,
    "ES": true,
    "FR": true
  },
  "poa_document_age_months": {
    "utility_bill": 3,
    "bank_statement": 3
  },
  "poa_name_mismatch_action": "DECLINE",
  "poa_document_issues_action": "DECLINE",
  "poa_expired_document_action": "DECLINE",
  "poa_unsupported_language_action": "DECLINE",
  "poa_address_mismatch_action": "DECLINE",
  "poa_issuer_not_identified_action": "DECLINE",
  "poa_issue_date_not_detected_action": "DECLINE"
}
--boundary--

Response

The response provides detailed information about the POA verification results, including extracted address information and verification status.

Example Response

{
  "request_id": "11111111-2222-3333-4444-555555555555",
  "poa": {
    "status": "Approved",
    "document_type": "Bank Statement",
    "issuer": "National Bank",
    "issue_date": "2024-05-15",
    "document_language": "EN",
    "name_on_document": "John A. Smith",
    "name_match_score": 92.5,
    "address": "123 Main St, Apartment 4B, New York, NY 10001",
    "formatted_address": "123 Main St, Apartment 4B, New York, NY 10001, USA",
    "parsed_address": {
      "street_1": "123 Main St",
      "street_2": "Apartment 4B",
      "city": "New York",
      "region": "NY",
      "postal_code": "10001",
      "raw_results": {
        "geometry": {
          "location": {
            "lat": 40.7128,
            "lng": -74.0060
          }
        }
      }
    },
    "document_file": "https://example.com/poa_document.pdf",
    "extra_files": [
      "https://example.com/extra_poa.pdf"
    ],
    "warnings": []
  },
  "created_at": "2024-07-30T08:45:12.345678Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique identifier for the API request.
poa.statusstringOverall POA Verification status (Approved or Declined)
poa.document_typestringType of document detected (Bank Statement, Utility Bill, etc.)
poa.issuerstringName of the document issuer (company or organization)
poa.issue_datestringIssue date of the document in YYYY-MM-DD format
poa.document_languagestringDetected language of the document (ISO 639-1 code)
poa.name_on_documentstringName as it appears on the document
poa.name_match_scorenumberScore indicating how well the name on document matches with provided name
poa.addressstringAddress as it appears on the document
poa.formatted_addressstringStandardized version of the address
poa.parsed_addressobjectStructured address components and geolocation data
poa.document_filestringTemporary URL to the processed document file
poa.extra_filesarrayAdditional files related to the document verification
poa.warningsarrayList of warnings related to the document verification
created_atstringTimestamp when the request was created (ISO 8601 format).

The document file URLs in the response are temporary and will expire after 60 minutes.

Error Handling

Status CodeErrorDescription
400Bad RequestInvalid parameters or missing required files
401UnauthorizedInvalid or missing access_token
403ForbiddenNot authorized to access this API or insufficient subscription plan.

Example Error Response

{
  "error": {
    "code": "INVALID_DOCUMENT",
    "message": "Document could not be processed. Please ensure it is clearly visible and retry."
  }
}

Common Error Codes

Error CodeDescription
INVALID_DOCUMENTDocument could not be recognized or processed
UNSUPPORTED_DOCUMENT_TYPEDocument type is not supported for address verification
INSUFFICIENT_QUALITYDocument quality is too low for accurate analysis
MAX_ATTEMPTS_EXCEEDEDMaximum number of verification attempts has been exceeded
EXPIRED_DOCUMENTDocument is older than the allowed maximum age
UNSUPPORTED_LANGUAGEDocument language is not in the list of supported languages

Code Examples

async function submitPoaVerification(accessToken, documentFile, options = null) {
  const url = `https://verification.didit.me/v2/poa/`;
 
  // Create a FormData instance
  const formData = new FormData();
  formData.append('document', documentFile);
 
  // Add options if provided
  if (options) {
    formData.append('options', JSON.stringify(options));
  }
 
  const requestOptions = {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`
    },
    body: formData
  };
 
  try {
    const response = await fetch(url, requestOptions);
 
    if (!response.ok) {
      const errorData = await response.json();
      throw new Error(errorData.error?.message || errorData.detail || 'Unknown error occurred');
    }
 
    return await response.json();
  } catch (error) {
    console.error('Error in POA Verification:', error);
    throw error;
  }
}
 
// Example usage
async function performPoaVerification() {
  try {
    // 1. Get client token (implement based on auth documentation)
    const token = await getClientToken();
 
    // 2. Get document file (from file input or other source)
    const documentFile = document.getElementById('poa-document-input').files[0];
 
    if (!documentFile) {
      throw new Error('Please select a document file');
    }
 
    // 3. Custom options (optional)
    const options = {
      "poa_languages_allowed": {
        "en": true,
        "es": true,
        "fr": true
      },
      "poa_document_age_months": {
        "utility_bill": 3,
        "bank_statement": 3
      },
      "poa_name_mismatch_action": "DECLINE",
      "poa_document_issues_action": "DECLINE",
      "poa_expired_document_action": "DECLINE",
      "poa_unsupported_language_action": "DECLINE",
      "poa_address_mismatch_action": "DECLINE",
      "poa_issuer_not_identified_action": "DECLINE",
      "poa_issue_date_not_detected_action": "DECLINE"
    };
 
    // 4. Submit POA verification
    const result = await submitPoaVerification(
      token.access_token,
      documentFile,
      options
    );
 
    console.log('POA Verification result:', result);
    console.log(`Document type: ${result.poa.document_type}`);
    console.log(`Address: ${result.poa.formatted_address}`);
 
    return result;
  } catch (error) {
    console.error('Error:', error);
    throw error;
  }
}
import requests
import json
 
def submit_poa_verification(access_token, document_file, options=None):
    """
    Submit document for proof of address verification.
 
    Args:
        access_token (str): The access token for authentication.
        document_file (file): The proof of address document file.
        options (dict, optional): Customization options for POA verification.
 
    Returns:
        dict: The POA verification results.
    """
    url = "https://verification.didit.me/v2/poa/"
 
    headers = {
        "Authorization": f"Bearer {access_token}"
    }
 
    files = {
        "document": document_file
    }
 
    # Add options if provided
    data = {}
    if options:
        data['options'] = json.dumps(options)
 
    try:
        response = requests.post(url, headers=headers, files=files, data=data)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"Error in POA Verification: {e}")
        if hasattr(e, 'response') and e.response:
            print(f"Response: {e.response.text}")
        raise
 
# Example usage
def perform_poa_verification():
    try:
        # 1. Get client token (implement based on auth documentation)
        token = get_client_token()
 
        # 2. Get document file path
        document_path = "utility_bill.pdf"
 
        # 3. Custom options (optional)
        options = {
            "poa_languages_allowed": {
                "en": True,
                "es": True,
                "fr": True
            },
            "poa_document_age_months": {
                "utility_bill": 3,
                "bank_statement": 3
            },
            "poa_name_mismatch_action": "DECLINE",
            "poa_document_issues_action": "DECLINE",
            "poa_expired_document_action": "DECLINE",
            "poa_unsupported_language_action": "DECLINE",
            "poa_address_mismatch_action": "DECLINE",
            "poa_issuer_not_identified_action": "DECLINE",
            "poa_issue_date_not_detected_action": "DECLINE"
        }
 
        # 4. Submit POA verification
        with open(document_path, "rb") as doc_file:
            result = submit_poa_verification(
                token["access_token"],
                doc_file,
                options
            )
 
        print(f"POA Verification status: {result['poa']['status']}")
        print(f"Document type: {result['poa']['document_type']}")
        print(f"Address: {result['poa']['formatted_address']}")
 
        return result
    except Exception as e:
        print(f"Error: {e}")
        raise