Form Events
Webhook
Online sends a form event to your webhook when a form link is generated, and when a contact submits a form.
| Subscription | Sent when |
|---|---|
form_link_generated | A form link was generated. |
form_submitted | A contact submitted a form. |
The payload is the form submission: its form, link, contact and conversation,
plus the answers for form_submitted. When the link or the submission
belongs to a conversation, the event is sent only if its inbox is in the
webhook's inbox_ids, or inbox_ids is empty.
Settings:
| Setting | Value |
|---|---|
| URL | Your webhook URL — create the webhook with Add Webhook and choose its events in subscriptions |
| Method | JSON via POST |
Example — form_submitted (shortened: link is left out, and the other objects show a few fields):
{
"event": "form_submitted",
"form": {
"id": "45",
"name": "Event registration"
},
"contact": {
"id": 801,
"name": "Dana Cohen"
},
"conversation": {
"id": 1501
},
"answers": [
{
"field_id": "email",
"value": "dana.cohen@example.com",
"type": "email"
}
],
"allow_unverified_ssl": false
}
Payload explained
| Parameter | Description / Example |
|---|---|
event | What happened. See the values below. |
form | The form. |
link | The form link. |
contact | The contact. |
conversation | The conversation, when the link belongs to one. |
answers | form_submitted only: the contact's answers. |
allow_unverified_ssl | Added by Online to every payload. |
event
| Value | Explanation |
|---|---|
| form_link_generated | A form link was generated with Generate Form Link. |
| form_submitted | A contact submitted a form. |
Webhook payload
Your response
- 200
Answer with any 2xx status within 5 seconds. Online ignores the body of your answer, and does not send the event again.