How do I make my first API call?
Replace $FLAXXA_KEY with a key from your workspace. The first call returns a real id you can use for the next ones.
curl -X POST https://flaxxa.com/api/v1/crm/leads/bulk-upsert \
-H "Authorization: Bearer flx_live_YOUR_KEY" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "Idempotency-Key: sync-2026-11-05-001" \
-d '{
"source": "gyaanshala", "pipeline_id": 12, "dedupe_on": "external_id",
"rows": [
{ "external_id": "EXT-10001", "name": "Asha Verma", "email": "[email protected]", "phone": "+919876543210" },
{ "external_id": "EXT-10002", "name": "Rahul Sen", "email": "[email protected]" }
]
}'Http::withToken(env('FLAXXA_CRM_KEY'))->acceptJson()
->put("https://flaxxa.com/api/v1/crm/leads/by-external-id/{$student->id}", [
'name' => $student->name, 'email' => $student->email, 'phone' => $student->mobile,
'source' => 'gyaanshala', 'pipeline_id' => 12, 'status' => 'contacted',
])->throw();import requests
r = requests.post("https://flaxxa.com/api/v1/crm/leads/bulk-upsert",
headers={"Authorization": f"Bearer {KEY}", "Accept": "application/json"},
json={"source": "gyaanshala", "pipeline_id": 12, "dedupe_on": "external_id", "rows": rows[:300]})
r.raise_for_status()
print(r.json()["data"]) # created / updated / skipped counts and per-row resultsPUT /api/v1/crm/leads/by-external-id/EXT-10001 HTTP/1.1
Host: flaxxa.com
Authorization: Bearer flx_live_·············
Content-Type: application/json
{
"name": "Asha Verma",
"email": "[email protected]",
"phone": "+919876543210",
"source": "gyaanshala",
"pipeline_id": 12,
"status": "contacted",
"custom_data": { "course": "NEET 2027" }
}HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 4812, "external_id": "EXT-10001", "email": "[email protected]",
"source": "gyaanshala", "channel": "api", "status": "contacted",
"pipeline_id": 12, "stage_id": 41, "created_at": "2026-10-27T10:00:00+00:00"
}
}
