Rotate the webhook's signing secret
https://platform.casafari.com/v1/alerts/webhooks/rotate-secretΣτείλτε το Authorization: Bearer $CASAFARI_API_KEY: ένα platform API key (cf_sk_...) από το console, ή ένα διακριτικό πρόσβασης OAuth· το X-API-Key μεταφέρει επίσης το κλειδί. Δείτε τα platform API keys. Free: 0 tokens.
The platform's OpenAPI file leaves the shape open; what is shown comes from the same definitions the platform publishes elsewhere: request: the description of the same backend; response 200: the hub's fragment from the platform's contract.
Μέσω MCP: κανένα· αυτό το προϊόν είναι διαθέσιμο μόνο μέσω REST.
Description
Free (δεν χρησιμοποιεί tokens).
Σώμα αιτήματος
Content type application/json. Προαιρετικό. Τύπος: object.
immediatebooleanΠαράδειγμα αιτήματος
Μόνο placeholders: αντικαταστήστε το token και τις τιμές με τα δικά σας.
curl -X POST "https://platform.casafari.com/v1/alerts/webhooks/rotate-secret" \
-H "Authorization: Bearer $CASAFARI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"immediate": false
}'Αποκρίσεις
200 Success.
Τύπος: object.
Εμφάνιση της δομής της απόκρισης (1 πεδία)
secretstringαπαιτείταιwhsec_…).Παράδειγμα με ενδεικτικές τιμές (τα ids και τα μεγέθη είναι υποθετικά)
{
"secret": "whsec_Q2nV8xR4tY6uI1oP3aS5dF7gH9jK0lZc"
}Σφάλματα
Κάθε σφάλμα συνοδεύεται από ένα σώμα application/problem+json (RFC 9457) με type (μια σελίδα που το επεξηγεί), title, status, detail (τι πρέπει να κάνετε), instance, code και request_id (τι να αναφέρετε για υποστήριξη). Ένας κωδικός 402 μεταφέρει ένα upgrade_url, ενώ ένας 429 μια κεφαλίδα Retry-After. Οι κωδικοί που μπορεί να φέρει κάθε κατάσταση:
- 400
invalid_request,key_in_query(https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query) - 401
unauthorized,invalid_credential,credential_revoked,token_expired(https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired) - 403
insufficient_scope,not_entitled,account_suspended(https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended) - 404
not_found(https://platform.casafari.com/errors/not-found) - 405
method_not_allowed(https://platform.casafari.com/errors/method-not-allowed) - 409
conflict(https://platform.casafari.com/errors/conflict) - 413
payload_too_large(https://platform.casafari.com/errors/payload-too-large) - 415
unsupported_media_type(https://platform.casafari.com/errors/unsupported-media-type) - 422
validation_failed(https://platform.casafari.com/errors/validation-failed) - 429
rate_limited,request_limit_reached(https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/request-limit-reached) - 500
internal_error(https://platform.casafari.com/errors/internal-error) - 502
upstream_error(https://platform.casafari.com/errors/upstream-error) - 503
unavailable(https://platform.casafari.com/errors/unavailable) - 504
upstream_timeout(https://platform.casafari.com/errors/upstream-timeout)