Mediloop

WEBHOOKS

Webhook examples

Implementation examples for receiving and verifying Mediloop webhook events.

Open in API Explorer

Real-time

Event driven

As events happen

Reliable delivery

Automatic retries

Exponential backoff

Signatures

HMAC SHA-256

Verify every payload

Endpoint limit

100 endpoints

Per tenant

Payload

JSON

Versioned envelope

Node.js

Express handler

app.post('/webhooks/mediloop', express.raw({type:'application/json'}), (req,res) => {
  verifyMediloopSignature(req);
  queueEvent(JSON.parse(req.body));
  res.sendStatus(200);
});

Python

Flask

@app.post('/webhooks/mediloop')
def webhook():
    raw = request.get_data()
    verify_signature(raw, request.headers)
    queue_event(json.loads(raw))
    return '', 200

PHP

PHP

$raw = file_get_contents('php://input');
verify_mediloop_signature($raw, getallheaders());
queue_event(json_decode($raw, true));
http_response_code(200);

Event routing

Route on event.type to small handlers and keep transport verification separate from business processing.

Idempotent processing

Persist event.id before applying side effects and reject already-processed events safely.

Testing tips