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

# Webhook Events

> Get notified on your server when Instagram sends, fails, receives a DM, edits a message, or changes connection status.

<Tip>
  With the API you **ask**; with webhooks Notifique **tells you**. Great for real-time inbox, sync edits, or react when the session drops, without polling.
</Tip>

## In brief

* Every delivery is a **POST** `application/json` to your registered URL.
* `instagram.*` events are **Instagram only**, WhatsApp uses `message.*`, Telegram uses `telegram.*`.
* `instanceId` identifies the Instagram connection.
* Enable **only** the events your integration needs.
* Respond **2xx quickly**; heavy processing goes to your queue.

General setup: [Webhooks](/en/guides/webhooks/index). Security (HMAC signature): [Webhook security](/en/guides/webhooks/seguranca).

***

## How the POST looks

```json theme={null}
{
  "event": "instagram.sent",
  "workspaceId": "clxx123...",
  "instanceId": "inst_abc",
  "messageId": "msg_xyz",
  "timestamp": "2026-07-06T12:00:00.000Z",
  "data": {
    "to": "target_user",
    "type": "TEXT",
    "status": "SENT",
    "sentAt": "2026-07-06T12:00:00.000Z",
    "externalId": "340282366841710301244259849902874331233"
  }
}
```

| Field         | Description                        |
| ------------- | ---------------------------------- |
| `event`       | Event name (e.g. `instagram.sent`) |
| `workspaceId` | Workspace ID                       |
| `instanceId`  | Instagram instance ID              |
| `messageId`   | Message ID (when applicable)       |
| `timestamp`   | ISO 8601, use for anti-replay      |
| `data`        | Event-specific fields              |

Headers: `X-Notifique-Signature`, `X-Notifique-Timestamp`, `X-Workspace-Id`, `X-Webhook-Event`.

***

## What your server should return

| Response                | Effect                               |
| ----------------------- | ------------------------------------ |
| **2xx** within \~10s    | Event delivered; removed from queue  |
| **4xx / 5xx / timeout** | Automatic retry (5 min, 30 min, 2 h) |

<Note>
  Slow processing? Return **200** immediately and process in the background.
</Note>

***

## Event reference

### Messages you send

| Event                 | When it fires                     | What to do with it  |
| --------------------- | --------------------------------- | ------------------- |
| `instagram.sent`      | DM accepted by Instagram          | Mark as sent        |
| `instagram.delivered` | Delivery detected on sync         | Update status       |
| `instagram.read`      | Read detected                     | Metrics             |
| `instagram.responded` | Recipient replied                 | Conversational flow |
| `instagram.edited`    | Text changed via API or dashboard | Sync content        |
| `instagram.deleted`   | Unsend (deleted for everyone)     | Remove from history |
| `instagram.failed`    | Failed after retries              | Alert / retry       |
| `instagram.cancelled` | Queue or schedule cancelled       | Update status       |

### Messages you receive

| Event                       | When it fires              | What to do with it |
| --------------------------- | -------------------------- | ------------------ |
| `instagram.received`        | New DM in synced inbox     | Bot, support       |
| `instagram.inbound.edited`  | Sender edited the message  | Sync conversation  |
| `instagram.inbound.deleted` | Sender deleted the message | Update history     |

### Connection (instance)

| Event                                   | When it fires                | What to do with it    |
| --------------------------------------- | ---------------------------- | --------------------- |
| `instagram.instance.connected`          | Session ok, **ACTIVE**       | Enable sends          |
| `instagram.instance.disconnected`       | Session lost                 | Pause sends, alert    |
| `instagram.instance.challenge_required` | Instagram security challenge | Complete verification |

***

## Payload per event

<AccordionGroup>
  <Accordion title="instagram.sent">
    ```json theme={null}
    {
      "event": "instagram.sent",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:00:00.000Z",
      "data": {
        "to": "target_user",
        "type": "TEXT",
        "status": "SENT",
        "sentAt": "2026-07-06T12:00:00.000Z",
        "externalId": "340282366841710301244259849902874331233"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.delivered">
    ```json theme={null}
    {
      "event": "instagram.delivered",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:01:00.000Z",
      "data": {
        "to": "target_user",
        "status": "DELIVERED",
        "deliveredAt": "2026-07-06T12:01:00.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.read">
    ```json theme={null}
    {
      "event": "instagram.read",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:02:00.000Z",
      "data": {
        "to": "target_user",
        "status": "READ",
        "readAt": "2026-07-06T12:02:00.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.responded">
    ```json theme={null}
    {
      "event": "instagram.responded",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:05:00.000Z",
      "data": {
        "to": "target_user",
        "status": "RESPONDED",
        "respondedAt": "2026-07-06T12:05:00.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.edited">
    ```json theme={null}
    {
      "event": "instagram.edited",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:03:00.000Z",
      "data": {
        "to": "target_user",
        "status": "EDITED",
        "newContent": "Corrected text",
        "previousContent": "Original text",
        "threadId": "thread_abc",
        "source": "api"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.deleted">
    ```json theme={null}
    {
      "event": "instagram.deleted",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:10:00.000Z",
      "data": {
        "to": "target_user",
        "status": "DELETED",
        "deletedAt": "2026-07-06T12:10:00.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.failed">
    ```json theme={null}
    {
      "event": "instagram.failed",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T12:00:30.000Z",
      "data": {
        "to": "target_user",
        "status": "FAILED",
        "failedAt": "2026-07-06T12:00:30.000Z",
        "errorMessage": "user_not_reachable"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.cancelled">
    ```json theme={null}
    {
      "event": "instagram.cancelled",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "messageId": "msg_xyz",
      "timestamp": "2026-07-06T11:55:00.000Z",
      "data": {
        "to": "target_user",
        "status": "CANCELLED"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.received">
    ```json theme={null}
    {
      "event": "instagram.received",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "timestamp": "2026-07-06T12:15:00.000Z",
      "data": {
        "inboundId": "inb_abc",
        "from": "sender_user",
        "type": "TEXT",
        "bodyPreview": "Hi, I need help",
        "receivedAt": "2026-07-06T12:15:00.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.inbound.edited">
    ```json theme={null}
    {
      "event": "instagram.inbound.edited",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "timestamp": "2026-07-06T12:16:00.000Z",
      "data": {
        "inboundId": "inb_abc",
        "from": "sender_user",
        "newContent": "Hi, I need urgent help",
        "previousContent": "Hi, I need help"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.inbound.deleted">
    ```json theme={null}
    {
      "event": "instagram.inbound.deleted",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "timestamp": "2026-07-06T12:17:00.000Z",
      "data": {
        "inboundId": "inb_abc",
        "from": "sender_user"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.instance.connected">
    ```json theme={null}
    {
      "event": "instagram.instance.connected",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "timestamp": "2026-07-06T10:00:00.000Z",
      "data": {
        "status": "ACTIVE",
        "username": "your_username",
        "message": "Session connected"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.instance.disconnected">
    ```json theme={null}
    {
      "event": "instagram.instance.disconnected",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "timestamp": "2026-07-06T18:00:00.000Z",
      "data": {
        "status": "DISCONNECTED",
        "disconnectReason": "login_required",
        "message": "Session lost; reconnect required"
      }
    }
    ```
  </Accordion>

  <Accordion title="instagram.instance.challenge_required">
    ```json theme={null}
    {
      "event": "instagram.instance.challenge_required",
      "workspaceId": "clxx123...",
      "instanceId": "inst_abc",
      "timestamp": "2026-07-06T10:05:00.000Z",
      "data": {
        "status": "PENDING",
        "challenge": {
          "step_name": "verify_code"
        },
        "message": "Complete security challenge"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Next steps

* [Quick Start](/en/instagram-api/como-funciona/quick-start): connect and first DM
* [Introduction](/en/instagram-api/como-funciona/introducao): status lifecycle
* [Scopes](/en/instagram-api/como-funciona/escopos-api-key): key permissions
* [Webhooks (general guide)](/en/guides/webhooks/index)
