SDKClient
Forms
SDK reference for forms — Read deployed form definitions and submissions.
Read deployed form definitions and submissions.
getForm
Get stable form identity and the preferred snapshot for the active deployment (or latest).
GET
Usage:
const result = await swirls.client.forms.getForm({
projectId: '...',
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
id | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
form | object | |
snapshot | object |
listForms
List one row per stable form with preferred snapshot and version count.
GET
Usage:
const result = await swirls.client.forms.listForms({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |
listFormSubmissions
GET
Usage:
const result = await swirls.client.forms.listFormSubmissions({})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
formId | string | No | |
formSnapshotId | string | No | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |