Getting Started
Verification Methods
Results & Support
Legal

API Verification

The Fuego API allows you to verify email addresses in real-time directly from your application. This is ideal for verifying emails at the point of collection, such as during user registration or lead capture.

API Basics

  • Base URL: https://app.fuegoverify.com/api/v1/
  • Authentication: API token (required for all requests)
  • Rate Limit: 10 requests per second
  • Format: JSON

Authentication

Fuego uses API tokens for authentication. You must include your token with every request using one of these methods:

Method 1: Query Parameter

Add your token as a query parameter:

https://app.fuegoverify.com/api/v1/verify?token=YOUR_API_TOKEN&[email protected]

Method 2: Authorization Header

Send your token in the Authorization header (preferred for security):

Authorization: Bearer YOUR_API_TOKEN

Keep your API token secure - never expose it in client-side code or public repositories.

Getting Started

  1. Log in to your Fuego account at app.fuegoverify.com
  2. Navigate to “API Settings” in your account dashboard
  3. Generate a new API token
  4. Use this token in your API requests as shown above

Verifying an Email

Endpoint

GET https://app.fuegoverify.com/api/v1/verify

Parameters

Parameter Required Description
token Yes Your API token
email Yes The email address to verify
force No Set to “true” to force a fresh verification instead of using cached results

Example Request

# Using query parameter
curl -X GET "https://app.fuegoverify.com/api/v1/verify?token=YOUR_API_TOKEN&[email protected]"

# Using Authorization header (recommended)
curl -X GET "https://app.fuegoverify.com/api/v1/[email protected]" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Example Response

{
  "email": "[email protected]",
  "result": "deliverable",
  "reason": "accepted_email",
  "role": false,
  "cached": true,
  "free": false,
  "disposable": false,
  "accept_all": true,
  "did_you_mean": null,
  "domain": "jmc.com",
  "user": "lister",
  "success": true,
  "domain_insight": {
    "category": "organization",
    "name": "Jupiter Mining Corporation",
    "industry": "Mining",
    "country": "UK",
    "ticker": "JMC",
    "employees": 58000,
    "description": "Jupiter Mining Corporation is a large mining conglomerate that operates throughout the solar system, specializing in mineral extraction and deep space exploration."
  }
}

Response Fields

Field Type Description
email string The email address that was verified
result string The verification result: “deliverable”, “undeliverable”, “risky”, or “unknown”
reason string Specific reason for the result (see Understanding Results guide)
role boolean Whether the email is a role-based address (e.g., info@, support@)
cached boolean Whether this result was from cache or a fresh verification
free boolean Whether the email uses a free provider (e.g., gmail.com)
disposable boolean Whether the email uses a disposable or temporary service
accept_all boolean Whether the domain accepts all emails without validation
did_you_mean string/null Suggested correction for typos or null if no suggestion
domain string The domain part of the email address
user string The username part of the email address
success boolean Whether the API request was successful
domain_insight object/string Information about the organization behind the domain or message if unavailable

Integration Examples

JavaScript

async function verifyEmail(email, forceRefresh = false) {
  // Method 1: Using query parameters
  const params = new URLSearchParams({
    token: "YOUR_API_TOKEN",
    email: email
  });
  
  if (forceRefresh) {
    params.append("force", "true");
  }
  
  const response = await fetch(`https://app.fuegoverify.com/api/v1/verify?${params.toString()}`);
  const data = await response.json();
  return data;
  
  // Method 2: Using Authorization header (recommended)
  /*
  const params = new URLSearchParams({
    email: email
  });
  
  if (forceRefresh) {
    params.append("force", "true");
  }
  
  const response = await fetch(
    `https://app.fuegoverify.com/api/v1/verify?${params.toString()}`, 
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_TOKEN'
      }
    }
  );
  const data = await response.json();
  return data;
  */
}

Python

import requests

def verify_email(email, force_refresh=False):
    # Method 1: Using query parameters
    params = {
        "token": "YOUR_API_TOKEN", 
        "email": email
    }
    
    if force_refresh:
        params["force"] = "true"
        
    response = requests.get(
        "https://app.fuegoverify.com/api/v1/verify",
        params=params
    )
    return response.json()
    
    # Method 2: Using Authorization header (recommended)
    """
    params = {
        "email": email
    }
    
    if force_refresh:
        params["force"] = "true"
        
    headers = {
        "Authorization": "Bearer YOUR_API_TOKEN"
    }
    
    response = requests.get(
        "https://app.fuegoverify.com/api/v1/verify",
        headers=headers,
        params=params
    )
    return response.json()
    """

Ruby

require 'net/http'
require 'json'
require 'uri'

def verify_email(email, force_refresh = false)
  # Method 1: Using query parameters
  uri = URI("https://app.fuegoverify.com/api/v1/verify")
  params = { token: "YOUR_API_TOKEN", email: email }
  params[:force] = "true" if force_refresh
  
  uri.query = URI.encode_www_form(params)
  
  response = Net::HTTP.get(uri)
  JSON.parse(response)
  
  # Method 2: Using Authorization header (recommended)
  =begin
  uri = URI("https://app.fuegoverify.com/api/v1/verify")
  params = { email: email }
  params[:force] = "true" if force_refresh
  
  uri.query = URI.encode_www_form(params)
  
  request = Net::HTTP::Get.new(uri)
  request["Authorization"] = "Bearer YOUR_API_TOKEN"
  
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  response = http.request(request)
  
  JSON.parse(response.body)
  =end
end

Best Practices

  • Store your API token securely and never expose it in client-side code
  • Implement proper error handling in your integration
  • Utilize our built-in caching system - we automatically cache results for:
    • 6 months for deliverable emails
    • 3 months for undeliverable emails
    • 2 hours for risky and unknown results
  • Use the force=true parameter only when you need a fresh verification
  • Use webhook notifications for long-running batch verifications
  • Implement rate limiting in your application to stay within API limits

Error Handling

The API will return HTTP status codes to indicate success or failure:

  • 200: Success
  • 400: Bad request (invalid parameters)
  • 401: Unauthorized (invalid API token)
  • 422: Unprocessable entity (invalid email format)
  • 429: Too many requests (rate limit exceeded)
  • 500: Server error

Error Response Format

When an error occurs, the API will return a JSON response with details:

{
  "error": "Invalid email format",
  "email": "invalid-email",
  "result": "undeliverable",
  "reason": "invalid_email"
}

For technical errors not related to email validation, the response will include:

{
  "error": "Error message",
  "success": false
}

Handling Email Format Errors

When an email has an invalid format, our system will still attempt to provide a useful response with result and reason fields to help you handle the case appropriately in your application.

For more information on interpreting verification results, see our Understanding Results guide.