Open app
Moonborn — API · webhooks

Update url, event subscription, description, or status

Status transitions: `active ↔ suspended` are reversible; `archived` is terminal (use DELETE for the explicit terminal action). Changing the URL does NOT rotate the secret — call `/rotate_secret` separately to invalidate the previous endpoint.

PATCH/v1/webhooks/{id}scope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
idreqstringWebhook endpoint id (e.g. `whe_*`).
Request body
FieldTypeDescription
urlstring
eventsstring · "persona.created" | "persona.updated" | "persona.deleted" | "persona.archived" | "persona.regenerated" | "persona.audit_failed" | "generation.run.started" | "generation.run.completed" | "generation.run.failed" | "subscription.upgraded" | "subscription.downgraded" | "subscription.cancelled" | "marketplace.persona.published" | "marketplace.persona.purchased" | "moderation.flagged" | "webhook.endpoint.test_ping" | object[]
descriptionstring
statusstring · "active" | "suspended" | "archived"

Responses

200OK
Body
FieldTypeDescription
endpointIdreqstring
orgIdreqstring
urlreqstring
eventsreqstring · "persona.created" | "persona.updated" | "persona.deleted" | "persona.archived" | "persona.regenerated" | "persona.audit_failed" | "generation.run.started" | "generation.run.completed" | "generation.run.failed" | "subscription.upgraded" | "subscription.downgraded" | "subscription.cancelled" | "marketplace.persona.published" | "marketplace.persona.purchased" | "moderation.flagged" | "webhook.endpoint.test_ping" | object[]
statusreqstring · "active" | "suspended" | "archived"
descriptionreqstring
secretsreqobject[]
createdAtreqstring
updatedAtreqstring
401Unauthenticated
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
404Endpoint not found
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
409Cannot transition out of archived
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
422Validation error
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X PATCH https://api.moonborn.co/v1/webhooks/<id> \
  -H "Authorization: Bearer $MOONBORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "url": "<string>",
      "events": [],
      "description": "<string>",
      "status": "active"
    }'
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.webhooks.updateWebhookEndpoint({
  id: '<id>',
  url: "<string>",
  events: [],
  description: "<string>",
  status: "active",
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.webhooks.update_webhook_endpoint(
    id="<id>",
    url="<string>",
    events=[],
    description="<string>",
    status="active",
)