API Documentation
Complete API reference for integrating with DoNotContact.net's opt-out service
REST API
Rate Limited
JSON Responses
Documentation
API Overview
Base URL
https://api.donotcontact.netCampaign ID System
How Campaign IDs Work
- • Generated by us when you register via POST /campaign/register
- • UUID format (e.g., 12345678-1234-5678-9012-123456789012)
- • Internal identifier - NOT from FEC data
- • Used in all API calls to identify your campaign
API Key System
API Key Management
- • Auto-generated during campaign registration
- • Format: dnc_ prefix + 32 random characters
- • Usage: Include in X-API-Key header
- • Status: Disabled until campaign approval (24-48 hours)
Response Format
All API responses are in JSON format with consistent structure:
{
"success": true,
"data": { ... },
"timestamp": "2024-01-15T10:30:00Z",
"message": "Optional message"
}Error Handling
Error responses include HTTP status codes and descriptive messages:
{
"error": "Detailed error message",
"error_code": "VALIDATION_ERROR",
"timestamp": "2024-01-15T10:30:00Z"
}Rate Limits
Consumer API
100 requests/day
Campaign API
10,000 requests/day