Skip to main content
POST
/
fleets
/
{fleetId}
/
webhooks
/
{webhookId}
/
rotate
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 webhookSubscriptionCreated = await client.webhooks.rotate('fleet_abc123', 'webhook_abc123');

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

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"

Response

Webhook signing secret rotated. The new one-time signing secret is returned as secret.

Webhook subscription response for create and rotate. Includes the one-time secret field.

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

One-time webhook signing secret returned only by create and rotate responses. The field name is secret.

Example:

"whsec_abc123"