DMSI Webhooks exposes a REST API under the dmsi/v1 namespace for managing endpoints and querying logs programmatically.
Base URL #
https://your-site.com/wp-json/dmsi/v1/webhooks/Authentication #
Use WordPress cookie authentication (nonce-based) or application passwords. All routes require the manage_dmsi_webhooks capability and a valid plugin license.
Rate Limiting #
60 requests per minute per WordPress user. Exceeding this returns 429 Too Many Requests. The counter resets after 60 seconds.
Endpoints #
List Webhook Endpoints #
GET /wp-json/dmsi/v1/webhooks/endpointsReturns a paginated list of all configured webhook endpoints. Secrets are masked as *{last4}.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 20) |
—
Create Webhook Endpoint #
POST /wp-json/dmsi/v1/webhooks/endpoints
Content-Type: application/json
Request Body:
{
"name": "My Integration",
"url": "https://your-server.com/webhook",
"timeout": 30,
"max_retries": 5,
"custom_headers": {"Authorization": "Bearer token"},
"auto_subscribe": false,
"debug_mode": false
}
Response: Created endpoint object. The signing_secret_plain field contains the full signing secret — shown only in this response.
Update Webhook Endpoint #
PUT /wp-json/dmsi/v1/webhooks/endpoints/{id}
Content-Type: application/json
Request body accepts the same fields as Create. The signing secret cannot be changed via this endpoint — to rotate the signing secret, use the Rotate Secret button on the endpoint edit page in the WordPress admin (DDLS > Webhooks > Endpoints). See Signing Secret Rotation for details.
Delete Webhook Endpoint #
DELETE /wp-json/dmsi/v1/webhooks/endpoints/{id}Cascades: deletes all subscriptions and log entries for this endpoint.
List Events #
GET /wp-json/dmsi/v1/webhooks/eventsReturns all registered events with category, description, and sample payload.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category (e.g., license, payment) |
—
List Delivery Logs #
GET /wp-json/dmsi/v1/webhooks/logsReturns paginated delivery logs.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
endpoint_id | integer | Filter by endpoint |
event_name | string | Filter by event name |
status | string | Filter by status: pending, delivered, failed, retrying |
page | integer | Page number |
per_page | integer | Results per page |
—
Get Log Detail #
GET /wp-json/dmsi/v1/webhooks/logs/{webhook_id}Returns full delivery detail for a specific webhook_id (e.g., whk_...). Includes payload, request headers, response code, response body, and response headers.
Send Test Delivery #
POST /wp-json/dmsi/v1/webhooks/test
Content-Type: application/json
Request Body:
{
"endpoint_id": 1
}
Sends a synchronous test delivery and returns the full result immediately. Not queued via Action Scheduler.
Response:
{
"success": true,
"response_code": 200,
"response_body": "OK",
"duration_ms": 142,
"webhook_id": "whk_..."
}
Related Topics #
- REST API Authentication
- License and Access Issues
- Developer Reference: Filters
