Skip to main content

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.

Responsedata 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

FieldDefaultNotes
name
section
order
description
valueType
fieldType
required
hide
allowMultiple
placeholder
helpText
defaultValue
children
options
panellead, contact or productService.

Required: name, type, panel. Of these, type is nested inside another field (commonly formData), or checked under a different internal name.

Responsedata 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.

Responsedata 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
idRequired

Responsedata 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
idRequired

Request body

FieldDefaultNotes
panellead, contact or productService.
section

Required: id, panel. Of these, id is nested inside another field (commonly formData), or checked under a different internal name.

Responsedata 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

FieldDefault
segmentFieldsfalse
onlyShowTablefalse

Request body

FieldDefaultNotes
panellead, contact or productService.
formDataSystem and custom fields together — see Custom fields.
typeall

Required: panel.

Responsedata 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

FieldDefaultNotes
fields[]
panellead, contact or productService.

Responsedata 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

FieldDefaultNotes
panellead, contact or productService.

Required: panel.

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

Errors InvalidPanel_400