API Test Mode

API Test Mode

Fuego provides a convenient test mode for developers to test their API integrations without consuming credits or affecting real enrichment data. Test mode is only available with development API keys, allowing you to simulate different enrichment scenarios during development and testing.

How to Use Test Mode

To use test mode, include the test_mode parameter in your API requests along with your development API key:

GET https://app.gofuego.io/api/v1/enrich?email=address@example.com&token=YOUR_DEV_API_KEY&test_mode=MODE

Replace MODE with one of the available test modes described below.

Available Test Modes

Test Mode Description
enterprise Simulates an email from a large business (~25,000 employees)
smb Simulates an email from a small business (~42 employees). This is the default for development keys when test_mode is omitted
education Simulates an email from a university
government Simulates an email from a government agency
nonprofit Simulates an email from a nonprofit organization
individual Simulates a personal email on a free provider
disposable Simulates a throwaway email address
invalid Simulates a syntactically invalid address
random Returns one of the above at random

Example Requests

# Simulate an enterprise signup
curl -X GET "https://app.gofuego.io/api/v1/enrich?email=kochanski@jmc.com&token=YOUR_DEV_API_KEY&test_mode=enterprise"

# Simulate an SMB signup (default)
curl -X GET "https://app.gofuego.io/api/v1/enrich?email=rimmer@jmc.com&token=YOUR_DEV_API_KEY&test_mode=smb"

# Simulate an individual on a free provider
curl -X GET "https://app.gofuego.io/api/v1/enrich?email=lister@gmail.com&token=YOUR_DEV_API_KEY&test_mode=individual"

# Simulate a disposable address
curl -X GET "https://app.gofuego.io/api/v1/enrich?email=rimmer@trashmail.example&token=YOUR_DEV_API_KEY&test_mode=disposable"

# Simulate an invalid address
curl -X GET "https://app.gofuego.io/api/v1/enrich?email=not-an-email&token=YOUR_DEV_API_KEY&test_mode=invalid"

# Random results
curl -X GET "https://app.gofuego.io/api/v1/enrich?email=holly@jmc.com&token=YOUR_DEV_API_KEY&test_mode=random"

Response Details

Each test mode returns a simulated response in exactly the same shape as a production response.

Enterprise (test_mode=enterprise)

{
  "success": true,
  "email": "kochanski@jmc.com",
  "user": "kochanski",
  "domain": "jmc.com",
  "syntax_valid": true,
  "did_you_mean": null,
  "normalized_email": "kochanski@jmc.com",
  "disposable": false,
  "free": false,
  "role": false,
  "plus_address": false,
  "has_mx": true,
  "category": "enterprise",
  "risk": "low",
  "organization": {
    "name": "Jmc Corporation",
    "industry": "Computer and Electronic Product Manufacturing",
    "country": "US",
    "ticker": "JMC",
    "employees": 25000,
    "employee_range": "10000+",
    "description": "A large test corporation for jmc.com."
  }
}

SMB (test_mode=smb, default)

{
  "success": true,
  "email": "rimmer@jmc.com",
  "user": "rimmer",
  "domain": "jmc.com",
  "syntax_valid": true,
  "did_you_mean": null,
  "normalized_email": "rimmer@jmc.com",
  "disposable": false,
  "free": false,
  "role": false,
  "plus_address": false,
  "has_mx": true,
  "category": "smb",
  "risk": "low",
  "organization": {
    "name": "Jmc LLC",
    "industry": "Professional, Scientific, and Technical Services",
    "country": "US",
    "ticker": null,
    "employees": 42,
    "employee_range": "11-50",
    "description": "A small test business for jmc.com."
  }
}

Individual (test_mode=individual)

{
  "success": true,
  "email": "lister@gmail.com",
  "user": "lister",
  "domain": "gmail.com",
  "syntax_valid": true,
  "did_you_mean": null,
  "normalized_email": "lister@gmail.com",
  "disposable": false,
  "free": true,
  "role": false,
  "plus_address": false,
  "has_mx": true,
  "category": "individual",
  "risk": "low",
  "organization": {
    "name": null,
    "industry": null,
    "country": null,
    "ticker": null,
    "employees": null,
    "employee_range": null,
    "description": null
  }
}

Disposable (test_mode=disposable)

{
  "success": true,
  "email": "rimmer@trashmail.example",
  "user": "rimmer",
  "domain": "trashmail.example",
  "syntax_valid": true,
  "did_you_mean": null,
  "normalized_email": "rimmer@trashmail.example",
  "disposable": true,
  "free": false,
  "role": false,
  "plus_address": false,
  "has_mx": true,
  "category": "disposable",
  "risk": "high",
  "organization": {
    "name": null,
    "industry": null,
    "country": null,
    "ticker": null,
    "employees": null,
    "employee_range": null,
    "description": null
  }
}

Invalid (test_mode=invalid)

{
  "success": true,
  "email": "not-an-email",
  "user": null,
  "domain": "not-an-email",
  "syntax_valid": false,
  "did_you_mean": null,
  "normalized_email": null,
  "disposable": false,
  "free": false,
  "role": false,
  "plus_address": false,
  "has_mx": false,
  "category": "unknown",
  "risk": "high",
  "organization": {
    "name": null,
    "industry": null,
    "country": null,
    "ticker": null,
    "employees": null,
    "employee_range": null,
    "description": null
  }
}

Education, Government, Nonprofit, and Random

  • test_mode=education returns category: "education" with a simulated university (e.g. “University of Jmc”, industry “Educational Services”).
  • test_mode=government returns category: "government" with a simulated agency (industry “Executive, Legislative, and Other General Government Support”).
  • test_mode=nonprofit returns category: "nonprofit" with a simulated foundation (industry “Religious, Grantmaking, Civic, Professional, and Similar Organizations”).
  • test_mode=random returns one of the test modes above at random, weighted toward common results — useful for testing how your application handles a realistic mix.

Important Notes

  • Test mode is only available with development API keys
  • Production API keys ignore the test_mode parameter and perform real enrichments
  • Test mode does not consume credits
  • Test mode does not affect your usage statistics or reports
  • Test responses use the exact same field structure as production responses

Integration Examples

JavaScript

async function testEnrichment(email, testMode = 'smb') {
  const params = new URLSearchParams({
    token: "YOUR_DEV_API_KEY",
    email: email,
    test_mode: testMode
  });

  const response = await fetch(`https://app.gofuego.io/api/v1/enrich?${params.toString()}`);
  return response.json();
}

// Example usage:
testEnrichment('kochanski@jmc.com', 'enterprise')
  .then(result => console.log(result.category)) // "enterprise"
  .catch(error => console.error(error));

Python

import requests

def test_enrichment(email, test_mode='smb'):
    params = {
        "token": "YOUR_DEV_API_KEY",
        "email": email,
        "test_mode": test_mode
    }

    response = requests.get(
        "https://app.gofuego.io/api/v1/enrich",
        params=params
    )
    return response.json()

# Example usage:
result = test_enrichment('rimmer@trashmail.example', 'disposable')
print(result["risk"])  # "high"

Ruby

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

def test_enrichment(email, test_mode = 'smb')
  uri = URI("https://app.gofuego.io/api/v1/enrich")
  uri.query = URI.encode_www_form(
    token: "YOUR_DEV_API_KEY",
    email: email,
    test_mode: test_mode
  )

  response = Net::HTTP.get(uri)
  JSON.parse(response)
end

# Example usage:
result = test_enrichment('lister@gmail.com', 'individual')
puts result["category"] # "individual"

Best Practices

  • Use test mode during development and testing, then switch to production API keys for live environments
  • Test all the scenarios your application needs to handle: enterprise routing, disposable blocking, invalid input, individuals, and the education/government/nonprofit categories
  • Use test_mode=random to test how your application handles varying distributions of results
  • Consider using environment variables to manage different API keys between development and production environments