Hooks
REST hook subscriptions used by automation platforms (Zapier, Make). formcel POSTs a JSON payload to the target URL whenever the subscribed event happens.
Subscribe to an event
POST /api/v1/hooks/subscribe
Registers a target URL that receives a POST whenever the event happens on the form. Subscribing again with the same form, event, source and URL returns the existing subscription.
Service account scope: hooks:manage
Request body
form_idstring requiredtarget_urlstring (uri) required- Public HTTPS URL that receives the events.
eventstring required- submission.updated is accepted but not currently sent. One of
submission.created,submission.status_changed,submission.deleted,submission.updated sourcestring required- One of
zapier,make
Example request
curl -X POST "https://acme.formcel.com/api/v1/hooks/subscribe" \
-H "Authorization: Bearer $FORMCEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"form_id":"frm_8f2c","target_url":"https://hooks.zapier.com/hooks/standard/123/abc","event":"submission.created","source":"zapier"}' Responses
201The subscription.400The request body or parameters are invalid.401The API key is missing or invalid.403The caller lacks access to the resource, or the service account lacks the required scope.404The resource does not exist.
Response body HookSubscription
idstring requiredform_idstring requiredeventstring requiredurlstring requiredactiveboolean requiredsourcestring required
Unsubscribe
DELETE /api/v1/hooks/{id}
Removes a subscription created with subscribeHook. Webhooks created in the formcel app cannot be removed through this endpoint.
Service account scope: hooks:manage
path parameters
idstring required- Subscription ID returned by subscribeHook.
Example request
curl -X DELETE "https://acme.formcel.com/api/v1/hooks/ID" \
-H "Authorization: Bearer $FORMCEL_API_KEY" Responses
204The subscription was removed.400The request body or parameters are invalid.401The API key is missing or invalid.403The caller lacks access to the resource, or the service account lacks the required scope.404The resource does not exist.
Events
The payloads POSTed to a subscription's target URL.
submission.created
A submission was received. Sent after a respondent submits the form. For forms that collect a payment it is sent once the payment completes.
eventstring requiredform_idstring requireddataobject required- The answers keyed by field.
submissionobject required
submission
idstring requiredform_idstring requiredschema_versioninteger requiredcreated_atstring (date-time) required
submission.status_changed
A submission's status changed. Sent when a submission moves to another status. A bulk status change in the formcel app sends one event with submission_ids instead of submission_id and previous_status.
eventstring requiredform_idstring requiredsubmission_idstringsubmission_idsarray of string- Sent instead of submission_id for bulk changes.
previous_statusstringnew_statusstring required
submission.deleted
A submission was deleted.
eventstring requiredform_idstring requiredsubmission_idstring required