> ## Documentation Index
> Fetch the complete documentation index at: https://support.lilt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Receive notifications when events occur in LILT

Webhooks allow you to receive real-time notifications when specific events occur in LILT. When you configure a webhook, LILT sends an HTTP POST request to your specified URL whenever a subscribed event is triggered.

## Event Types

You can subscribe to the following event types when [creating a webhook configuration](/api-reference/webhook-configuration/creates-a-new-webhook-configuration):

| Event Type                    | Description                                                         |
| ----------------------------- | ------------------------------------------------------------------- |
| `JOB_UPDATE`                  | Triggered when a job is updated                                     |
| `JOB_DELIVER`                 | Triggered when a job is delivered                                   |
| `PROJECT_UPDATE`              | Triggered when a project is updated                                 |
| `PROJECT_DELIVER`             | Triggered when a project is delivered                               |
| `INSTANT_TRANSLATE_COMPLETED` | Triggered when instant file translation task completes successfully |
| `INSTANT_TRANSLATE_FAILED`    | Triggered when instant file translation task fails                  |

## Payload Structure

The payload sent to your webhook URL is a JSON object. The structure varies depending on the event type. Job and project event payloads do not include an explicit event type field, so you must infer the event type from the fields present in the payload. Instant translate event payloads include an `eventType` field.

### JOB\_UPDATE

Sent when a job is updated.

```json theme={null}
{
  "OrganizationId": 9,
  "due": "2025-03-28T10:32:31Z",
  "id": 895890,
  "isDelivered": 0,
  "name": "Marketing Brochure Q1 - English to German"
}
```

| Field            | Type    | Description                           |
| ---------------- | ------- | ------------------------------------- |
| `OrganizationId` | integer | The ID of the organization            |
| `due`            | string  | The due date in ISO 8601 format       |
| `id`             | integer | The job ID                            |
| `isDelivered`    | integer | Delivery status (`0` = not delivered) |
| `name`           | string  | The job name                          |

### JOB\_DELIVER

Sent when a job is delivered.

```json theme={null}
{
  "OrganizationId": 9,
  "deliveredAt": "2025-03-24T08:10:55Z",
  "due": "2025-03-24T10:35:01Z",
  "id": 895892,
  "isDelivered": 1,
  "name": "Product Manual v2.0 - English to French"
}
```

| Field            | Type    | Description                               |
| ---------------- | ------- | ----------------------------------------- |
| `OrganizationId` | integer | The ID of the organization                |
| `deliveredAt`    | string  | The delivery timestamp in ISO 8601 format |
| `due`            | string  | The due date in ISO 8601 format           |
| `id`             | integer | The job ID                                |
| `isDelivered`    | integer | Delivery status (`1` = delivered)         |
| `name`           | string  | The job name                              |

### PROJECT\_UPDATE

Sent when a project is updated.

```json theme={null}
{
  "OrganizationId": 9,
  "id": 37654,
  "name": "Website Localization - Spring Release",
  "due": "2025-03-20T13:47:09.000Z"
}
```

| Field            | Type    | Description                     |
| ---------------- | ------- | ------------------------------- |
| `OrganizationId` | integer | The ID of the organization      |
| `id`             | integer | The project ID                  |
| `name`           | string  | The project name                |
| `due`            | string  | The due date in ISO 8601 format |

### PROJECT\_DELIVER

Sent when a project is delivered.

```json theme={null}
{
  "OrganizationId": 9,
  "id": 1376873
}
```

| Field            | Type    | Description                |
| ---------------- | ------- | -------------------------- |
| `OrganizationId` | integer | The ID of the organization |
| `id`             | integer | The project ID             |

### INSTANT\_TRANSLATE\_COMPLETED

Sent when an instant file translation task completes successfully.

```json theme={null}
{
  "eventType": "INSTANT_TRANSLATE_COMPLETED",
  "translationId": 1376873,
  "fileId": 68754
}
```

| Field           | Type    | Description                 |
| --------------- | ------- | --------------------------- |
| `eventType`     | string  | The type of event           |
| `translationId` | integer | Instant file translation ID |
| `fileId`        | integer | ID of the file translated   |

### INSTANT\_TRANSLATE\_FAILED

Sent when an instant file translation task fails.

```json theme={null}
{
  "eventType": "INSTANT_TRANSLATE_FAILED",
  "translationId": 1376873,
  "fileId": 68754
}
```

| Field           | Type    | Description                 |
| --------------- | ------- | --------------------------- |
| `eventType`     | string  | The type of event           |
| `translationId` | integer | Instant file translation ID |
| `fileId`        | integer | ID of the file translated   |

## Distinguishing Event Types

Instant translate events include an `eventType` field in the payload. For job and project events, which do not include an explicit event type field, use the following logic to determine which event triggered the webhook:

| If the payload contains...                            | Event Type        |
| ----------------------------------------------------- | ----------------- |
| `isDelivered: 1` and `deliveredAt`                    | `JOB_DELIVER`     |
| `isDelivered: 0` and `name` (job name)                | `JOB_UPDATE`      |
| `name` (project name) and `due`, but no `isDelivered` | `PROJECT_UPDATE`  |
| Only `OrganizationId` and `id`                        | `PROJECT_DELIVER` |

<Tip>
  If you need to handle multiple event types, consider subscribing to each event type with a separate webhook configuration pointing to distinct endpoints. This removes the need to infer the event type from the payload structure.
</Tip>
