Forms API
API Reference
The reference below covers every endpoint in the Forms API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.
GET
/api/v1/formsAuthorization
BearerAuth AuthorizationBearer <token>
Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/forms"{ "forms": [ { "id": "string", "name": "string", "fields": [ "name" ], "active": true, "successMessage": "string", "allowedDomains": [ "string" ], "submissionCount": 0, "createdAt": "2019-08-24T14:15:22Z" } ]}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: write:workflows."}GET
/api/v1/forms/{id}/submissionsAuthorization
BearerAuth AuthorizationBearer <token>
Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Path Parameters
id*string
Query Parameters
limit?integer
Range
1 <= value <= 500Default
100cursor?string
The nextCursor from the previous page.
since?string
Only submissions created at or after this time.
Format
date-timeResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/forms/string/submissions"{ "form": { "id": "string", "name": "string", "fields": [ "name" ], "active": true, "successMessage": "string", "allowedDomains": [ "string" ], "submissionCount": 0, "createdAt": "2019-08-24T14:15:22Z" }, "submissions": [ { "leadId": "string", "name": "string", "email": "string", "phone": "string", "company": "string", "leadStatus": "NEW", "pageUrl": "string", "contactId": "string", "submittedAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "nextCursor": "string"}{ "error": "products must not be empty."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: write:workflows."}{ "error": "Workflow not found."}