CRM leads
Send leads from your website, your database, a Google Sheet script or your own CRM straight into Levrage. Every lead you push lands in the CRM like one added by hand: it shows on the lead’s timeline as “API”, stage rules and always-on campaigns react to it, and your webhooks hear about it.
Your key
Create a key in CRM → Settings → API and webhooks in the dashboard and give it Read and write access. A key belongs to one workspace: the leads, stages and custom fields it sees are that workspace’s.
Add or update one lead
The person is matched on external_id, then phone, then email. When one matches, on_conflict decides:
Send external_id (your own id for the person) on every lead and use "on_conflict": "update". Re-sending the same lead is then always safe: it updates instead of duplicating.
Custom fields
Put your own details inside fields, named by the field’s key (zone) or its label as the dashboard shows it, in any case ("Zone", "ZONE"). GET /v1/crm/fields lists them.
A name with no field in the workspace is a 400 that lists every such name at once, so nothing you send vanishes silently:
Add "create_missing_fields": true and those names become text fields instead — labelled as you sent them, with a key made from the name ("DOJ + 7 days OC" → doj_7_days_oc). The answer lists them in created_fields. Up to 50 new fields per request; change a field’s type in the dashboard afterwards if it should be a number, date or choice.
Push many leads — bulk
POST /v1/crm/leads/bulk takes up to 500 leads per request. Each row succeeds or fails on its own, and results has one entry per row, in order.
on_conflict,match_onandcreate_missing_fieldsapply to every row; a row can set its own.- Without
create_missing_fields, rows naming fields that don’t exist fail, and the answer addsmissing_fields— each such name, once. - For a big sheet or table, send chunks of 500, each with its own
Idempotency-Key. A key allows 600 requests a minute — 300,000 leads a minute.
Retries and limits
- Idempotency-Key on any
POST: repeating the same request with the same key within 24 hours returns the first answer (withIdempotent-Replayed: true) instead of writing twice. A400or5xxisn’t kept — fix the request and retry with the same key. - Rate limit: 600 requests a minute per key. Every answer carries
X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Reset; over the limit you get429withRetry-After. - Errors always look like
{"error": {"code": "…", "message": "…"}}—messageis a sentence you can show or log.
Everything else
To hear about changes the moment they happen (a call finished, a stage moved, a deal won), add a webhook in CRM → Settings → API and webhooks → Webhooks.
