Skip to main content
Use this page to implement webhook delivery end to end: configure endpoint, pass verification, verify signatures, and process strategy notifications.

What webhooks do

MemePerfect sends POST 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 /webhook to read current configuration
  • PUT /webhook to enable/disable and set URL
See full auth and base URL details in APIs.

1) Read webhook config

Example response:

2) Enable webhook and set URL

Example response:
Save 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
Your endpoint must:
  1. return 2xx
  2. return JSON with the same challenge value
Example verification payload:
Example verification response from your endpoint:

Notification event payload

When a Strategy match is dispatched, MemePerfect sends notification.dispatched. Example payload:

Webhook headers and signature

Each delivery includes:
  • X-MP-Webhook-Id
  • X-MP-Event-Id
  • X-MP-Event-Type
  • X-MP-Timestamp
  • X-MP-Signature
Signature format:
Use the raw request body exactly as received. Do not re-serialize JSON before verification.

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 verifiedAt resets until success.
  • Setting url to null clears 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.