Skip to main content
PUT
/
fleets
/
{fleetId}
/
webhooks
/
{webhookId}
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

const webhookSubscription = await client.webhooks.update('fleet_abc123', 'webhook_abc123');

console.log(webhookSubscription.id);
{
  "createdAt": "<string>",
  "enabled": true,
  "fleetId": "<string>",
  "events": [],
  "id": "<string>",
  "updatedAt": "<string>",
  "url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

fleetId
string
required
Minimum string length: 1
Example:

"fleet_abc123"

webhookId
string
required
Minimum string length: 1
Example:

"webhook_abc123"

Body

application/json
enabled
boolean

Whether deliveries are enabled for this subscription.

Example:

true

events
enum<string>[]

Event names to deliver. Omit to subscribe to all non-test events.

webhook.test is reserved for the test endpoint and cannot be subscribed to.

Available options:
agent.created,
agent.updated,
agent.deleted,
thread.created,
thread.status.changed,
thread.completed,
thread.failed,
turn.created,
turn.completed,
turn.failed,
message.created,
approval.requested,
approval.resolved,
approval.granted,
schedule.created,
schedule.deleted,
schedule.triggered,
connection.attached,
connection.detached
url
string<uri>

HTTPS endpoint that will receive webhook deliveries.

Example:

"https://example.com/webhook"

{key}
any

Response

Webhook subscription updated.

Webhook subscription metadata returned by list, get, and update. The one-time signing secret is not returned here.

createdAt
string
required
enabled
boolean
required
fleetId
string
required
events
enum<string>[]
required
Available options:
agent.created,
agent.updated,
agent.deleted,
thread.created,
thread.status.changed,
thread.completed,
thread.failed,
turn.created,
turn.completed,
turn.failed,
message.created,
approval.requested,
approval.resolved,
approval.granted,
schedule.created,
schedule.deleted,
schedule.triggered,
connection.attached,
connection.detached,
webhook.test
id
string
required
updatedAt
string
required
url
string
required