Skip to main content

Contacts

A contact is a person. See the Contacts guide.

Base URL https://api.leadx.in/api/key/protected. Every request needs an apikey header — see Authentication.

12 endpoints.

GET /contact

List contacts.

Auth apikey

:::note Used by the web app components/CampaignSetup.jsx, components/ChatWindow.jsx, components/CustomField.jsx and 11 more :::

Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.

POST /contact

Create a contact.

Auth apikey · Success 200 · Emits contact.created

:::note Used by the web app components/CampaignSetup.jsx, components/ChatWindow.jsx, components/CustomField.jsx and 11 more :::

Request body

FieldDefaultNotes
formData{}System and custom fields together — see Custom fields.
tagsTag ids.
categoryContact category id.
contactcategoriesAlias for category.
existingErrortrue
skipInvalidKeep going past rows that fail validation instead of rejecting the request.

Required: countryCode, number, email — nested inside another field (commonly formData), or checked under a different internal name, so they do not appear as top-level body fields above.

Responsedata is one Contact object.

Errors ContactAlreadyExists_400 · ContactDataRequired_400 · ContactNotFound_404 · InvalidCustomFieldValue_400 · InvalidCustomField_400 · InvalidSystemField_400

PUT /contact

Apply one set of changes to many contacts.

Auth apikey · Success 200

:::note Used by the web app components/CampaignSetup.jsx, components/ChatWindow.jsx, components/CustomField.jsx and 11 more :::

Request body — the standard bulk selection (ids, nids, selectAll) plus formData and updateType.

DELETE /contact

Soft-delete contacts.

Auth apikey · Success 200

:::note Used by the web app components/CampaignSetup.jsx, components/ChatWindow.jsx, components/CustomField.jsx and 11 more :::

Request body — the standard bulk selection: ids, nids, selectAll. Query-string filters apply when selectAll is set.

Responsedata is one Contact object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

GET /contact/:id

Fetch one contact by id.

Auth apikey

:::note Used by the web app pages/ImportContactsList.jsx :::

Path parameters

Name
idRequired

Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.

Errors ContactNotFound_400

PUT /contact/:id

Update contact.

Auth apikey · Success 200 · Emits contact.updated

:::note Used by the web app pages/ImportContactsList.jsx :::

Path parameters

Name
idRequired

Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.

Request body

FieldDefaultNotes
formData{}System and custom fields together — see Custom fields.
tagsTag ids.
contactCategory
contactcategoriesAlias for category.
categoryContact category id.

Responsedata is one Contact object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

Errors CannotUpdateUniqueKey_400 · ContactAlreadyExists_400 · ContactNotFound_400 · InvalidCustomFieldValue_400 · InvalidCustomField_400 · InvalidSystemField_400

POST /contact/bulk

Create up to 500 contacts in one request, with per-item success and failure.

Auth apikey · Emits contact.created

Request body

FieldDefaultNotes
formDataSystem and custom fields together — see Custom fields.
tagsTag ids.
categoryContact category id.
existingErrortrue
skipInvalidKeep going past rows that fail validation instead of rejecting the request.

Required: countryCode, number, email — nested inside another field (commonly formData), or checked under a different internal name, so they do not appear as top-level body fields above.

Errors ContactAlreadyExists_400 · ContactDataRequired_400 · ContactNotFound_404 · InvalidCustomFieldValue_400 · InvalidCustomField_400 · InvalidSystemField_400

GET /contact/import

List imports.

Auth apikey

Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.

POST /contact/import

Create an import from an already-uploaded file.

Auth apikey

Prerequisites

  1. An uploaded file. POST /upload

Request body

FieldDefaultNotes
file
headers
totalCount
columnMapping{}
options{}
tags[]Tag ids.
categoryContact category id.
pauseImporttrue
userEnquiry

Required: importType, fileId — nested inside another field (commonly formData), or checked under a different internal name, so they do not appear as top-level body fields above.

Responsedata is one File object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

Errors EmptyFile_400 · FileNotFound_400 · NoRowsInFile_400

DELETE /contact/import

Delete imports.

Auth apikey · Success 200

Request body — the standard bulk selection: ids, nids, selectAll. Query-string filters apply when selectAll is set.

Responsedata is null; the outcome is the status code and message.

GET /contact/import/:id

Fetch one import, including progress and row errors.

Auth apikey

:::note Used by the web app pages/ImportContactsList.jsx :::

Path parameters

Name
idRequired

Errors ImportNotFound_400

PUT /contact/import/:id

Update an import — this is also how a paused import is resumed.

Auth apikey

:::note Used by the web app pages/ImportContactsList.jsx :::

Path parameters

Name
idRequired

Request body

FieldDefaultNotes
columnMapping
options
tagsTag ids.
categoryContact category id.
userEnquiry

Required: id — nested inside another field (commonly formData), or checked under a different internal name, so they do not appear as top-level body fields above.

Errors ImportAlreadyPaused_400 · ImportAlreadyRunning_400 · ImportNotFound_400 · InvalidImportStatus_400 · NoRowsInFile_400 · RowFromGreaterThanRowTo_400 · RowFromOutOfRange_400