Webhooks

Rotate a repository webhook secret

Beta: webhook event coverage and payload schemas may evolve. See /docs/integrations/webhooks for supported events and delivery limits. Replaces a webhook's secret and returns the new secret once. Requires authenticated authority and enforces current resource policy.

post/api/repos/{owner}/{repo}/webhooks/{webhookId}/rotate-secret

Request

  • Base URL
    https://git.cafe
  • Auth
    • API key in cookie gc-session
    • or HTTP bearer
    • or HTTP basic
    • or HTTP token
    • or OAuth 2
      Authorization code: /api/oauth/authorize
      Token URL: /api/oauth/token scopes: repo:webhooks:write

Path parameters

ownerstring required
repostring required
webhookIdstring required

Request body

expectedVersioninteger required

Response

Beta: webhook event coverage and payload schemas may evolve. See /docs/integrations/webhooks for supported events and delivery limits.

secretstring required
previousExpiresAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.