Skip to main content
POST
/
v0
/
webhooks
cURL
curl --request POST \
  --url https://api.exa.ai/websets/v0/webhooks \
  --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.create(
params={
"url": "https://api.yourapp.com/webhooks/exa",
"events": ["webset.completed", "enrichment.completed"],
}
)

print(f"Created 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.create({
url: "https://api.yourapp.com/webhooks/exa",
events: ["webset.completed", "enrichment.completed"],
});

console.log(`Created 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. Webhook deliveries are sent directly to the registered URL. If your endpoint responds with a 3xx redirect, the delivery will be treated as a failure. Always register the final destination URL.

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 .

Body

application/json
events
enum<string>[]
required

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>
required

The URL to send the webhook to

metadata
object

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

Response

200 - application/json

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