Every call below needs a bearer token from your API key - see the quickstart. If your plan does not include Forms, calls answer 402; a form in another account answers 404.
Each task shows curl and fetch. The SDK has no Forms client yet, so call the API directly.
Read a form’s submissions
curl "https://api.pickcell.io/v1/forms/<form id>/submissions?page=1&limit=50" \
-H "Authorization: Bearer $PICKCELL_TOKEN"
const res = await fetch(`https://api.pickcell.io/v1/forms/${formId}/submissions?page=1&limit=50`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
const { submissions, pagination } = await res.json();
The submissions come back under submissions, with pagination beside them and a versions map describing the form versions on that page. Each carries id, formId, formVersionId, data, status, createdAt and updatedAt. The submitter’s IP address and browser are never shown to an API key.
Find submissions by answer
Pass where as one JSON object. A submission matches when its answers contain every field you give, with the same value.
curl -G "https://api.pickcell.io/v1/forms/<form id>/submissions" \
-H "Authorization: Bearer $PICKCELL_TOKEN" \
--data-urlencode 'where={"country":"AU"}'
const where = encodeURIComponent(JSON.stringify({ country: 'AU' }));
const res = await fetch(`https://api.pickcell.io/v1/forms/${formId}/submissions?where=${where}`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
const { submissions } = await res.json();
A where that is not a JSON object answers 400.
Receive each submission as it arrives
Rather than poll, have each accepted submission sent to you. Open the form in the console and use Send submissions to a webhook: the endpoint it adds to your Pickcell events application receives form-submission.accepted for that form only, because its filter matches on formId. To receive every form’s submissions at one endpoint, allow form-submission.accepted on an endpoint without a formId match. The webhooks guide covers filters and signatures.