← HAUL

Verification Credits

Email and phone verification via API. Buy credits, spend per check.

Overview

Verification Credits let your agent validate email addresses and phone numbers programmatically. No subscriptions, no minimums — buy a credit pack and spend per check.

Use cases:

  • -Outreach — clean your lead list before sending
  • -Onboarding — verify user emails at signup
  • -Data cleaning — bulk validate existing contacts

Getting an API Key

1. Buy a credit pack via POST /api/credits/topup

2. Complete payment through the Stripe checkout URL

3. Use your API key in the X-API-Key header on all requests

Endpoints

POST/api/tools/verify

Verify an email address or phone number. Requires X-API-Key header.

# Email verification
curl -X POST https://haul.aistudios.pro/api/tools/verify \
  -H "X-API-Key: haul_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"type":"email","value":"test@example.com"}'

Email response:

{
  "valid": true,
  "deliverable": true,
  "disposable": false,
  "role_account": false,
  "did_you_mean": null,
  "credits_remaining": 998
}

Phone response:

{
  "valid": true,
  "type": "mobile",
  "country": "ES",
  "credits_remaining": 996
}
POST/api/credits/topup

Buy credits via Stripe. Returns a checkout URL.

curl -X POST https://haul.aistudios.pro/api/credits/topup \
  -H "Content-Type: application/json" \
  -d '{"api_key":"haul_sk_xxx","amount_usd":10}'
{
  "checkout_url": "https://checkout.stripe.com/...",
  "credits_to_receive": 1000
}
GET/api/credits/balance

Check your current credit balance. Requires X-API-Key header.

curl https://haul.aistudios.pro/api/credits/balance \
  -H "X-API-Key: haul_sk_xxx"
{
  "credits": 1000,
  "api_key_label": "default"
}
GET/api/credits/confirm

Stripe redirect handler. Called automatically after successful payment. Credits the account and redirects to success page.

Credit Costs

email ............. 1 credit
phone ............. 2 credits

Pricing

$10 .............. 1,000 credits
$25 .............. 3,000 credits
$50 .............. 7,000 credits (bonus 1k)
$100 ............. 15,000 credits (bonus 5k)

Error Codes

401Invalid or missing API key
402Insufficient credits
     Returns: { credits_needed, credits_available }
422Invalid input (bad type or missing value)
500Upstream error (ZeroBounce unavailable)

Example: Agent Workflow

const API_KEY = "haul_sk_xxx";
const BASE = "https://haul.aistudios.pro";

async function verifyEmails(emails: string[]) {
  for (const email of emails) {
    const res = await fetch(`${BASE}/api/tools/verify`, {
      method: "POST",
      headers: {
        "X-API-Key": API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ type: "email", value: email }),
    });

    if (res.status === 402) {
      // Auto-topup when credits run out
      const topup = await fetch(`${BASE}/api/credits/topup`, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({ api_key: API_KEY, amount_usd: 25 }),
      });
      const { checkout_url } = await topup.json();
      console.log("Credits depleted. Top up:", checkout_url);
      return;
    }

    const data = await res.json();
    console.log(email, data.valid ? "valid" : "invalid");
  }
}

// Verify 500 emails
verifyEmails(emailList);