Subscriptions
Manage the lifecycle of your webhook endpoints. A subscription defines where BMG sends data and which specific events trigger a notification.
POST /api/v1/subscriptions
Summary: Creates a new webhook subscription.
Request Body (SubscriptionRequest)
| Field | Type | Required | Description |
|---|---|---|---|
targetUrl |
string |
Yes | The HTTPS endpoint on your server (Max 255 chars). |
secret |
string |
Yes | Shared secret (Min 8 chars) for HMAC-SHA256 signing. |
events |
string[] |
Yes | List of technical event names (e.g., loan.approved). |
description |
string |
No | Internal label (Max 500 chars). |
method |
string |
No | HTTP verb: POST (default), PUT, or PATCH. |
Implementation Examples
cURL Request:
curl --request POST \
--url https://api.bmgmoney.com/api/v1/subscriptions \
--header 'Content-Type: application/json' \
--header 'X-Context-Entity: Employer' \
--header 'X-Context-Key: 55012' \
--data '{
"targetUrl": "https://api.partner.com/v1/webhooks",
"secret": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"events": ["loan.approved"],
"description": "Primary Production Sync"
}'
Success Response (201 Created):
{
"data": {
"id": 10245,
"createdAt": "2026-01-23T14:30:00Z"
}
}