API Documentation

Complete guide to integrating WebFunctions APIs into your applications.

REST API JSON Responses 200+ Endpoints 99.9% Uptime TSC SSH Tunneling

Getting Started

Welcome to the WebFunctions API documentation. Follow these steps to integrate our 200+ APIs into your application.

1

Contact Sales

Reach out to our sales team at webfunctions.net/contact to discuss your requirements and select a plan starting at $4,999/month for 1 million credits.

2

Get Your API Keys

Once your account is activated, log in to your dashboard at app.webfunctions.net and generate your API keys. Keep these keys secure and never expose them in client-side code.

3

Make Your First API Call

Use your API key to authenticate and make requests:

curl -X POST https://api.webfunctions.net/v1/email/validate \
  -H "Authorization: Bearer wf_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'
4

Monitor Your Usage

Track your credit consumption in real-time through your dashboard. Set up alerts at 50%, 80%, and 100% thresholds to avoid service interruption.

Base URL

All API requests should be made to:

https://api.webfunctions.net/v1

Authentication

All API requests require authentication using a Bearer token in the Authorization header.

Request Header

Authorization: Bearer wf_your_api_key_here

API Key Format

API keys are prefixed with wf_ followed by 48 alphanumeric characters.

wf_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4

Managing API Keys

  • Generate multiple keys for different environments (development, staging, production)
  • Rotate keys regularly for enhanced security
  • Revoke compromised keys immediately from your dashboard
  • Set IP whitelist restrictions for additional security (Enterprise plans)

Security Best Practices

  • Never expose API keys in client-side code or public repositories
  • Use environment variables to store API keys
  • Always make API requests from your server, not directly from browsers

Credits & Usage

WebFunctions uses a credit-based billing system. Each API call consumes credits based on the endpoint complexity.

Credit Consumption

API Category Credits per Call Examples
Standard Validation 1 credit Email validation, phone format check
Enhanced Lookup 2 credits IP geolocation, address verification
Identity & Fraud 5 credits Identity verification, fraud scoring
AI/ML Processing 5-10 credits Sentiment analysis, image recognition
Bulk Operations 1 credit/item Bulk email validation, batch processing

Checking Your Balance

Query your current credit balance and usage:

GET /v1/account/credits

// Response
{
  "credits_remaining": 847523,
  "credits_used": 152477,
  "credits_total": 1000000,
  "period_start": "2026-01-01T00:00:00Z",
  "period_end": "2026-01-31T23:59:59Z",
  "plan": "Starter"
}

Usage Headers

Every API response includes credit usage information in headers:

  • X-Credits-Used - Credits consumed by this request
  • X-Credits-Remaining - Credits remaining in your account
  • X-Credits-Reset - Unix timestamp when credits reset

Rate Limits

Rate limits are applied per API key to ensure service stability and fair usage across all customers.

Limits by Plan

Plan Requests/Second Monthly Credits
Starter 100 1,000,000
Growth 250 2,200,000
Business 500 6,250,000
Scale 1,000 14,000,000
Enterprise 2,500 33,000,000
Ultimate Custom 80,000,000

Rate Limit Headers

Each response includes headers to help you track your rate limit status:

  • X-RateLimit-Limit - Maximum requests per second
  • X-RateLimit-Remaining - Requests remaining in current window
  • X-RateLimit-Reset - Unix timestamp when the window resets

Handling Rate Limits

When you exceed your rate limit, the API returns a 429 status code. Implement exponential backoff in your retry logic and respect the Retry-After header.

Error Handling

The API uses standard HTTP status codes and returns detailed error information in JSON format.

HTTP Status Codes

Code Status Description
200 OK Request successful
201 Created Resource created successfully
400 Bad Request Invalid parameters or malformed request
401 Unauthorized Invalid or missing API key
403 Forbidden Insufficient permissions or credits
404 Not Found Endpoint or resource not found
429 Too Many Requests Rate limit or credit limit exceeded
500 Server Error Internal server error - please retry

Error Response Format

{
  "error": {
    "code": "invalid_parameter",
    "message": "The email address format is invalid",
    "param": "email",
    "doc_url": "https://webfunctions.net/docs#email-validation"
  },
  "request_id": "req_abc123xyz"
}

Webhooks

Receive real-time notifications when events occur. Configure webhook endpoints in your dashboard.

Supported Events

  • bulk.completed - Bulk operation finished processing
  • credits.low - Credits dropped below threshold (50%, 20%, 10%)
  • credits.depleted - All credits consumed
  • api_key.revoked - An API key was revoked

Webhook Payload

{
  "event": "bulk.completed",
  "timestamp": "2026-01-19T12:34:56Z",
  "data": {
    "job_id": "job_abc123",
    "total_records": 10000,
    "successful": 9850,
    "failed": 150,
    "download_url": "https://..."
  },
  "signature": "sha256=..."
}

Verifying Signatures

Always verify webhook signatures to ensure authenticity:

// Node.js example
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return `sha256=${expected}` === signature;
}

Email Validation

1 credit per request

Validate email addresses for format, DNS records, disposable status, and deliverability.

Endpoint

POST /v1/email/validate

Request

{
  "email": "user@example.com",
  "check_deliverability": true  // Optional, uses 1 additional credit
}

Response

{
  "email": "user@example.com",
  "valid": true,
  "format_valid": true,
  "mx_found": true,
  "mx_records": ["mx1.example.com", "mx2.example.com"],
  "disposable": false,
  "role_based": false,
  "free_provider": false,
  "deliverable": true,
  "catch_all": false,
  "score": 95,
  "suggestion": null
}

Response Fields

Field Type Description
validbooleanOverall validity assessment
format_validbooleanEmail format is syntactically correct
mx_foundbooleanDomain has valid MX records
disposablebooleanIs a disposable/temporary email
role_basedbooleanIs role-based (info@, support@, etc.)
free_providerbooleanIs from a free email provider
deliverablebooleanMailbox exists and accepts mail
scoreintegerQuality score 0-100
suggestionstring|nullSuggested correction for typos

Phone Validation

1-2 credits per request

Validate phone numbers for format, carrier information, and line type.

Endpoint

POST /v1/phone/validate

Request

{
  "phone": "+14155551234",
  "country_code": "US"  // Optional, for national format numbers
}

Response

{
  "valid": true,
  "phone_number": "+14155551234",
  "national_format": "(415) 555-1234",
  "international_format": "+1 415-555-1234",
  "country_code": "US",
  "country_name": "United States",
  "carrier": "Verizon Wireless",
  "line_type": "mobile",
  "is_ported": false
}

IP Geolocation

2 credits per request

Get detailed location and network information for any IP address.

Endpoint

GET /v1/ip/lookup?ip={ip_address}

Response

{
  "ip": "8.8.8.8",
  "type": "ipv4",
  "continent": "North America",
  "continent_code": "NA",
  "country": "United States",
  "country_code": "US",
  "region": "California",
  "region_code": "CA",
  "city": "Mountain View",
  "zip": "94035",
  "latitude": 37.386,
  "longitude": -122.0838,
  "timezone": "America/Los_Angeles",
  "utc_offset": "-08:00",
  "currency": "USD",
  "isp": "Google LLC",
  "organization": "Google Public DNS",
  "asn": "AS15169",
  "is_vpn": false,
  "is_proxy": false,
  "is_tor": false,
  "is_datacenter": true,
  "threat_score": 0
}

Address Verification

2 credits per request

Validate and standardize postal addresses with USPS and international support.

Endpoint

POST /v1/address/verify

Request

{
  "street": "1600 Amphitheatre Parkway",
  "city": "Mountain View",
  "state": "CA",
  "zip": "94043",
  "country": "US"
}

Response

{
  "valid": true,
  "deliverable": true,
  "standardized": {
    "street": "1600 AMPHITHEATRE PKWY",
    "city": "MOUNTAIN VIEW",
    "state": "CA",
    "zip": "94043-1351",
    "country": "US"
  },
  "components": {
    "primary_number": "1600",
    "street_name": "AMPHITHEATRE",
    "street_suffix": "PKWY",
    "city_name": "MOUNTAIN VIEW",
    "state_abbreviation": "CA",
    "zipcode": "94043",
    "plus4_code": "1351"
  },
  "metadata": {
    "latitude": 37.4224764,
    "longitude": -122.0842499,
    "time_zone": "America/Los_Angeles",
    "address_type": "commercial"
  }
}

Identity Verification

5 credits per request

Verify identity information against authoritative data sources.

Endpoint

POST /v1/identity/verify

Request

{
  "first_name": "John",
  "last_name": "Smith",
  "date_of_birth": "1990-01-15",
  "ssn_last4": "1234",  // Optional
  "address": {
    "street": "123 Main St",
    "city": "Anytown",
    "state": "CA",
    "zip": "90210"
  }
}

Response

{
  "verified": true,
  "confidence_score": 92,
  "checks": {
    "name_match": true,
    "dob_match": true,
    "ssn_match": true,
    "address_match": true
  },
  "alerts": [],
  "sources_checked": 3
}

Fraud Detection

5 credits per request

Real-time fraud scoring and risk assessment for transactions and signups.

Endpoint

POST /v1/fraud/assess

Request

{
  "email": "user@example.com",
  "ip_address": "192.168.1.1",
  "phone": "+14155551234",
  "transaction": {
    "amount": 99.99,
    "currency": "USD",
    "type": "purchase"
  },
  "device": {
    "user_agent": "Mozilla/5.0...",
    "fingerprint": "abc123"
  }
}

Response

{
  "risk_score": 15,
  "risk_level": "low",
  "recommendation": "approve",
  "signals": {
    "email_age_days": 1825,
    "email_disposable": false,
    "ip_proxy": false,
    "ip_country_match": true,
    "device_fingerprint_seen": true,
    "velocity_check": "pass"
  },
  "rules_triggered": []
}

SDKs & Libraries

Official SDKs are available for seamless integration in your preferred language.

JavaScript / Node.js

Python

PHP

Ruby

Go

Java

Installation Instructions

SDK installation commands and private repository access are available to authenticated customers.

Login to Access SDKs

Secure SSH Channel Tunneling (TSC Level)

For government agencies and enterprises requiring Top Secret Compartmented (TSC) level security, WebFunctions provides dedicated SSH tunnel endpoints for encrypted channel communications.

Security Clearance Required

TSC-level SSH tunneling is available exclusively for Enterprise and Ultimate plan customers with verified security clearance documentation. Contact your account manager to enable.

TSC Tunnel Endpoints

tsc-tunnel.webfunctions.net:22022
tsc-tunnel-failover.webfunctions.net:22022

SSH Tunnel Configuration

# ~/.ssh/config for TSC tunnel
Host wf-tsc-tunnel
    HostName tsc-tunnel.webfunctions.net
    Port 22022
    User wf_tsc_[YOUR_ORG_ID]
    IdentityFile ~/.ssh/webfunctions_tsc_ed25519
    LocalForward 8443 api-internal.webfunctions.net:443
    ServerAliveInterval 60
    ServerAliveCountMax 3
    StrictHostKeyChecking yes
    UserKnownHostsFile ~/.ssh/wf_known_hosts

Establishing Secure Tunnel

# Start the SSH tunnel
ssh -N -f wf-tsc-tunnel

# Verify tunnel is active
curl -s https://localhost:8443/v1/health \
  -H "Authorization: Bearer wf_tsc_your_api_key" \
  --cacert /path/to/webfunctions-tsc-ca.crt

# Response
{"status": "operational", "tunnel": "tsc-secured", "encryption": "AES-256-GCM"}

SDK Usage with TSC Tunnel

# Python TSC Example
from webfunctions import WebFunctionsClient, TSCTunnel

# Initialize TSC tunnel manager
tunnel = TSCTunnel(
    key_path="~/.ssh/webfunctions_tsc_ed25519",
    org_id="YOUR_ORG_ID",
    ca_cert="/path/to/webfunctions-tsc-ca.crt"
)

# Start secure tunnel
tunnel.connect()

# Initialize client with tunnel
client = WebFunctionsClient(
    api_key="wf_tsc_your_api_key",
    base_url="https://localhost:8443",
    tsc_mode=True,
    verify_ssl=tunnel.ca_cert
)

# Make TSC-secured API call
result = client.identity.verify_classified(
    subject_id="REDACTED",
    clearance_level="TSC",
    audit_log=True
)

# Always close tunnel when done
tunnel.disconnect()
// Node.js TSC Example
const { WebFunctionsClient, TSCTunnel } = require('@webfunctions/sdk-tsc');

async function secureLookup() {
    // Initialize TSC tunnel
    const tunnel = new TSCTunnel({
        keyPath: '~/.ssh/webfunctions_tsc_ed25519',
        orgId: 'YOUR_ORG_ID',
        caCert: '/path/to/webfunctions-tsc-ca.crt'
    });

    await tunnel.connect();

    const client = new WebFunctionsClient({
        apiKey: 'wf_tsc_your_api_key',
        baseUrl: 'https://localhost:8443',
        tscMode: true,
        caCert: tunnel.caCert
    });

    try {
        const result = await client.identity.verifyClassified({
            subjectId: 'REDACTED',
            clearanceLevel: 'TSC',
            auditLog: true
        });
        console.log(result);
    } finally {
        await tunnel.disconnect();
    }
}

secureLookup();

TSC Security Features

  • End-to-End Encryption: AES-256-GCM encryption with perfect forward secrecy
  • Certificate Pinning: Hardware-bound certificates with HSM key storage
  • Mutual TLS: Client certificate authentication required for all requests
  • Air-Gapped Deployment: Available for on-premise isolated network installations
  • FIPS 140-3 Compliance: All cryptographic modules are FIPS 140-3 Level 3 certified
  • Full Audit Logging: Immutable audit trail with tamper-evident logging to SIEM

TSC Onboarding

To enable TSC-level SSH tunneling, contact your dedicated account manager or email tsc-support@webfunctions.net with your organization's security documentation and FedRAMP authorization details.

Don't see your language? The REST API works with any HTTP client. Request an SDK

Postman Collection

Import our Postman collection to quickly explore and test all API endpoints.

Changelog

Recent updates and changes to the WebFunctions API.

v2.1.0 January 15, 2026
  • • Added quantum computing API endpoints
  • • New AI/ML sentiment analysis API
  • • Improved fraud detection accuracy
  • • Added bulk processing webhooks
v2.0.0 December 1, 2025
  • • Major version release with credit-based billing
  • • New base URL: api.webfunctions.net
  • • Added 50+ new API endpoints
  • • Enhanced rate limit headers
v1.5.0 October 15, 2025
  • • Added identity verification endpoints
  • • Improved email deliverability checking
  • • New webhook events for credit alerts

Need Help?

Our technical team is here to help you integrate WebFunctions into your application.