Docs
ENFR
Dashboard
API reference

Webhook endpoints

The HTTPS URLs where Monerails sends events. Up to 10 per business, test and live together. See Webhooks to verify signatures.

The webhook endpoint object

Attributes
idstring

Unique identifier (UUID).

livemodeboolean

true for live objects, false for test objects.

objectstring

Always webhook_endpoint.

urlstring

HTTPS URL that receives the events.

eventsarray

Subscribed event types. * means all, payout.* all payout events.

statusstring
enableddisabled
secretstring

Signing secret (whsec_…). Only in the original 201 response to the creation, never afterwards.

created_atstring

Creation time, ISO 8601 (UTC).

The webhook endpoint object
{
  "id": "9a661b6d-2895-414e-b1d1-51e473582cbb",
  "object": "webhook_endpoint",
  "livemode": false,
  "url": "https://example.com/webhooks/monerail",
  "events": [
    "collection.succeeded",
    "payout.*"
  ],
  "status": "enabled",
  "created_at": "2026-10-30T13:47:06.394Z"
}

Create a webhook endpoint

POST/v1/webhook_endpoints

The 201 response includes the signing secret. Store it: it is never returned again, not even when the request is replayed with the same Idempotency-Key. If you lose it, roll it with Rotate the secret. Live endpoints need an approved business verification.

Key roles: Owner or Developer

Body
urlstringRequired

HTTPS URL, up to 500 characters, without user:password@. The host must be a domain name: IP addresses are refused.

eventsarrayRequired

Event types to receive: exact types, prefix.* or *.

Returns

Returns the new webhook endpoint object with 201.

Errors worth handling
HTTPCodeDescription
400url_invalidNot an HTTPS URL with a domain name, or it contains user:password@. IP addresses are refused.
400parameter_invalidA parameter has the wrong type or value. See param.
400limit_reachedA limit is reached: 10 webhook endpoints per business (test and live together), or 500 beneficiaries per mode.
403permission_deniedThe key’s creator does not have the role required for this operation.
curl https://api.monerails.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks/monerail",
    "events": [
      "collection.succeeded",
      "payout.*"
    ]
  }'
Response201
{
  "id": "9a661b6d-2895-414e-b1d1-51e473582cbb",
  "object": "webhook_endpoint",
  "livemode": false,
  "url": "https://example.com/webhooks/monerail",
  "events": [
    "collection.succeeded",
    "payout.*"
  ],
  "status": "enabled",
  "created_at": "2026-10-30T13:47:06.394Z",
  "secret": "whsec_9b89c8bdc0b89f67637e017c49f9539d68b2132ea7492041"
}

Retrieve a webhook endpoint

GET/v1/webhook_endpoints/{id}

The secret is not included.

Key roles: Owner or Developer

Path parameters
idstringRequired

ID of the endpoint.

Returns

Returns the webhook endpoint object.

Errors worth handling
HTTPCodeDescription
403permission_deniedThe key’s creator does not have the role required for this operation.
404resource_missingNo object with this ID in this mode.
curl https://api.monerails.com/v1/webhook_endpoints/9a661b6d-2895-414e-b1d1-51e473582cbb \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "id": "9a661b6d-2895-414e-b1d1-51e473582cbb",
  "object": "webhook_endpoint",
  "livemode": false,
  "url": "https://example.com/webhooks/monerail",
  "events": [
    "collection.succeeded",
    "payout.*"
  ],
  "status": "enabled",
  "created_at": "2026-10-30T13:47:06.394Z"
}

List webhook endpoints

GET/v1/webhook_endpoints

Newest first. Test and live endpoints are listed separately, by the mode of the key.

Key roles: Owner or Developer

Query parameters
limitintegerOptionalDefault 20

Number of objects to return, 1 to 100.

starting_afterstringOptional

Cursor: the ID of the last object of the previous page.

Returns

Returns a list object: data holds up to limit webhook_endpoint objects, and has_more tells whether more follow.

Errors worth handling
HTTPCodeDescription
403permission_deniedThe key’s creator does not have the role required for this operation.
curl "https://api.monerails.com/v1/webhook_endpoints?limit=10" \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "object": "list",
  "url": "/v1/webhook_endpoints",
  "data": [
    {
      "id": "9a661b6d-2895-414e-b1d1-51e473582cbb",
      "object": "webhook_endpoint",
      "livemode": false,
      "url": "https://example.com/webhooks/monerail",
      "events": [
        "collection.succeeded",
        "payout.*"
      ],
      "status": "enabled",
      "created_at": "2026-10-30T13:47:06.394Z"
    }
  ],
  "has_more": false
}

Delete a webhook endpoint

DELETE/v1/webhook_endpoints/{id}

Stops all deliveries to this URL, including pending retries.

Key roles: Owner or Developer

Path parameters
idstringRequired

ID of the endpoint.

Returns

Returns { id, object, deleted: true }.

Errors worth handling
HTTPCodeDescription
403permission_deniedThe key’s creator does not have the role required for this operation.
404resource_missingNo object with this ID in this mode.
curl -X DELETE https://api.monerails.com/v1/webhook_endpoints/9a661b6d-2895-414e-b1d1-51e473582cbb \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "id": "9a661b6d-2895-414e-b1d1-51e473582cbb",
  "object": "webhook_endpoint",
  "deleted": true
}

Rotate the secret

POST/v1/webhook_endpoints/{id}/rotate_secret

Returns the endpoint with its new signing secret, shown only in this response. The old secret stays valid for overlap_minutes; meanwhile every delivery carries two v1 signatures (new secret first). One rotation per minute at most. See Webhooks.

Key roles: Owner or Developer

Path parameters
idstringRequired

ID of the endpoint.

Body
overlap_minutesintegerOptional

How long the old secret keeps signing deliveries, in minutes: 0 to 10080. Default 1440 (24 hours). 0 revokes it immediately.

Returns

Returns the webhook endpoint object.

Errors worth handling
HTTPCodeDescription
400parameter_invalidA parameter has the wrong type or value. See param.
403permission_deniedThe key’s creator does not have the role required for this operation.
404resource_missingNo object with this ID in this mode.
429rate_limitedA rate limit was reached. Wait for Retry-After seconds. See Rate limits.
curl https://api.monerails.com/v1/webhook_endpoints/9a661b6d-2895-414e-b1d1-51e473582cbb/rotate_secret \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "overlap_minutes": 1440
  }'
Response200
{
  "id": "9a661b6d-2895-414e-b1d1-51e473582cbb",
  "object": "webhook_endpoint",
  "livemode": false,
  "url": "https://example.com/webhooks/monerail",
  "events": [
    "collection.succeeded",
    "payout.*"
  ],
  "status": "enabled",
  "created_at": "2026-10-30T13:47:06.394Z",
  "secret": "whsec_5c1d0e7a2b9f48d3a6e1c0b7f4d2a9e8c3b6f1a0d5e2c7b4",
  "previous_secret_expires_at": "2026-11-02T09:30:00.000Z"
}