Webhook map
agentaction(agent.action)cancelled(agent.cancelled)completed(agent.completed)failed(agent.failed)started(agent.started)
batchScrapecompleted(batchScrape.completed)page(batchScrape.page)started(batchScrape.started)
crawlcompleted(crawl.completed)page(crawl.page)started(crawl.started)
extractcompleted(extract.completed)failed(extract.failed)started(extract.started)
HTTP handler setup
app/api/webhook/route.ts
Events
Agent
Action
agent.action
The agent executed a tool action
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | agent.action | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Cancelled
agent.cancelled
An agent job was cancelled
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | agent.cancelled | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Completed
agent.completed
An agent job completed successfully
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | agent.completed | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Failed
agent.failed
An agent job failed
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | agent.failed | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Started
agent.started
An agent job started
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | agent.started | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Batch Scrape
Completed
batchScrape.completed
A batch scrape job completed
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | batch_scrape.completed | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Page
batchScrape.page
A URL was scraped in a batch job
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | batch_scrape.page | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Started
batchScrape.started
A batch scrape job started
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | batch_scrape.started | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Crawl
Completed
crawl.completed
A crawl job finished
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | crawl.completed | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Page
crawl.page
A page was scraped during a crawl
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | crawl.page | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Started
crawl.started
A crawl job started processing
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | crawl.started | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Extract
Completed
extract.completed
An extract job completed successfully
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | extract.completed | Yes | — |
id | string | Yes | — |
data | object[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
data full type
data full type
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Failed
extract.failed
An extract job failed
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | extract.failed | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example
Started
extract.started
An extract job started
Payload
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
type | extract.started | Yes | — |
id | string | Yes | — |
data | never[] | Yes | — |
metadata | object | No | — |
error | string | No | — |
metadata full type
metadata full type
Response data full type
Response data full type
webhookHooks example