remagicaDocs home
API referenceWebhooks

Create a webhook endpoint

POST
/webhook-endpoints

Needs a key withwebhooks:write

Adds an endpoint that receives the events you pick, POSTed as JSON and signed with its secret (Remagica-Signature). The secret is in this response only: store it. A workspace has at most 20 endpoints.

Requires scope webhooks:write.

Authorization

apiKey
headerx-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.

Request Body

application/json
  1. body

A new webhook endpoint.

description?string

A note for your team: what it's for.

Lengthlength <= 200
events*array<>

The events it receives (at least one).

Items1 <= items <= 13
url*string

Where deliveries are POSTed: an https:// URL on the public internet (private, loopback and link-local addresses are refused).

Length1 <= length <= 2048

Response Body

The endpoint and its signing secret.

application/json
  1. 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*string

The signing secret (whsec_...). Shown this once: store it to verify Remagica-Signature.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/webhook-endpoints' \  -H 'Content-Type: application/json' \  -d '{  "events": [    "generation.succeeded"  ],  "url": "https://example.com/remagica/webhooks"}'
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"}