Skip to main content
Both write endpoints require the public_api:leads:write scope.

Deduplication

MEGA de-duplicates on email and phone last-10 digits. If an incoming lead matches an existing one, it is merged rather than duplicated. Each request must include at least one of contact_name, contact_phone, or contact_email.

Idempotency

Send an Idempotency-Key header on any create. Replaying the same key returns the original stored response instead of creating again. Keys are scoped per customer + endpoint; reusing a key with a different body returns 409.
Use a fresh unique key per logical operation (e.g. a UUID), and reuse it only when retrying that same operation.

Single lead

Returns 201 with { "lead": { ... } } (same lead shape as the pull API).

Bulk import

Import up to 500 leads per request (over the cap returns 400). Uploaded leads are inert — they do not trigger downstream automation. Per row you may set row_ref (your correlation id, echoed back), owner_id (must belong to your customer), lead_line (buyer/seller), stage_slug, and custom_fields.
Response
  • Per-row status: created | updated | skipped | failed. A failing row (e.g. a cross-tenant owner_id or a stage_slug not in your pipeline) is marked failed and never aborts the batch.
  • matched_by: email | phone | null — how a merge target was found.
  • ignored_custom_fields / top-level unknown_custom_fields: slugs that didn’t match any custom-field definition and were ignored (not silently dropped).
The bulk endpoint has a stricter per-minute rate limit than the other endpoints — see Rate limits. dry_run requests are not idempotency-cached.