Skip to content

Add a webhook endpoint

POST
/v1/webhooks
curl --request POST \
--url https://deeperesearch.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://example.com/hooks/deeper", "events": [ "research.completed", "research.failed" ] }'

Registers a public https URL for events. The signing secret is returned only here, so store it.

Media typeapplication/json
object
url
required

A public https URL.

string
>= 1 characters <= 2000 characters
events

Event types to send. Defaults to all of them.

Array<string>
>= 1 items
Allowed values: research.completed research.failed research.cancelled research.run.completed research.merge.completed research.merge.failed

Example

{
"url": "https://example.com/hooks/deeper",
"events": [
"research.completed",
"research.failed"
]
}

The endpoint and its signing secret

Media typeapplication/json
object
id
required
string format: uuid
object
required
string
Allowed value: webhook_endpoint
url
required
string
events
required
Array<string>
Allowed values: research.completed research.failed research.cancelled research.run.completed research.merge.completed research.merge.failed
created_at
required
string
secret
required
string

Example

{
"object": "webhook_endpoint",
"events": [
"research.completed"
]
}

The body isn’t valid JSON (invalid_json)

Media typeapplication/json
object
error
required
object
code
required

Stable, machine-readable error code. See Errors in the docs.

string
message
required

What went wrong, written for people

string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Missing or invalid API key (unauthorized)

Media typeapplication/json
object
error
required
object
code
required

Stable, machine-readable error code. See Errors in the docs.

string
message
required

What went wrong, written for people

string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The key lacks the scope this needs (forbidden)

Media typeapplication/json
object
error
required
object
code
required

Stable, machine-readable error code. See Errors in the docs.

string
message
required

What went wrong, written for people

string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The body is over 128 KB (body_too_large)

Media typeapplication/json
object
error
required
object
code
required

Stable, machine-readable error code. See Errors in the docs.

string
message
required

What went wrong, written for people

string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Invalid request; the message names the field (invalid_request, exceeds_max_cost, vendor_unavailable, …)

Media typeapplication/json
object
error
required
object
code
required

Stable, machine-readable error code. See Errors in the docs.

string
message
required

What went wrong, written for people

string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Rate limit, spending limit or quota reached (rate_limited, limit_reached, quota_exceeded). See Retry-After.

Media typeapplication/json
object
error
required
object
code
required

Stable, machine-readable error code. See Errors in the docs.

string
message
required

What went wrong, written for people

string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}