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
| Field | Default | Notes |
|---|---|---|
formData | {} | System and custom fields together — see Custom fields. |
tags | — | Tag ids. |
category | — | Contact category id. |
contactcategories | — | Alias for category. |
existingError | true | |
skipInvalid | — | Keep 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.
Response — data 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.
Response — data 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 | |
|---|---|
id | Required |
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 | |
|---|---|
id | Required |
Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.
Request body
| Field | Default | Notes |
|---|---|---|
formData | {} | System and custom fields together — see Custom fields. |
tags | — | Tag ids. |
contactCategory | — | |
contactcategories | — | Alias for category. |
category | — | Contact category id. |
Response — data 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
| Field | Default | Notes |
|---|---|---|
formData | — | System and custom fields together — see Custom fields. |
tags | — | Tag ids. |
category | — | Contact category id. |
existingError | true | |
skipInvalid | — | Keep 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
- An uploaded file.
POST /upload
Request body
| Field | Default | Notes |
|---|---|---|
file | — | |
headers | — | |
totalCount | — | |
columnMapping | {} | |
options | {} | |
tags | [] | Tag ids. |
category | — | Contact category id. |
pauseImport | true | |
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.
Response — data 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.
Response — data 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 | |
|---|---|
id | Required |
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 | |
|---|---|
id | Required |
Request body
| Field | Default | Notes |
|---|---|---|
columnMapping | — | |
options | — | |
tags | — | Tag ids. |
category | — | Contact 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