<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/webhooks/form-events

# Form Events

**Webhook.** Sent to the webhook URL you configure.

Online sends a form event to your webhook when a [form link](https://docs.99digital.co.il/online-api/forms/generate-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](https://docs.99digital.co.il/online-api/webhooks/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):

```json
{
  "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](https://docs.99digital.co.il/online-api/forms/generate-form-link). |
| form_submitted | A contact submitted a form. |

## Webhook payload

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `event` | string | Yes | What happened. One of: `form_link_generated` — A form link was generated with [Generate Form Link](https://docs.99digital.co.il/online-api/forms/generate-form-link); `form_submitted` — A contact submitted a form. |
| `form` | object | No | The form. |
| `link` | object | No | The form link. |
| `contact` | object | No | The contact. |
| `conversation` | object \| null | No | The conversation, when the link belongs to one. |
| `answers` | array of object | No | `form_submitted` only: the contact's answers. |
| `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. |

### Example (generated from the schema)

```json
{
  "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
}
```

## Responses

### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again.
