Skip to main content

Webhooks

Webhooks let your backend react to what happens on EthioConnect — a room being created or closing, a user's session ending, a recording finishing, a moderator muting someone, or a scheduled job running. EthioConnect sends an HTTP POST to your endpoint for each event you subscribe to.

Subscribe​

Add an endpoint under Webhooks in your dashboard, or call the Webhooks API as a tenant admin:

curl -X POST https://rtc.ethioconnect.net/v1/webhooks \
-H "Authorization: Bearer $DASHBOARD_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"url": "https://api.your-app.com/hooks/ethioconnect",
"secret": "a-long-random-string-you-keep-secret",
"event_types": ["room.closed", "room.session.ended", "recording.completed"]
}'
FieldRules
urlUse HTTPS. It must resolve to a public host on the default port (443) — private, loopback, and cloud-metadata addresses are refused, and URLs with embedded credentials are rejected.
secretAt least 16 characters. Used to sign every delivery — see Verify signatures.
event_typesThe event types to receive. Pass an empty list [] to receive every event type.

What you receive​

Each delivery is a JSON body with this envelope:

{
"id": "0193a1b2-7c4d-7e8f-9a0b-1c2d3e4f5a6b",
"type": "room.closed",
"source": "room",
"tenant_id": "6f1c…",
"room_id": "0193a1a0-…",
"occurred_at": "2026-11-28T09:14:03.512Z",
"data": { "reason": "idle_timeout" }
}
FieldDescription
idUnique event ID. Use it to de-duplicate (see Delivery guarantees).
typeThe event type, e.g. room.closed.
sourceThe part of the platform that produced it: room or scheduler.
tenant_idYour tenant ID.
room_idThe room the event is about. Absent on scheduler events and tenant-wide events.
occurred_atWhen it happened (RFC 3339, UTC).
dataEvent-specific fields — see the event pages below.

Ignore any fields you don't recognise; new fields can be added at any time.

Every request also carries these headers:

HeaderValue
Content-Typeapplication/json
X-Event-TypeSame as type in the body
X-Event-IdSame as id in the body
X-Signaturesha256=<hex HMAC-SHA256 of the raw body, keyed with your secret>

Verify signatures​

Always verify X-Signature before trusting a delivery. Compute the HMAC over the raw request body — not a re-serialised copy — and compare in constant time.

import crypto from 'node:crypto';
import express from 'express';

const app = express();

app.post(
'/hooks/ethioconnect',
express.raw({ type: 'application/json' }),
(req, res) => {
const expected =
'sha256=' +
crypto
.createHmac('sha256', process.env.ETHIOCONNECT_WEBHOOK_SECRET!)
.update(req.body)
.digest('hex');
const received = req.get('X-Signature') ?? '';

const ok =
received.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));
if (!ok) return res.sendStatus(401);

const event = JSON.parse(req.body.toString('utf8'));
// handle event.type …
res.sendStatus(204);
},
);

Delivery guarantees​

  • Respond with any 2xx within 5 seconds. Anything else — a non-2xx status, a timeout, or a connection error — counts as a failed attempt. Do slow work after responding.
  • Retries: a failed delivery is retried up to 5 attempts in total, with exponential backoff starting at 0.5 s (0.5 s, 1 s, 2 s, 4 s). Retries are short — if your endpoint is down for more than about half a minute, that event is not delivered to it.
  • At least once: in rare cases you may receive the same event twice. De-duplicate on id (or X-Event-Id).
  • Ordering is not guaranteed. Use occurred_at if order matters to you.

Event types​

EventWhenDetails
room.createdA room is createdRoom events
room.closedA room closes — ended, idle, expired, or abandonedRoom events
room.session.endedA user's time in a room endsRoom events
room.limit_reachedA plan limit is hit (rooms, participants, …)Room events
recording.startedA recording startsRoom events
recording.completedA recording finishes and is storedRoom events
moderation.*A participant is muted, kicked, banned, or their role changesModeration events
schedule.*A scheduled job changes or runsScheduled job events
Participant join events

There is no webhook when a participant joins. To track who is in a room live, use the client SDK's room events or the Presence API. room.session.ended tells your backend when each user leaves, with their join time and duration.

Real-time events in your app​

Webhooks go to your backend. Your apps get room events — participants joining and leaving, mutes, role changes, recording status — live over the signaling WebSocket, which the SDKs handle for you. See the Client SDK, or the Signaling Protocol if you are building your own client.