App öffnen
Moonborn — API · admin

Rotate webhook secrets older than the configured max-age (admin/cron entrypoint)

Walks all webhook endpoints and rotates current secret when it exceeds max age (default 90 days). Grace window keeps the previous secret valid for the configured `secret_rotation_grace_seconds` (default 7 days) so consumers can update at their own pace. Returns per-endpoint result.

POST/v1/admin/webhooks/rotate-secretsscope · Bearer (API key or session JWT)

Responses

200Rotation cycle completed
403Forbidden — platform admin only
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X POST https://api.moonborn.co/v1/admin/webhooks/rotate-secrets \
  -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';

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

const result = await client.admin.adminRotateWebhookSecrets();
Python
import os
from moonborn import Moonborn

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

result = client.admin.admin_rotate_webhook_secrets()