What webhooks do
MemePerfect sendsPOST requests to your endpoint when configured events occur.
You can use this to:
- trigger your own bot or worker
- pipe alerts into internal systems
- react programmatically without polling
Endpoints to configure webhook
GET /webhookto read current configurationPUT /webhookto enable/disable and set URL
1) Read webhook config
2) Enable webhook and set URL
secret securely. It may only be shown when generated/rotated.
Verification handshake
When your URL is added or changed, MemePerfect sends:- event type:
webhook.endpoint_verification - body includes
data.challenge
- return
2xx - return JSON with the same
challengevalue
Notification event payload
When a Strategy match is dispatched, MemePerfect sendsnotification.dispatched.
Example payload:
Webhook headers and signature
Each delivery includes:X-MP-Webhook-IdX-MP-Event-IdX-MP-Event-TypeX-MP-TimestampX-MP-Signature
Node.js signature verification example
Operational notes
- Webhook delivery is best-effort and does not block notification processing.
- If URL changes, verification runs again and
verifiedAtresets until success. - Setting
urltonullclears URL, secret, and verification state.
APIs
Full endpoint reference for strategies, notifications, performance, and webhook config.
API Walkthrough
End-to-end integration example from create to webhook consumption.