Skip to main content

Forms

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

7 endpoints.

GET /form

Get all forms.

Auth apikey

:::note Used by the web app pages/AddForm.jsx, pages/Forms.jsx :::

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 LeadCaptureForm objects, alongside the pagination fields described in Response format. updatedBy, createdBy are populated, so they arrive as nested objects rather than ids.

POST /form

Create form.

Auth apikey · Success 200

:::note Used by the web app pages/AddForm.jsx, pages/Forms.jsx :::

Request body

FieldDefault
name
description
fields
formFields
settings
template
status
assignment

Required: name.

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

Errors FormNameAlreadyExists_400

DELETE /form

Delete form.

Auth apikey · Success 200

:::note Used by the web app pages/AddForm.jsx, pages/Forms.jsx :::

Request body

FieldDefaultNotes
ids[]Documents to act on.

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

Errors NoFormSelected_400

GET /form/:id

Get form.

Auth apikey

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

Path parameters

Name
idRequired

Responsedata is one LeadCaptureForm object. createdBy updatedBy is populated, so it arrives as nested objects rather than ids.

Errors FormNotFound_400

PUT /form/:id

Update form.

Auth apikey

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

Path parameters

Name
idRequired

Request body

FieldDefault
isActive

PUT /form/:id/status

Set form status.

Auth apikey · Success 200

Path parameters

Name
idRequired

Request body

FieldDefault
status

Responsedata is one LeadCaptureForm object.

Errors FormFieldsRequired_400 · FormNotFound_400

GET /form/:id/submissions

Get form submissions.

Auth apikey

:::note Used by the web app pages/AddForm.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.

Responsedata is an array of LeadCaptureFormSubmission objects, alongside the pagination fields described in Response format. contact, lead are populated, so they arrive as nested objects rather than ids.

Errors FormNotFound_400