Interest accrues daily until your balance is paid.

API Documentation

Integrate with Brevitax to export your data and receive leads from external sources using our REST API.

Getting Started

The Brevitax API provides two core capabilities: data exports for getting your leads and cases out of Brevitax, and webhook endpoints for receiving leads from external sources like your website, CRM, or lead generation tools.

Authentication

All API requests require authentication using an API key passed in the x-api-key header. Contact your account manager to obtain API keys for your organization.

Security Note: API keys provide full access to your data. Store them securely and never expose them in client-side code.

Base URL

Replace your-subdomain with your actual subdomain (e.g., pastdu, main, etc.):

https://your-subdomain.brevitax.com/api

Example: If your subdomain is "main", your base URL would be:
https://main.brevitax.com/api

Export Endpoints

Export your data in JSON or CSV format for integration with CRMs, reporting tools, or data analysis.

Export Leads

GET/api/exports/leads

Export all promotional leads with contact information and lead sources.

Query Parameters:

  • format - Response format: json (default) or csv

Headers:

  • x-api-key - Your API key (required)

Export Users

GET /api/exports/users

Export user accounts with subscription and profile information.

Query Parameters:

  • format - Response format: json (default) or csv

Response Fields:

  • id - User ID
  • user_uuid - Unique identifier
  • full_name - User name
  • email - Email address
  • role - User role
  • subscription_status - Subscription state
  • subscription_tier - Service level
  • email_verified - Email verification status
  • created_at - Account creation date
  • last_login_at - Last login timestamp

Export Tax Cases

GET /api/exports/tax-cases

Export tax resolution cases with client information and case details.

Query Parameters:

  • format - Response format: json (default) or csv

Response Fields:

  • id - Case ID
  • user_id - Associated user
  • client_name - Client name
  • client_email - Client email
  • client_phone - Client phone
  • selected_program - Tax relief program
  • problem_type - Type of tax issue
  • amount_owed - Tax debt amount
  • completion_percentage - Case progress
  • created_at - Case creation date

Webhook Endpoints

Receive leads and tax cases from external sources like your website, landing pages, or lead generation tools.

Receive Leads

POST/api/webhooks/leads

Submit new leads to Brevitax from external sources.

Headers:

  • x-api-key - Your API key (required)
  • Content-Type: application/json

Request Body:

Request Body
{
  "full_name": "John Smith",           // Required
  "email": "john@example.com",         // Required  
  "phone": "+1-555-123-4567",         // Optional
  "message": "Interested in tax help", // Optional
  "lead_source": "website_form",       // Optional
  "taxfirm_id": 123                   // Optional
}

Response:

Response
{
  "success": true,
  "message": "Lead created successfully",
  "data": {
    "id": 456,
    "full_name": "John Smith",
    "email": "john@example.com",
    "created_at": "2025-01-21T10:30:00Z"
  }
}

Receive Tax Cases

POST/api/webhooks/tax-cases

Submit complete tax cases with detailed client information.

Headers:

  • x-api-key - Your API key (required)
  • Content-Type: application/json

Request Body:

Request Body
{
  "user_email": "client@example.com",     // Required
  "full_name": "Jane Doe",                // Required
  "phone": "+1-555-987-6543",            // Optional
  "selected_program": "offer_in_compromise", // Optional
  "tax_problem_data": {                   // Optional
    "problem_type": "back_taxes",
    "amount_owed": "25000",
    "years_affected": ["2020", "2021", "2022"]
  },
  "personal_info": {                      // Optional
    "address": "123 Main St",
    "city": "Anytown",
    "state": "CA",
    "zip": "12345"
  },
  "taxfirm_id": 123                      // Optional
}

API Key Management

Manage your API keys programmatically (requires admin access).

Create API Key

POST/api/auth/api-keys

Generate a new API key with specific permissions.

Headers:

  • x-admin-key - Admin key (required)

Request Body:

Request Body
{
  "key_name": "CRM Integration",
  "permissions": ["read", "write"],
  "taxfirm_id": 123,
  "expires_in_days": 365
}

Validate API Key

POST/api/auth/validate

Check if an API key is valid and view its permissions.

Headers:

  • x-api-key - API key to validate

Error Handling

The API uses standard HTTP status codes:

  • 200 - Success
  • 201 - Created (for webhook submissions)
  • 400 - Bad Request (missing required fields)
  • 401 - Unauthorized (invalid API key)
  • 500 - Internal Server Error

Integration Examples

Export to Salesforce

Export to Salesforce
// Export leads and sync to Salesforce
const response = await fetch('https://your-subdomain.brevitax.com/api/exports/leads?format=json', {
  headers: { 'x-api-key': 'your-api-key' }
});
const { data: leads } = await response.json();

// Process leads and sync to Salesforce CRM
leads.forEach(lead => {
  // Your Salesforce integration logic
});

Receive Website Leads

Website Form Integration
// Send form submission to Brevitax
const formData = {
  full_name: document.getElementById('name').value,
  email: document.getElementById('email').value,
  phone: document.getElementById('phone').value,
  message: document.getElementById('message').value,
  lead_source: 'contact_form'
};

fetch('https://your-subdomain.brevitax.com/api/webhooks/leads', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'your-api-key'
  },
  body: JSON.stringify(formData)
});

Ready to Integrate?

Contact our team to get your API keys and start integrating with your existing systems.

Get API Access