Create a webhook endpoint

Registers a new outbound webhook endpoint for the organization. The url must be a valid HTTPS URL and at least one event type is required. A signing secret (prefixed whsec_) is generated and returned only in this response — store it to verify delivery signatures, as it cannot be retrieved later.

Authentication

x-api-keystring

A scoped MvsPayApiKey, e.g. mvspay_live_…. Mint and scope keys from the dashboard (Settings → API Keys).

Request

This endpoint expects an object.
urlstringRequiredformat: "uri"

Destination URL; must use the https scheme.

eventslist of stringsRequired
Event types to subscribe to. At least one is required.
descriptionstring or nullOptional

Optional human-readable label.

Response

The created webhook endpoint, including the one-time signing secret.

idstring
urlstringformat: "uri"
eventslist of strings
secretstring

Signing secret (prefixed whsec_) used to verify delivery signatures. Returned only at creation.

isActiveboolean
created_atdatetime
descriptionstring or null

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error