API Controller Documentation

API Controller Documentation

Overview

The `ApiController` manages core API operations including email verification, file processing, and API key authentication.

All endpoints require an API key unless otherwise specified.

Endpoint Specifications

API Reference

Bulk Operations & Files

POST /verifApiFile

Description: Verify a file of email addresses.

Parameters

NameTypeDescription
secretstringAPI key
filemultipart/form-dataEmail list file

Responses

StatusBody
200 OK
10998
401 Unauthorized
Invalid key
402 Payment Required
Insufficient credit

POST /bulk

Description: Upload a bulk file for processing.

Parameters

NameTypeDescription
secretstringAPI key
filemultipart/form-dataFile to upload

Responses

StatusBody
200 OK
{
  "success": true,
  "id": 10952,
  "job_id": 1751481492,
  "message": "",
  "filename": "5kphones.csv"
}
401 Unauthorized
Invalid key
402 Payment Required
Insufficient credit

GET /file

Description: Download a processed file.

Parameters

NameTypeDescription
secretstringAPI key
idstringFile ID
typestringFile type

Responses

StatusBody
200 OK
File content (binary)
401 Unauthorized
Invalid key
404 Not Found
File not found

GET /fileOld

Description: Legacy endpoint for downloading processed files.

Parameters

NameTypeDescription
secretstringAPI key
idstringFile ID
typestringFile type

Responses

StatusBody
200 OK
{
  "status": "success",
  "message": "File downloaded successfully",
  "file_url": "https://example.com/file.zip"
}
400 Bad Request
Missing parameters
401 Unauthorized
Invalid key
404 Not Found
File not found

Zapier Integration Endpoints

GET /zapier-auth

Description: Authenticates API keys for Zapier integration.

Parameters

ParameterTypeRequiredDescription
api_keystringYesUser’s API key

Responses

StatusBody
200 OK
{
  "status": "success",
  "message": "API Key is valid",
  "user_id": 12345,
  "key_name": "My Production Key"
}
401 Unauthorized
{
  "error": "Invalid API Key",
  "message": "The provided API Key is not valid"
}

POST /verify-single-email-zap

Description: Verifies a single email address via Zapier.

Parameters

ParameterLocationTypeRequiredDescription
api_keyQuerystringYesUser’s API key
emailBodystringYesEmail to verify

Responses

StatusBody
200 OK
{
  "status": "success",
  "verification_result": "valid",
  "timestamp": 1678901234
}
400 Bad Request
{
  "status": "error",
  "code": 400,
  "error": "missing_parameters",
  "message": "Parameters \"api_key\" and \"email\" are required"
}
401 Unauthorized
{
  "status": "error",
  "code": 401,
  "error": "invalid_key",
  "message": "API key is not valid"
}
402 Payment Required
{
  "status": "error",
  "code": 402,
  "error": "insufficient_credit",
  "message": "Not enough credits"
}
500 Server Error
{
  "status": "error",
  "code": 500,
  "error": "verification_service_unavailable",
  "message": "Email verification service is currently unavailable"
}

Verification Result Codes

CodeDescription
validEmail address is valid
invalidEmail address is invalid
unknownVerification status could not be determined
catch-allDomain accepts all emails
disposableTemporary/disposable email address

Status Code Reference

API Reference

Bulk Operations & Files

POST /verifApiFile

Description: Verify a file of email addresses.

Parameters

NameTypeDescription
secretstringAPI key
filemultipart/form-dataEmail list file

Responses

StatusBody
200 OK
10998
401 Unauthorized
Invalid key
402 Payment Required
Insufficient credit

POST /bulk

Description: Upload a bulk file for processing.

Parameters

NameTypeDescription
secretstringAPI key
filemultipart/form-dataFile to upload

Responses

StatusBody
200 OK
{"success":true,"id":10952,"job_id":1751481492,"message":"","filename":"5kphones.csv"}
401 Unauthorized
Invalid key
402 Payment Required
Insufficient credit

GET /file

Description: Download a processed file.

Parameters

NameTypeDescription
secretstringAPI key
idstringFile ID
typestringFile type

Responses

StatusBody
200 OK
File content (binary)
401 Unauthorized
Invalid key
404 Not Found
File not found

GET /fileOld

Description: Legacy endpoint for downloading processed files.

Parameters

NameTypeDescription
secretstringAPI key
idstringFile ID
typestringFile type

Responses

StatusBody
200 OK
{"status":"success","message":"File downloaded successfully","file_url":"https://example.com/file.zip"}
400 Bad Request
Missing parameters
401 Unauthorized
Invalid key
404 Not Found
File not found

Bulk Operations section formatting complete and styled consistently.

Status Codes

The following status codes may be returned by the API:

CodeDescriptionCommon Endpoints
200SuccessAll endpoints
400Missing/invalid parametersAll endpoints
401Invalid API keyAuthenticated endpoints
402Insufficient creditEmail verification endpoints
404Resource not found/file, /fileOld

Usage Guidelines

API Reference

Bulk Operations & Files

POST /verifApiFile

Description: Verify a file of email addresses.

Parameters

NameTypeDescription
secretstringAPI key
filemultipart/form-dataEmail list file

Responses

StatusBody
200 OK
10998
401 Unauthorized
Invalid key
402 Payment Required
Insufficient credit

POST /bulk

Description: Upload a bulk file for processing.

Parameters

NameTypeDescription
secretstringAPI key
filemultipart/form-dataFile to upload

Responses

StatusBody
200 OK
{"success":true,"id":10952,"job_id":1751481492,"message":"","filename":"5kphones.csv"}
401 Unauthorized
Invalid key
402 Payment Required
Insufficient credit

GET /file

Description: Download a processed file.

Parameters

NameTypeDescription
secretstringAPI key
idstringFile ID
typestringFile type

Responses

StatusBody
200 OK
File content (binary)
401 Unauthorized
Invalid key
404 Not Found
File not found

GET /fileOld

Description: Legacy endpoint for downloading processed files.

Parameters

NameTypeDescription
secretstringAPI key
idstringFile ID
typestringFile type

Responses

StatusBody
200 OK
{"status":"success","message":"File downloaded successfully","file_url":"https://example.com/file.zip"}
400 Bad Request
Missing parameters
401 Unauthorized
Invalid key
404 Not Found
File not found

Bulk Operations section formatting complete and styled consistently.

Additional Notes

  • Authentication: Standard endpoints use secret parameter. Zapier endpoints use api_key parameter.
  • Credit System: Email verification consumes credit; 402 indicates insufficient balance.
  • File Downloads: Use /file for current files, /fileOld for legacy files.
  • Zapier Integration: Endpoints with Zap suffix (/zapierAuth, /verifySingleEmailZap) are Zapier-optimized.

Status Codes

The following status codes may be returned by the API:

CodeDescriptionCommon Endpoints
200SuccessAll endpoints
400Missing/invalid parametersAll endpoints
401Invalid API keyAuthenticated endpoints
402Insufficient creditEmail verification endpoints
404Resource not found/file, /fileOld