> For the complete documentation index, see [llms.txt](https://docs.graphlit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlit.dev/api-guides/use-cases/production/webhook-content-ingestion.md).

# Configure Content Ingestion Webhook

## User Intent

"How do I get notified when content is ingested? Show me webhook configuration."

## Operation

**SDK Method**: Configure webhook in Developer Portal\
**Use Case**: Real-time content ingestion notifications

***

## Configuration

1. **Developer Portal** → Webhooks → Create Webhook
2. **URL**: Your webhook endpoint
3. **Events**: Select `content.ingested`, `content.updated`
4. **Secret**: Webhook signing secret

***

## Webhook Payload

```json
{
  "event": "content.ingested",
  "contentId": "content-123",
  "name": "document.pdf",
  "type": "FILE",
  "status": "COMPLETED",
  "timestamp": "2024-01-15T10:30:00Z"
}
```

***

## Handling Webhooks (TypeScript)

```typescript
import express from 'express';
import crypto from 'crypto';

const app = express();
app.use(express.json());

app.post('/graphlit-webhook', (req, res) => {
  // Verify signature
  const signature = req.headers['x-graphlit-signature'];
  const payload = JSON.stringify(req.body);
  const secret = process.env.WEBHOOK_SECRET!;
  
  const expectedSig = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  
  if (signature !== expectedSig) {
    return res.status(401).send('Invalid signature');
  }
  
  // Process event
  const { event, contentId } = req.body;
  console.log(`Received ${event} for ${contentId}`);
  
  // Your logic here
  
  res.status(200).send('OK');
});

app.listen(3000);
```

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/production/webhook-content-ingestion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
