Create webhook endpoint
Creates a new webhook endpoint bound to the caller owner scope (merchant, tenant, or platform). The HMAC signing secret is returned ONCE in this response — store it securely. Subscribed events must exist in the catalog and be visible to the caller. URL must use HTTPS.
Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.miracle.com/v1/webhooks/endpoints" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com", "events": [ "string" ] }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"ownerType": "merchant",
"ownerId": "string",
"tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
"url": "http://example.com",
"description": "string",
"events": [
"string"
],
"secret": "string",
"status": "active",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null
}
}List webhook delivery records
Returns delivery records for webhook endpoints owned by the caller. Merchant callers see only records for their own endpoints. Filters: `endpoint_id`, `event_type`, `status`, `created_after`, `created_before`. Cursor-based pagination via `cursor` + `limit` (default 20, max 100).
Delete webhook endpoint
Soft-deletes a webhook endpoint — deliveries stop immediately. The record is preserved for audit (deletedAt is set). Issue a new endpoint if you need to resume deliveries.