Webhook endpoints are managed through the REST API. Each registered endpoint has a URL, a list of subscribed events, an auto-generated signing secret, and an active or inactive status.
Register an endpoint via REST API:
POST /wp-json/dmsi-api/v1/webhooks
Authorization: Bearer dmsi_key_<your-api-key>
Content-Type: application/json
{
"url": "https://yourservice.com/webhooks/ddls",
"events": ["customer.created", "license.activated"],
"is_active": true
}
Response:
{
"id": 12,
"url": "https://yourservice.com/webhooks/ddls",
"events": ["customer.created", "license.activated"],
"secret": "whs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"is_active": true,
"created_at": "2026-03-31T00:00:00Z"
}
The secret is returned once at registration time. Store it immediately — it cannot be retrieved again, only regenerated. The secret is stored encrypted (AES-256-CBC) in the database.
Subscribe to all events:
Pass "events": ["*"] to receive all 11 event types on a single endpoint.
Managing endpoints:
| Method | Path | Action |
|---|---|---|
| GET | /wp-json/dmsi-api/v1/webhooks | List all registered endpoints |
| GET | /wp-json/dmsi-api/v1/webhooks/{id} | Get a single endpoint |
| PUT | /wp-json/dmsi-api/v1/webhooks/{id} | Update URL, events, or active status |
| DELETE | /wp-json/dmsi-api/v1/webhooks/{id} | Delete an endpoint |
| POST | /wp-json/dmsi-api/v1/webhooks/{id}/test | Send a test delivery to the endpoint |
