API referenceWebhooks
Rotate a webhook secret
POST
Needs a key withwebhooks:write
Gives an endpoint a new signing secret, in this response only. Deliveries are signed with it from now on; the old one stops working at once.
Requires scope webhooks:write.
apiKeyheader
x-api-key<token>An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.
endpointId*stringLength
1 <= length <= 128The endpoint and its new signing secret.
application/json- response
endpoint*A webhook endpoint. Its signing secret is never listed: it's shown once, when the endpoint is created or its secret is rotated.
secret*stringThe signing secret (whsec_...). Shown this once: store it to verify Remagica-Signature.
curl -X POST 'https://api.remagica.com/api/v1/webhook-endpoints/whe_4f5a8b9c0d1e2f3a/secret'Example Response
{ "endpoint": { "createdAt": "2026-10-21T12:00:00.000Z", "createdByUserId": "f3656abb-5b3d-4f60-8e2a-1d9c6b4f7e05", "description": "Product shots for the autumn campaign.", "disabledReason": "string", "enabled": true, "events": [ "generation.succeeded" ], "id": "whe_4f5a8b9c0d1e2f3a", "updatedAt": "2026-10-21T12:00:00.000Z", "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png" }, "secret": "whsec_3q2-7wQXjK0h0lC9mF1n8Yy4bVt6sJpR2aUeZoLkHdE"}