Webhook Management
This endpoint group provides methods for managing webhooks associated with API keys, allowing applications to register webhook URLs and secrets, and for administrative purposes, to list API keys with verified webhooks.
Endpoints
POST /api/rpc (Method: ApiManagementRpc.registerWebhook)
Description: Registers a webhook URL and secret for the calling application, identified by its API key.
Request Body:
{ "method": "ApiManagementRpc.registerWebhook", "params": { "webhookUrl": "https://example.com/webhook", "webhookSecret": "your_secret_key_at_least_16_chars" } }Parameters:
Name Type Required Description webhookUrlStringYes A valid, publicly accessible URL where webhook events will be sent. webhookSecretStringNo A secret string, at least 16 characters long, used to sign webhook payloads. If provided, X-Webhook-Secretheader will be included in webhook calls.Response:
{ "success": true, "data": { "success": true, "status": "verified" } }Or, if the connectivity test fails:
{ "success": true, "data": { "success": true, "status": "unreachable", "error": "Error message details" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "ApiManagementRpc.registerWebhook", "params": { "webhookUrl": "https://example.com/my-app-webhook", "webhookSecret": "mySuperSecureWebhookSecret123" } }'
POST /api/rpc (Method: ApiManagementRpc.listApiKeysForWebhook)
Description: Lists all API keys that have a verified webhook URL, for use in dropdown selectors.
Request Body:
{ "method": "ApiManagementRpc.listApiKeysForWebhook", "params": {} }Parameters:
Name Type Required Description No parameters Response:
{ "success": true, "data": [ { "value": "654321098765432109876543", "label": "My Application API Key" }, { "value": "123456789012345678901234", "label": "API Key ending in ...01234" } ] }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_ADMIN_API_KEY" \ -d '{ "method": "ApiManagementRpc.listApiKeysForWebhook", "params": {} }'