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"]
}'
| Field | Rules |
|---|---|
url | Use 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. |
secret | At least 16 characters. Used to sign every delivery — see Verify signatures. |
event_types | The 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" }
}
| Field | Description |
|---|---|
id | Unique event ID. Use it to de-duplicate (see Delivery guarantees). |
type | The event type, e.g. room.closed. |
source | The part of the platform that produced it: room or scheduler. |
tenant_id | Your tenant ID. |
room_id | The room the event is about. Absent on scheduler events and tenant-wide events. |
occurred_at | When it happened (RFC 3339, UTC). |
data | Event-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:
| Header | Value |
|---|---|
Content-Type | application/json |
X-Event-Type | Same as type in the body |
X-Event-Id | Same as id in the body |
X-Signature | sha256=<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
2xxwithin 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(orX-Event-Id). - Ordering is not guaranteed. Use
occurred_atif order matters to you.
Event types
| Event | When | Details |
|---|---|---|
room.created | A room is created | Room events |
room.closed | A room closes — ended, idle, expired, or abandoned | Room events |
room.session.ended | A user's time in a room ends | Room events |
room.limit_reached | A plan limit is hit (rooms, participants, …) | Room events |
recording.started | A recording starts | Room events |
recording.completed | A recording finishes and is stored | Room events |
moderation.* | A participant is muted, kicked, banned, or their role changes | Moderation events |
schedule.* | A scheduled job changes or runs | Scheduled job 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.