Custom fields
Base URL https://api.leadx.in/api/key/protected. Every request needs an apikey header — see Authentication.
8 endpoints.
GET /custom-field
Get all custom field.
Auth apikey
:::note Used by the web app
components/CampaignSetup.jsx, components/CustomField.jsx, components/CustomFieldsBasedForm.jsx and 9 more
:::
Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.
Response — data is an array of CustomField objects, alongside the pagination fields described in Response format. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors InvalidPanel_400
POST /custom-field
Create custom field.
Auth apikey · Success 200
:::note Used by the web app
components/CampaignSetup.jsx, components/CustomField.jsx, components/CustomFieldsBasedForm.jsx and 9 more
:::
Request body
| Field | Default | Notes |
|---|---|---|
name | — | |
section | — | |
order | — | |
description | — | |
valueType | — | |
fieldType | — | |
required | — | |
hide | — | |
allowMultiple | — | |
placeholder | — | |
helpText | — | |
defaultValue | — | |
children | — | |
options | — | |
panel | — | lead, contact or productService. |
Required: name, type, panel. Of these, type is nested inside another field (commonly formData), or checked under a different internal name.
Response — data is one CustomField object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors CustomFieldNameAlreadyExists_400
DELETE /custom-field
Delete custom field.
Auth apikey · Success 200
:::note Used by the web app
components/CampaignSetup.jsx, components/CustomField.jsx, components/CustomFieldsBasedForm.jsx and 9 more
:::
Request body — the standard bulk selection: ids, nids, selectAll. Query-string filters apply when selectAll is set.
Response — data is one CustomField object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
GET /custom-field/:id
Get custom field.
Auth apikey
:::note Used by the web app
components/CustomField.jsx, components/CustomFieldsBasedForm.jsx, components/DependentFieldValueInput.jsx and 3 more
:::
Path parameters
| Name | |
|---|---|
id | Required |
Response — data is one CustomField object.
Errors CustomFieldNotFound_400
PUT /custom-field/:id
Update custom field.
Auth apikey · Success 200
:::note Used by the web app
components/CustomField.jsx, components/CustomFieldsBasedForm.jsx, components/DependentFieldValueInput.jsx and 3 more
:::
Path parameters
| Name | |
|---|---|
id | Required |
Request body
| Field | Default | Notes |
|---|---|---|
panel | — | lead, contact or productService. |
section | — |
Required: id, panel. Of these, id is nested inside another field (commonly formData), or checked under a different internal name.
Response — data is one CustomField object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors CustomFieldNotFound_400 · InvalidSectionId_400
PUT /custom-field/modify
Modify fields.
Auth apikey
Query parameters
| Field | Default |
|---|---|
segmentFields | false |
onlyShowTable | false |
Request body
| Field | Default | Notes |
|---|---|---|
panel | — | lead, contact or productService. |
formData | — | System and custom fields together — see Custom fields. |
type | all |
Required: panel.
Response — data is one CustomField object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors CountryNotFound_400 · StateNotFound_400
PUT /custom-field/reorder
Reorder fields.
Auth apikey
Request body
| Field | Default | Notes |
|---|---|---|
fields | [] | |
panel | — | lead, contact or productService. |
Response — data is one CustomField object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
PUT /custom-field/reset-system
Reset system fields.
Auth apikey · Success 200
Request body
| Field | Default | Notes |
|---|---|---|
panel | — | lead, contact or productService. |
Required: panel.
Response — data is one Company object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors InvalidPanel_400