Skip to main content
PATCH
/
v0
/
webhooks
/
{id}
cURL
curl --request PATCH \
  --url https://api.exa.ai/websets/v0/webhooks/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "events": [],
  "url": "<string>",
  "metadata": {}
}
'
# pip install exa-py
from exa_py import Exa

exa = Exa("YOUR_EXA_API_KEY")

webhook = exa.websets.webhooks.update(
"webhook_id",
params={
"url": "https://api.yourapp.com/webhooks/exa-updated",
"events": ["webset.completed"],
},
)

print(f"Updated webhook: {webhook.id}")
// npm install exa-js
import Exa from "exa-js";
const exa = new Exa("YOUR_EXA_API_KEY");

const webhook = await exa.websets.webhooks.update("webhook_id", {
url: "https://api.yourapp.com/webhooks/exa-updated",
events: ["webset.completed"],
});

console.log(`Updated webhook: ${webhook.id}`);
{
  "id": "<string>",
  "object": "webhook",
  "events": [],
  "url": "<string>",
  "secret": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "metadata": {}
}
Redirects are not followed. If you update the URL, ensure it is the final destination. Endpoints that respond with a 3xx redirect will be treated as delivery failures.

Authorizations

x-api-key
string
header
required

Pass your Exa API key in the x-api-key header. You can also authenticate with Authorization: Bearer .

Path Parameters

id
string
required

The id of the webhook

Body

application/json
events
enum<string>[]

The events to trigger the webhook

Required array length: 1 - 19 elements
Available options:
webset.created,
webset.deleted,
webset.paused,
webset.idle,
webset.search.created,
webset.search.canceled,
webset.search.completed,
webset.search.updated,
import.created,
import.completed,
webset.item.created,
webset.item.enriched,
monitor.created,
monitor.updated,
monitor.deleted,
monitor.run.created,
monitor.run.completed,
webset.export.created,
webset.export.completed
url
string<uri>

The URL to send the webhook to

metadata
object

Set of key-value pairs you want to associate with this object.

Response

Webhook

id
string
required

The unique identifier for the webhook

object
string
default:webhook
required
Allowed value: "webhook"
status
enum<string>
required

The status of the webhook

Available options:
active,
inactive
events
enum<string>[]
required

The events to trigger the webhook

Minimum array length: 1
Available options:
webset.created,
webset.deleted,
webset.paused,
webset.idle,
webset.search.created,
webset.search.canceled,
webset.search.completed,
webset.search.updated,
import.created,
import.completed,
webset.item.created,
webset.item.enriched,
monitor.created,
monitor.updated,
monitor.deleted,
monitor.run.created,
monitor.run.completed,
webset.export.created,
webset.export.completed
url
string<uri>
required

The URL to send the webhook to

secret
string | null
required

The secret to verify the webhook signature. Only returned on Webhook creation.

createdAt
string<date-time>
required

The date and time the webhook was created

updatedAt
string<date-time>
required

The date and time the webhook was last updated

metadata
object

The metadata of the webhook