Brixfit Developer API
v1 · REST · JSON · API Key auth
The Brixfit REST API lets you integrate your coaching CRM with any tool — landing pages, n8n, Zapier, Make, Google Sheets, WhatsApp, custom apps, and more. All endpoints return a consistent JSON envelope with data, meta, and error fields.
Base URL
https://brixfit.app/api/public/v1
Auth
X-API-Key header
Format
application/json
Authentication
Pass your API key in every request via the X-API-Key header (recommended) or as a Bearer token.
# Recommended curl -H "X-API-Key: brx_your_key_here" https://brixfit.app/api/public/v1/leads # Alternative curl -H "Authorization: Bearer brx_your_key_here" https://brixfit.app/api/public/v1/leads
Base URL & Versioning
All v1 endpoints live under:
https://brixfit.app/api/public/v1
The legacy endpoint /api/public/leads (POST only) remains active for backwards compatibility. New integrations should use /v1/.
Response Envelope
Every response follows this structure:
{
"data": { ... } | [ ... ], // the resource or list
"meta": { "page": 1, "per_page": 20, "total": 143, "total_pages": 8 } | null,
"error": null // string message on failure
}Leads
/leadsList all leads. Supports pagination, search, and status filtering.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | number | optional | Page number (default: 1) |
| per_page | number | optional | Results per page (max 100, default: 20) |
| search | string | optional | Search name, email, or phone |
| status | string | optional | Filter by status (new, contacted, etc.) |
| sort | string | optional | Sort field:direction — e.g. created_at:desc |
curl -H "X-API-Key: brx_..." \ "https://brixfit.app/api/public/v1/leads?page=1&per_page=20&status=new"
/leadsCreate a new lead. Automatically triggers AI health report and analysis if enabled.
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | required | Full name of the lead |
| string | optional | Email address | |
| phone | string | optional | Phone number — any format, auto-normalized to international standard |
| status | string | optional | Pipeline status (defaults to "new") |
| weight | number | auto-calc | Body weight in kg — used to auto-calculate BMI, BMR, TDEE |
| height | number | auto-calc | Height in cm — used to auto-calculate BMI, BMR |
| age | number | auto-calc | Age in years — used to auto-calculate BMR, TDEE, body fat |
| gender | string | auto-calc | male / female (or m/f) — used for BMR & body fat formula |
| activity_level | string | auto-calc | sedentary | light | moderate | active | very_active — used for TDEE |
| ... | any | optional | Any custom fields defined in Brixfit → Lead Form (fetched via GET /fields/leads) |
weight + height are provided, BMI is calculated automatically. Add age and gender for BMR + body fat. Add activity_level for TDEE. Results are stored in raw_payload._calculated.Phone normalization: Numbers are auto-formatted — trunk zeros stripped,
00XX → +XX. Works for all countries.curl -X POST "https://brixfit.app/api/public/v1/leads" \
-H "X-API-Key: brx_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Priya Sharma",
"email": "[email protected]",
"phone": "0091-9999999999",
"weight": 78,
"height": 162,
"age": 28,
"gender": "female",
"activity_level": "moderate"
}'The response will include auto-calculated metrics in raw_payload._calculated with bmi, bmr, body_fat, and tdee.
/leads/:idGet a single lead by ID.
curl -H "X-API-Key: brx_..." "https://brixfit.app/api/public/v1/leads/lead-uuid-here"
/leads/:idUpdate lead fields. Only send fields you want to change.
curl -X PATCH "https://brixfit.app/api/public/v1/leads/lead-uuid-here" \
-H "X-API-Key: brx_..." \
-H "Content-Type: application/json" \
-d '{ "status": "contacted", "phone": "+91-8888888888" }'/leads/:idPermanently delete a lead. This action cannot be undone.
curl -X DELETE "https://brixfit.app/api/public/v1/leads/lead-uuid-here" -H "X-API-Key: brx_..."
Fields
/fields/leadsFetch your custom lead field definitions. Use this to discover which fields to send when creating or updating leads.
curl -H "X-API-Key: brx_..." "https://brixfit.app/api/public/v1/fields/leads"
{
"data": [
{ "field_key": "weight", "label": "Weight (kg)", "field_type": "number", "is_required": true },
{ "field_key": "height", "label": "Height (cm)", "field_type": "number", "is_required": true },
{ "field_key": "goal", "label": "Goal", "field_type": "string", "is_required": false },
{ "field_key": "age", "label": "Age", "field_type": "number", "is_required": false },
{ "field_key": "gender", "label": "Gender", "field_type": "string", "is_required": false }
],
"meta": null,
"error": null
}Fields are returned in display order (sort_order). Each field_key maps directly to the body key used in POST /leads and PATCH /leads/:id. The n8n node uses this endpoint to automatically display your custom fields as individual inputs.
Clients
/clientsList all clients. Supports pagination, name/email search, and status filter.
| Field | Type | Required | Description |
|---|---|---|---|
| page | number | optional | Page number (default: 1) |
| per_page | number | optional | Results per page (max 100) |
| search | string | optional | Search full name or email |
| status | string | optional | active | inactive | paused |
curl -H "X-API-Key: brx_..." "https://brixfit.app/api/public/v1/clients?status=active"
/clients/:idGet a single client's full profile including health metrics.
curl -H "X-API-Key: brx_..." "https://brixfit.app/api/public/v1/clients/client-uuid-here"
/clients/:idUpdate a client's account status, goal, phone, end date, or notes.
| Field | Type | Required | Description |
|---|---|---|---|
| account_status | string | optional | active | inactive | paused |
| goal | string | optional | Fitness goal (e.g. weight_loss) |
| phone | string | optional | Phone number (auto-normalized) |
| end_date | string | optional | Subscription end date (ISO date) |
| notes | string | optional | Coach notes about the client |
curl -X PATCH "https://brixfit.app/api/public/v1/clients/client-uuid-here" \
-H "X-API-Key: brx_..." \
-H "Content-Type: application/json" \
-d '{ "account_status": "paused", "notes": "On vacation until April" }'/clients/:idDeactivate a client account. Sets account_status to inactive — does not permanently delete the record.
curl -X DELETE "https://brixfit.app/api/public/v1/clients/client-uuid-here" -H "X-API-Key: brx_..."
Check-ins
/checkinsList check-in instances. Filter by client, date range, or status.
| Field | Type | Required | Description |
|---|---|---|---|
| client_id | string | optional | Filter by client ID |
| status | string | optional | pending | completed | submitted | missed |
| from_date | string | optional | Start date (YYYY-MM-DD) |
| to_date | string | optional | End date (YYYY-MM-DD) |
| page | number | optional | Page number |
| per_page | number | optional | Per page (max 100) |
curl -H "X-API-Key: brx_..." \ "https://brixfit.app/api/public/v1/checkins?from_date=2025-03-01&to_date=2025-03-31&status=completed"
/clients/:id/checkinsFetch all check-ins for a specific client by their ID.
curl -H "X-API-Key: brx_..." "https://brixfit.app/api/public/v1/clients/client-uuid-here/checkins"
Webhooks
Webhooks deliver real-time event notifications to your server via HTTP POST. Use them to trigger n8n workflows, update CRMs, send messages, and more — without polling.
/webhooksRegister a new webhook endpoint. The secret is returned once — save it securely.
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | required | HTTPS URL to receive events |
| events | string[] | required | Array of event names to subscribe to |
| description | string | optional | Optional label for this webhook |
Available Events
lead.createdlead.updatedlead.status_changedlead.convertedlead.deletedclient.createdclient.updatedcheckin.submittedcurl -X POST "https://brixfit.app/api/public/v1/webhooks" \
-H "X-API-Key: brx_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-n8n.example.com/webhook/brixfit",
"events": ["lead.created", "lead.status_changed"],
"description": "n8n lead pipeline"
}'Signature Verification
Every request includes an X-Brixfit-Signature header — an HMAC-SHA256 hash of the raw body using your webhook secret. Always verify this in production.
import { createHmac } from 'crypto'
function verifyBrixfitWebhook(
rawBody: string,
signature: string,
secret: string,
): boolean {
const expected = 'sha256=' + createHmac('sha256', secret)
.update(rawBody)
.digest('hex')
return signature === expected
}
// Next.js App Router example
export async function POST(req: Request) {
const rawBody = await req.text()
const sig = req.headers.get('x-brixfit-signature') ?? ''
if (!verifyBrixfitWebhook(rawBody, sig, process.env.BRIXFIT_WEBHOOK_SECRET!)) {
return Response.json({ error: 'Invalid signature' }, { status: 401 })
}
const { event, data } = JSON.parse(rawBody)
console.log('Event:', event, data)
return Response.json({ ok: true })
}/webhooksList all registered webhooks.
/webhooks/:idEnable or disable a webhook.
curl -X PATCH "https://brixfit.app/api/public/v1/webhooks/webhook-uuid" \
-H "X-API-Key: brx_..." \
-H "Content-Type: application/json" \
-d '{ "is_active": false }'/webhooks/:idRemove a webhook permanently.
Errors
On errors, data is null and error contains a message string.
| Status | Meaning |
|---|---|
| 401 | Missing, invalid, or revoked API key |
| 400 | Malformed request body |
| 404 | Resource not found (or not owned by you) |
| 422 | Validation error — check "details" array for field errors |
| 429 | Rate limit exceeded — see Retry-After header |
| 500 | Internal server error |
// 422 Validation error
{
"data": null,
"error": "Validation failed.",
"details": [
"\"phone\" (Phone Number) is required.",
"\"age\" must be a valid number."
]
}@brixfit/sdk
Official TypeScript/JavaScript SDK. Fully typed, works in Node.js and edge runtimes.
Installation
npm install @brixfit/sdk # or: yarn add @brixfit/sdk | pnpm add @brixfit/sdk
Quick Start
import { BrixfitClient } from '@brixfit/sdk'
const brixfit = new BrixfitClient({ apiKey: 'brx_your_key_here' })
// List leads
const { data: leads, meta } = await brixfit.leads.list({
per_page: 20,
status: 'new',
})
console.log(`${meta.total} total leads`)
// Create a lead
const lead = await brixfit.leads.create({
name: 'Priya Sharma',
email: '[email protected]',
goal: 'weight_loss',
weight: 78,
})
// Update status
await brixfit.leads.updateStatus(lead.id, 'contacted')
// List clients
const { data: clients } = await brixfit.clients.list({ status: 'active' })
// Get check-ins for a client
const { data: checkins } = await brixfit.checkins.list({
client_id: clients[0].id,
from_date: '2025-03-01',
})Error Handling
import { BrixfitClient, BrixfitAuthError, BrixfitValidationError, BrixfitRateLimitError } from '@brixfit/sdk'
try {
const lead = await brixfit.leads.create({ name: '' })
} catch (err) {
if (err instanceof BrixfitAuthError) console.error('Check your API key')
else if (err instanceof BrixfitValidationError) console.error('Fields:', err.details)
else if (err instanceof BrixfitRateLimitError) console.log('Wait:', err.retryAfter, 's')
}n8n Integration
Brixfit has an official n8n community node — n8n-nodes-brixfit — that gives you a drag-and-drop interface for all API operations and webhook triggers.
Perform actions — create leads with dynamic fields, update/deactivate clients, get check-ins, manage webhooks.
Start workflows when events fire — lead created, check-in submitted, etc.
Install the node
In n8n: Settings → Community Nodes → Install and enter:
n8n-nodes-brixfit
Or for self-hosted n8n:
npm install n8n-nodes-brixfit
Step-by-step: receive leads from a landing page
- 1In n8n, create a new workflow. Add a Brixfit Trigger node.
- 2Activate the workflow — n8n shows you a webhook URL.
- 3In Brixfit → Developer → Webhooks, create a webhook pointing to that URL. Select lead.created.
- 4Copy the secret from Brixfit and paste it into the Trigger node's "Webhook Secret" field.
- 5Add downstream nodes: send a WhatsApp, append to Google Sheets, post to Slack — anything.
- 6Every new lead in Brixfit now triggers your workflow within seconds.
Example workflows
Facebook Lead Ads → Brixfit
Facebook Lead Ads Trigger → Set (map fields) → Brixfit: Create LeadNew lead → WhatsApp + Sheets
Brixfit Trigger (lead.created) → WhatsApp (send welcome) → Google Sheets (append row)Daily check-in report
Schedule Trigger (9am) → Brixfit: Get All Check-ins (today) → Gmail (send summary to coach)Lead converted → onboarding
Brixfit Trigger (lead.converted) → Create Client → Send welcome email → Slack (notify team)Using HTTP Request node (no node install needed)
You can also use n8n's built-in HTTP Request node directly:
Method: POST
URL: https://brixfit.app/api/public/v1/leads
Header: X-API-Key = brx_your_key_here
Body (JSON):
{
"name": "{{ $json.name }}",
"email": "{{ $json.email }}",
"phone": "{{ $json.phone }}"
}Rate Limits
Rate limits are applied per API key. When exceeded, the API returns 429 with a Retry-After header indicating when to retry (in seconds).
| Endpoint | Limit |
|---|---|
| All v1 endpoints | 120 requests / minute |
| POST /leads | 60 requests / minute |
| POST /webhooks | 10 webhooks total (active) |
Ready to integrate?
Get your API key and start building in minutes.

