Skip to main content
API Reference

API Reference

Base URL:https://api.taxwhizz.ai/api/v1

Authentication

All authenticated endpoints require a JWT Bearer token in the Authorization header. Obtain tokens via the /auth/login endpoint.

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Access tokens expire after 15 minutes. Use the /auth/refresh endpoint with your refresh token to obtain a new access token. Refresh tokens are valid for 7 days.

Rate Limits

TierRate Limit
Free100/day
Starter1,000/day
Professional10,000/day
Business50,000/day
AdvisorUnlimited

Status Codes

CodeMeaningDescription
200OKRequest succeeded
201CreatedResource created successfully
400Bad RequestInvalid parameters or request body
401UnauthorizedMissing or invalid authentication token
403ForbiddenInsufficient permissions or tier access
404Not FoundRequested resource does not exist
429Too Many RequestsRate limit exceeded for your tier
500Internal Server ErrorUnexpected server error

Endpoints

POST/auth/register
POST/auth/login
POST/auth/refresh
GET/auth/me

Examples

Login & Get Tokens

POST/auth/login
// Request
POST /api/v1/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "your_password"
}

// Response 200
{
  "user": {
    "id": "uuid-here",
    "email": "user@example.com",
    "full_name": "John Smith",
    "subscription_tier": "professional"
  },
  "tokens": {
    "access_token": "eyJhbG...",
    "refresh_token": "eyJhbG...",
    "token_type": "bearer"
  }
}

Run Income Tax Calculation

POST/calculators/income-tax
// Request
POST /api/v1/calculators/income-tax
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "annual_income": 85000,
  "tax_year": "2025/26"
}

// Response 200
{
  "calculator_type": "income-tax",
  "tax_year": "2025/26",
  "results": {
    "gross_income": 85000,
    "personal_allowance": 12570,
    "taxable_income": 72430,
    "income_tax": 17432,
    "effective_rate": 20.51,
    "marginal_rate": 40,
    "bands": [
      { "band": "Basic Rate (20%)", "taxable": 37700, "tax": 7540 },
      { "band": "Higher Rate (40%)", "taxable": 34730, "tax": 13892 }
    ]
  }
}