API Reference
FireGlue provides a REST API for integrating with platform features programmatically.
Base URL
Production: https://app.fireglue.com/api/
Authentication
FireGlue uses JWT (JSON Web Token) authentication. Include the access token in the Authorization header:
Authorization: Bearer <your_access_token>
Getting Access Tokens
POST /api/token/
Content-Type: application/json
{
"username": "your_username",
"password": "your_password"
}
Response:
{
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
Token Refresh
POST /api/token/refresh/
Content-Type: application/json
{
"refresh": "your_refresh_token"
}
Rate Limiting
- Standard endpoints: 1000 requests per hour
- Health monitoring: 100 requests per hour
Rate limit headers are included in responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
Response Format
All API responses follow Django REST Framework pagination format:
Success Response
{
"count": 25,
"next": "https://app.fireglue.com/api/agents/?page=2",
"previous": null,
"results": [...]
}
Error Response
{
"error": "Error message",
"details": "Additional error details"
}
HTTP Status Codes
200
- Success201
- Created400
- Bad Request401
- Unauthorized403
- Forbidden404
- Not Found429
- Rate Limited500
- Internal Server Error
Core Endpoints
Health Check
System Health
GET /api/health/
Response:
{
"status": "healthy",
"timestamp": "2025-10-09T18:30:00Z",
"version": "1.0.0"
}
User Management
Get Current User
GET /api/user/
Update User Profile
PATCH /api/profile/
Content-Type: application/json
{
"first_name": "John",
"last_name": "Doe",
"mailgun_api_key": "your_api_key",
"mailgun_domain": "your_domain"
}
Agents
List Agents
GET /api/agents/
Query Parameters:
page
- Page numbersearch
- Search by name or emailcity
- Filter by cityesp
- Filter by email service provideresg
- Filter by email service groupemail_validity
- Filter by email validity statusdata_health_flags
- Filter by data health flags
Download Agents
GET /api/agents/download/
Query Parameters:
format
- Export format (csv
,xlsx
)city
- Filter by cityesp
- Filter by email service provideresg
- Filter by email service groupemail_validity
- Filter by email validity status
Outreach System
Health Stats
GET /api/outreach/health-stats/
Response:
{
"total_domains": 5,
"healthy_domains": 4,
"unhealthy_domains": 1,
"avg_health_score": 85.2
}
Dashboard Stats
GET /api/outreach/dashboard/stats/
Health Alerts
GET /api/outreach/health-alerts/
Query Parameters:
resolved
- Filter by resolved status (true
/false
)ordering
- Order by field (-detected_at
,severity
)
Status Page API
System Status Overview
GET /api/status/overview/
Response:
{
"overall_status": "operational",
"components": [
{
"id": 1,
"name": "api_service",
"display_name": "API Service",
"current_status": "operational",
"uptime_percentage": 99.9,
"last_checked": "2025-10-09T18:30:00Z"
}
],
"incidents": [],
"uptime_stats": {},
"last_updated": "2025-10-09T18:30:00Z"
}
Trigger Health Checks
GET /api/status/health-check/
Get Incidents
GET /api/status/incidents/
Query Parameters:
status
- Filter by incident status (investigating
,identified
,monitoring
,resolved
)limit
- Limit results (1-100, default 50)
Get Incident Details
GET /api/status/incidents/{incident_id}/
Email Templates
List Email Templates
GET /api/email-templates/
Create Email Template
POST /api/email-templates/
Content-Type: application/json
{
"name": "Welcome Email",
"subject": "Welcome to FireGlue",
"html_content": "<p>Welcome to our platform!</p>",
"text_content": "Welcome to our platform!"
}
Update Email Template
PUT /api/email-templates/{id}/
Content-Type: application/json
{
"name": "Updated Welcome Email",
"subject": "Welcome to FireGlue",
"html_content": "<p>Welcome to our platform!</p>",
"text_content": "Welcome to our platform!"
}
Platform Configuration
Get Branding Configuration
GET /api/branding/
Response:
{
"logo_app_url": "https://app.fireglue.com/media/logos/logo.png",
"logo_square_url": "https://app.fireglue.com/media/logos/logo_square.png",
"logo_email_url": "https://app.fireglue.com/media/logos/logo_email.png",
"logo_login_url": "https://app.fireglue.com/media/logos/logo_login.png"
}
Get Tracking Scripts
GET /api/tracking/
Response:
{
"header_script": "<script>// Custom header script</script>",
"body_script": "<script>// Custom body script</script>",
"footer_script": "<script>// Custom footer script</script>",
"facebook_pixel_id": "123456789",
"google_analytics_id": "GA-XXXXXXXXX"
}
Filter Options
Get Cities
GET /api/cities/
Get Email Service Providers
GET /api/esps/
Get Email Service Groups
GET /api/esgs/
Get Email Validity Options
GET /api/email-validity-options/
Get Data Health Flags
GET /api/data-health-flags/
Two-Factor Authentication
Setup 2FA
GET /api/2fa/setup/
Response:
{
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"secret": "JBSWY3DPEHPK3PXP"
}
Enable 2FA
POST /api/2fa/enable/
Content-Type: application/json
{
"otp": "123456"
}
Disable 2FA
POST /api/2fa/disable/
Content-Type: application/json
{
"password": "your_password"
}
Contact Form (Public)
Submit Contact Form
POST /api/contact-form/
Content-Type: application/json
{
"name": "John Doe",
"email": "[email protected]",
"company": "Acme Corp",
"inquiry_type": "support",
"subject": "Need Help",
"message": "I need assistance with..."
}
Error Handling
All API errors return appropriate HTTP status codes and error messages:
{
"error": "Authentication required",
"details": "Please provide a valid access token"
}
Support
Need help with the API?