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.
Response — data 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
| Field | Default |
|---|---|
name | — |
description | — |
fields | — |
formFields | — |
settings | — |
template | — |
status | — |
assignment | — |
Required: name.
Response — data 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
| Field | Default | Notes |
|---|---|---|
ids | [] | Documents to act on. |
Response — data 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 | |
|---|---|
id | Required |
Response — data 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 | |
|---|---|
id | Required |
Request body
| Field | Default |
|---|---|
isActive | — |
PUT /form/:id/status
Set form status.
Auth apikey · Success 200
Path parameters
| Name | |
|---|---|
id | Required |
Request body
| Field | Default |
|---|---|
status | — |
Response — data 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 | |
|---|---|
id | Required |
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 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