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

# Status Webhooks

> To help you monitor the status of graph ingestion, duohub allows you to register webhooks to receive status updates.

## Registering a Webhook

You can register a webhook by adding a a webhook URL to the `webhookUrl` property when creating a memory.

See more details in the [Create Memory](/api-reference/memories/create) endpoint.

```json theme={null}
{
  ...
  "webhookUrl": "https://your-webhook-url.com/graph-status"
  ...
}
```

Alternatively, you can register a webhook when creating a memory using the dashboard.

You will find the field in the "Settings" section of the memory creation workflow.

## Webhook Payloads

You will receive a POST request to the webhook URL with the following or similar payload:

```json theme={null}
{
  "event": {
    "memoryID": "26651465-d9ae-415c-92ee-94f675fc9836",
    "batchID": "6ec30ec4-3c26-4a3e-98b3-8d713a44a797",
    "totalSamples": 2,
    "processedSamples": 2,
    "status": "processing",
    "message": "Graph ingestion in progress. This may take a few minutes."
  },
  "timestamp": "2024-12-16T06:30:20.191Z"
}
```

You will receive a POST request to the webhook URL at the following events:

* Graph ingestion starting
* Graph ingestion waiting for compute environments
* Graph ingestion in progress
* All samples completed, starting graph generation
* Graph ingestion and generation complete

The status field is an enum with one of the following values:

```javascript theme={null}
enum Status {
  pending = 'pending',
  processing = 'processing',
  success = 'success',
  failed = 'failed',
}
```

If you update a graph, you will receive the aforementioned sequence of events again.
