Deewanالتوثيق

أسماء الحقول ورموز الأخطاء وأمثلة الشيفرة بالإنجليزية، كما تستخدمها في برنامجك.

مرجع الواجهة

العنوان الأساسي https://deewan.io/api/v1. كل طلب يحتاج إلى Authorization: Bearer <key>.

الحساب

GET/me

فحص المفتاح

Returns the key's id, workspace, scopes and environment. Useful as a connectivity check.

يعيد An api_key object.

الطلب
curl -X GET "https://deewan.io/api/v1/me" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "api_key",
  "id": "9b1f…",
  "workspace_id": "org_8Hk2…",
  "scopes": [
    "rooms:read",
    "rooms:write"
  ],
  "environment": "live"
}

الغرف

GET/roomsrooms:read

عرض الغرف

Rooms in the key's scope, newest first. Paginate with starting_after set to the last id of the previous page.

معاملات الاستعلام

limitinteger
1–100, default 25.
starting_afteruuid
Return rooms created before this room.

يعيد A list of room objects.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "room",
      "id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
      "name": "Onboarding call",
      "code": "k7pq-3mzt-9xwe",
      "description": null,
      "url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
      "locked": false,
      "workspace_id": "org_8Hk2…",
      "team_id": null,
      "settings": {
        "access": "link",
        "admission": "knock",
        "mute_on_entry": false,
        "camera_off_on_entry": false,
        "screen_share": "hosts",
        "reactions": true,
        "chat": true,
        "encryption": "standard",
        "recordings": "workspace",
        "before_host": "join",
        "type": "meeting"
      },
      "created_at": "2026-09-17T09:12:44.120Z",
      "updated_at": "2026-09-17T09:12:44.120Z"
    }
  ],
  "has_more": false
}
POST/roomsrooms:write

إنشاء غرفة

Creates a room with a permanent link. Rooms created through the API default to access: "link".

جسم الطلب

namestringمطلوب
1–80 characters.
descriptionstring | null
Up to 500 characters.
settings.access"members" | "link"
link: anyone with the link can join, with or without an account. members: only people who can already see the room.
settings.admission"direct" | "knock"
direct: everyone the room lets in walks straight in (in a link room, anyone with the link). knock: everyone but hosts waits for a host to admit them.
settings.mute_on_entryboolean
Join participants with their microphone off.
settings.camera_off_on_entryboolean
Join participants with their camera off.
settings.cameras_hosts_onlyboolean
For classes: attendees' cameras are seen only by hosts and co-hosts. Everyone still hears everyone and sees the hosts. Enforced by the media server.
settings.screen_share"everyone" | "hosts"
Who may share their screen.
settings.reactionsboolean
Allow emoji reactions.
settings.chatboolean
Allow meeting chat.
settings.encryption"standard" | "strict"
strict: the meeting key exists only on participants' devices and Deewan can't access meeting content. Media tokens need the participant's exchange_key (the client SDKs make it); live captions aren't available. Can't be changed while a meeting is running.
settings.recordings"workspace" | "end_to_end"
workspace (the default for rooms made through the API): recordings can be downloaded and played through this API. end_to_end: only people allowed in the room can open them — not Deewan, not the API. Strict rooms are always end_to_end.
settings.idle_timeout_minutesinteger
How long someone may stay alone in the meeting (5–1440 minutes, default 90). Then they're asked "still here?" (the alone_check system message) and removed if they don't answer within two minutes, so a forgotten tab or a script can't hold a seat or run up minutes.
settings.transcriptionboolean
Keep a transcript (Deewan AI): after each meeting, what was said — speaker, time and text — and a short summary, for the room's hosts and this API (transcripts:read). Everyone in the meeting is told it is transcribed, in the lobby and in the meeting. Not available in strict rooms. Default false.
settings.single_useboolean
When the meeting ends, the room locks: nobody can join it again with a stray link or token. Its attendance, transcript and recordings stay readable until you delete the room. For one-off calls (an interview, a coaching session), so a room can't outlive its call even if your app never cleans up. Default false.
settings.before_host"join" | "wait"
What happens before a host arrives. join (default): people let into the room go straight in. wait: they wait on the pre-join page and come in automatically the moment a host joins. Applies to the room's own link; join links you create through this API always go straight in.

يعيد The new room.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Onboarding call","settings":{"admission":"knock","screen_share":"hosts"}}'
الاستجابة
{
  "object": "room",
  "id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "name": "Onboarding call",
  "code": "k7pq-3mzt-9xwe",
  "description": null,
  "url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "locked": false,
  "workspace_id": "org_8Hk2…",
  "team_id": null,
  "settings": {
    "access": "link",
    "admission": "knock",
    "mute_on_entry": false,
    "camera_off_on_entry": false,
    "screen_share": "hosts",
    "reactions": true,
    "chat": true,
    "encryption": "standard",
    "recordings": "workspace",
    "before_host": "join",
    "type": "meeting"
  },
  "created_at": "2026-09-17T09:12:44.120Z",
  "updated_at": "2026-09-17T09:12:44.120Z"
}
GET/rooms/{room_id}rooms:read

قراءة غرفة

Returns one room.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد A room.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "room",
  "id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "name": "Onboarding call",
  "code": "k7pq-3mzt-9xwe",
  "description": null,
  "url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "locked": false,
  "workspace_id": "org_8Hk2…",
  "team_id": null,
  "settings": {
    "access": "link",
    "admission": "knock",
    "mute_on_entry": false,
    "camera_off_on_entry": false,
    "screen_share": "hosts",
    "reactions": true,
    "chat": true,
    "encryption": "standard",
    "recordings": "workspace",
    "before_host": "join",
    "type": "meeting"
  },
  "created_at": "2026-09-17T09:12:44.120Z",
  "updated_at": "2026-09-17T09:12:44.120Z"
}
PATCH/rooms/{room_id}rooms:write

تعديل غرفة

Changes the name, description, lock or settings. Setting changes apply immediately to a meeting in progress (who may share, chat and react).

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

namestring
1–80 characters.
descriptionstring | null
Up to 500 characters.
lockedboolean
A locked room admits nobody new.
settings.access"members" | "link"
link: anyone with the link can join, with or without an account. members: only people who can already see the room.
settings.admission"direct" | "knock"
direct: everyone the room lets in walks straight in (in a link room, anyone with the link). knock: everyone but hosts waits for a host to admit them.
settings.mute_on_entryboolean
Join participants with their microphone off.
settings.camera_off_on_entryboolean
Join participants with their camera off.
settings.cameras_hosts_onlyboolean
For classes: attendees' cameras are seen only by hosts and co-hosts. Everyone still hears everyone and sees the hosts. Enforced by the media server.
settings.screen_share"everyone" | "hosts"
Who may share their screen.
settings.reactionsboolean
Allow emoji reactions.
settings.chatboolean
Allow meeting chat.
settings.encryption"standard" | "strict"
strict: the meeting key exists only on participants' devices and Deewan can't access meeting content. Media tokens need the participant's exchange_key (the client SDKs make it); live captions aren't available. Can't be changed while a meeting is running.
settings.recordings"workspace" | "end_to_end"
workspace (the default for rooms made through the API): recordings can be downloaded and played through this API. end_to_end: only people allowed in the room can open them — not Deewan, not the API. Strict rooms are always end_to_end.
settings.idle_timeout_minutesinteger
How long someone may stay alone in the meeting (5–1440 minutes, default 90). Then they're asked "still here?" (the alone_check system message) and removed if they don't answer within two minutes, so a forgotten tab or a script can't hold a seat or run up minutes.
settings.transcriptionboolean
Keep a transcript (Deewan AI): after each meeting, what was said — speaker, time and text — and a short summary, for the room's hosts and this API (transcripts:read). Everyone in the meeting is told it is transcribed, in the lobby and in the meeting. Not available in strict rooms. Default false.
settings.single_useboolean
When the meeting ends, the room locks: nobody can join it again with a stray link or token. Its attendance, transcript and recordings stay readable until you delete the room. For one-off calls (an interview, a coaching session), so a room can't outlive its call even if your app never cleans up. Default false.
settings.before_host"join" | "wait"
What happens before a host arrives. join (default): people let into the room go straight in. wait: they wait on the pre-join page and come in automatically the moment a host joins. Applies to the room's own link; join links you create through this API always go straight in.

يعيد The updated room.

الطلب
curl -X PATCH "https://deewan.io/api/v1/rooms/$ROOM_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"locked":true}'
الاستجابة
{
  "object": "room",
  "id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "name": "Onboarding call",
  "code": "k7pq-3mzt-9xwe",
  "description": null,
  "url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "locked": true,
  "workspace_id": "org_8Hk2…",
  "team_id": null,
  "settings": {
    "access": "link",
    "admission": "knock",
    "mute_on_entry": false,
    "camera_off_on_entry": false,
    "screen_share": "hosts",
    "reactions": true,
    "chat": true,
    "encryption": "standard",
    "recordings": "workspace",
    "before_host": "join",
    "type": "meeting"
  },
  "created_at": "2026-09-17T09:12:44.120Z",
  "updated_at": "2026-09-17T09:12:44.120Z"
}
DELETE/rooms/{room_id}rooms:write

حذف غرفة

Deletes the room and ends any meeting in it. Its link stops working.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد The deleted room with deleted: true.

الطلب
curl -X DELETE "https://deewan.io/api/v1/rooms/$ROOM_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "room",
  "id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "name": "Onboarding call",
  "code": "k7pq-3mzt-9xwe",
  "description": null,
  "url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "locked": false,
  "workspace_id": "org_8Hk2…",
  "team_id": null,
  "settings": {
    "access": "link",
    "admission": "knock",
    "mute_on_entry": false,
    "camera_off_on_entry": false,
    "screen_share": "hosts",
    "reactions": true,
    "chat": true,
    "encryption": "standard",
    "recordings": "workspace",
    "before_host": "join",
    "type": "meeting"
  },
  "created_at": "2026-09-17T09:12:44.120Z",
  "updated_at": "2026-09-17T09:12:44.120Z",
  "deleted": true
}

الانضمام

POST/rooms/{room_id}/tokenstokens:create

إنشاء رمز وسائط

Credentials for an interface you build yourself, with @deewanio/sdk/client (web), @deewanio/react-native or the deewan Flutter package. Valid for 10 minutes to connect, and as the participant's credential for the Participant API while they are in the meeting. Standard rooms: includes the meeting's end-to-end encryption passphrase, so treat the whole response as a secret for that one person. Strict rooms: send the participant's exchange_key (the client SDKs make it on their device); the response has e2ee: "strict" and no passphrase, and the SDK receives the key from the people already in the meeting. For Deewan's own interface, create a join link instead.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

namestringمطلوب
Display name (1–60).
role"host" | "participant"
Default participant.
user_idstring
Your own id for this person (max 64).
avatarstring
A Deewan avatar preset id, a01–a16.
exchange_keystring
Strict rooms (required there): the participant's public key for the in-meeting key exchange, from the client SDK's exchangeKey(). An uncompressed P-256 point, base64url.
max_duration_secondsinteger
The longest this person may stay, from now (60 s – 24 h). Two minutes before, their client gets a time_warning; then time_up and they're removed. Enforced by Deewan's server, so a modified client can't stay longer. The response's leave_at says when. Required for agents.
kind"participant" | "agent"
Default participant. agent: a token for your own bot — an AI voice agent, an avatar, a recorder. The media server marks it as an agent, so it stays out of attendance, people counts, the participant list of the client SDKs (they list it under agents()) and the "still here?" check. It may always send data (captions, its state), whatever the room's chat setting, and it is never a host. Billed per minute like a participant. Needs max_duration_seconds. See the AI agents guide.
publish_on_behalfstring
Agents only: the identity of an agent that is in this room now, that this one publishes for — an avatar speaking for a voice agent. Clients show this token's video and audio as that agent's. It can never name a person.

يعيد A room_token, with kind.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/tokens" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Omar","user_id":"user_456"}'
الاستجابة
{
  "object": "room_token",
  "server_url": "wss://media.deewan.io",
  "token": "eyJhbGciOi…",
  "identity": "api_Qm9vZ3YxN2d0.k2d9x0aa",
  "participant_ref": "api_Qm9vZ3YxN2d0",
  "kind": "participant",
  "e2ee": "standard",
  "e2ee_passphrase": "Yx3…",
  "expires_in": 600
}

المشاركون

GET/rooms/{room_id}/participantsparticipants:read

عرض المشاركين

Who is in the meeting right now. Empty when the meeting isn't running.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد A list of participant objects.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/participants" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "participant",
      "identity": "api_Qm9vZ3Y.k2d9x0aa",
      "name": "Omar",
      "role": "participant",
      "joined_at": "2026-09-17T09:20:11.000Z",
      "audio_muted": false,
      "video_muted": true,
      "screen_sharing": false,
      "hand_raised": false
    }
  ],
  "has_more": false
}
GET/rooms/{room_id}/sessionsparticipants:read

عرض الجلسات

Each run of the room — from the first person in to the last out — newest first. A room used for a series of interviews or classes has one session each time. live is true while people are still inside.

معاملات المسار

room_iduuidمطلوب
The room's id.

معاملات الاستعلام

limitinteger
1–100. Default 20.
beforestring
ISO 8601: only sessions that started before this time (the previous page's last started_at).

يعيد A list of session objects.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/sessions" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "session",
      "id": "RM_wQr8kE2mZpN",
      "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
      "started_at": "2026-09-17T09:00:12.000Z",
      "ended_at": "2026-09-17T09:47:03.000Z",
      "live": false,
      "people": 3
    }
  ],
  "has_more": false
}
GET/rooms/{room_id}/sessions/{session_id}/attendanceparticipants:read

عرض الحضور

Who was in one session: one row per person, with their role (host, cohost or participant), first arrival, last departure, total seconds and how many times they joined. People you let in with a user_id carry the participant_ref you got when you created their link or token.

معاملات المسار

room_iduuidمطلوب
The room's id.
session_idstringمطلوب
From the sessions list, or the session_id on a webhook.

يعيد A list of attendance objects.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/sessions/{session_id}/attendance" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "attendance",
      "participant_ref": "api_Qm9vZ3YxN2d0",
      "name": "Sara Ahmed",
      "role": "host",
      "guest": true,
      "joined_at": "2026-09-17T09:00:12.000Z",
      "left_at": "2026-09-17T09:47:03.000Z",
      "seconds": 2811,
      "visits": 1
    },
    {
      "object": "attendance",
      "participant_ref": "api_Wm9yYTE4MmFh",
      "name": "Omar Khalil",
      "role": "participant",
      "guest": true,
      "joined_at": "2026-09-17T09:01:40.000Z",
      "left_at": "2026-09-17T09:46:58.000Z",
      "seconds": 2690,
      "visits": 2
    }
  ],
  "has_more": false
}
POST/rooms/{room_id}/participants/{identity}/muteparticipants:write

كتم مشارك

Mutes someone's microphone. Only they can unmute themselves.

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

يعيد { object, identity, audio_muted: true }

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/participants/$IDENTITY/mute" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "api_Qm9vZ3Y.k2d9x0aa",
  "audio_muted": true
}
POST/rooms/{room_id}/participants/{identity}/cohostparticipants:write

تعيين مضيف مشارك

Gives someone in the meeting host powers for this meeting only: admitting, muting and removing people, and running breakout rooms and polls. Not the room itself — a co-host can't change its saved settings or delete it — and it ends when the meeting ends. Works for Deewan accounts and for your own users who joined with a token from this API — for them it lasts while they're connected (to make someone a host from the start, create their token with role: "host"). The key's creator must manage the room.

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

يعيد { object, identity, cohost: true }

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/participants/$IDENTITY/cohost" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "user_2fK9Lm.k2d9x0aa",
  "cohost": true
}
DELETE/rooms/{room_id}/participants/{identity}/cohostparticipants:write

إلغاء المضيف المشارك

Takes co-host powers back. Never demotes one of the room's own hosts (400 not_a_cohost).

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

يعيد { object, identity, cohost: false }

الطلب
curl -X DELETE "https://deewan.io/api/v1/rooms/$ROOM_ID/participants/$IDENTITY/cohost" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "user_2fK9Lm.k2d9x0aa",
  "cohost": false
}
POST/rooms/{room_id}/participants/{identity}/stageparticipants:write

دعوة للتحدّث (الندوات)

In a webinar, puts someone from the audience on stage: the media server now lets them publish their microphone and camera (and their screen, if the room allows it). Lasts while they're connected. Hosts are always on stage (400 already_host); a meeting has no audience (400 not_a_webinar). The key's creator must manage the room.

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

يعيد { object, identity, on_stage: true }

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/participants/$IDENTITY/stage" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "api_Qm9vZ3Y.k2d9x0aa",
  "on_stage": true
}
DELETE/rooms/{room_id}/participants/{identity}/stageparticipants:write

إعادة إلى الجمهور (الندوات)

Sends someone on stage back to the audience. The media server stops their microphone, camera and screen at once.

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

يعيد { object, identity, on_stage: false }

الطلب
curl -X DELETE "https://deewan.io/api/v1/rooms/$ROOM_ID/participants/$IDENTITY/stage" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "api_Qm9vZ3Y.k2d9x0aa",
  "on_stage": false
}
GET/rooms/{room_id}/waitingparticipants:read

عرض غرفة الانتظار

People asking to join, oldest first. People wait in rooms set to "Ask to join", and outsiders wait in members-only rooms. Nobody is kept waiting more than an hour.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد A list of waiting_participant objects.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/waiting" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "waiting_participant",
      "identity": "guest_Hk2p9QwEr3.m1x0aa2b",
      "name": "Rania"
    }
  ]
}
POST/rooms/{room_id}/waiting/{identity}participants:write

السماح بالدخول أو الرفض

Lets someone in from the waiting room, or turns them away.

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

جسم الطلب

decision"admit" | "deny"مطلوب
What to do.

يعيد { object: "waiting_participant", identity, decision }

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/waiting/$IDENTITY" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"decision":"admit"}'
الاستجابة
{
  "object": "waiting_participant",
  "identity": "guest_Hk2p9QwEr3.m1x0aa2b",
  "decision": "admit"
}
DELETE/rooms/{room_id}/participants/{identity}participants:write

إزالة مشارك

Removes someone from the meeting. Lock the room as well if they shouldn't come back.

معاملات المسار

room_iduuidمطلوب
The room's id.
identitystringمطلوب
The participant's identity.

يعيد { object, identity, removed: true }

الطلب
curl -X DELETE "https://deewan.io/api/v1/rooms/$ROOM_ID/participants/$IDENTITY" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "api_Qm9vZ3Y.k2d9x0aa",
  "removed": true
}
POST/rooms/{room_id}/endparticipants:write

إنهاء الاجتماع

Disconnects everyone. The room and its link remain.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد { object: "room", id, ended: true }

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/end" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "room",
  "id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "ended": true
}

الاجتماعات

GET/meetingsmeetings:read

عرض الاجتماعات المجدولة

Meetings overlapping a time window, soonest first.

معاملات الاستعلام

fromISO 8601
Default: now.
toISO 8601
Default: 30 days after from.
limitinteger
1–100, default 25.

يعيد A list of meeting objects.

الطلب
curl -X GET "https://deewan.io/api/v1/meetings" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "meeting",
      "id": "a1d3f0c9-6b2e-4e8f-8d1a-7c0b9e5f2a11",
      "title": "Weekly sync",
      "description": null,
      "starts_at": "2026-10-01T09:00:00.000Z",
      "ends_at": "2026-10-01T09:30:00.000Z",
      "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
      "join_url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
      "recurrence": "weekly",
      "recurrence_until": null,
      "timezone": "Asia/Amman",
      "created_at": "2026-09-17T09:15:02.000Z"
    }
  ],
  "has_more": false
}
POST/meetingsmeetings:write

جدولة اجتماع

Adds a meeting to the workspace calendar, once or on a repeating rule, optionally in a room. It is also written to the key creator's connected Google and Outlook calendars, and sends meeting.scheduled.

جسم الطلب

titlestringمطلوب
1–120 characters.
starts_atISO 8601مطلوب
With a timezone offset. For a series, the first occurrence.
ends_atISO 8601مطلوب
After starts_at; a meeting lasts at most 24 hours.
room_iduuid
A room in the key's scope.
descriptionstring | null
Up to 1000 characters.
recurrence"none" | "daily" | "weekdays" | "weekly" | "biweekly" | "monthly"
How the meeting repeats. Default none.
recurrence_untilISO 8601 | null
When a series ends. null: it doesn't.
timezonestring | null
IANA zone the series repeats in, e.g. Asia/Amman, so 10:00 stays 10:00 through daylight saving.

يعيد The new meeting.

الطلب
curl -X POST "https://deewan.io/api/v1/meetings" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Weekly sync","room_id":"5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44","starts_at":"2026-10-01T09:00:00.000Z","ends_at":"2026-10-01T09:30:00.000Z","recurrence":"weekly","timezone":"Asia/Amman"}'
الاستجابة
{
  "object": "meeting",
  "id": "a1d3f0c9-6b2e-4e8f-8d1a-7c0b9e5f2a11",
  "title": "Weekly sync",
  "description": null,
  "starts_at": "2026-10-01T09:00:00.000Z",
  "ends_at": "2026-10-01T09:30:00.000Z",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "join_url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "recurrence": "weekly",
  "recurrence_until": null,
  "timezone": "Asia/Amman",
  "created_at": "2026-09-17T09:15:02.000Z"
}
GET/meetings/{meeting_id}meetings:read

قراءة اجتماع

Returns one scheduled meeting.

معاملات المسار

meeting_iduuidمطلوب
The meeting's id.

يعيد A meeting.

الطلب
curl -X GET "https://deewan.io/api/v1/meetings/$MEETING_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "meeting",
  "id": "a1d3f0c9-6b2e-4e8f-8d1a-7c0b9e5f2a11",
  "title": "Weekly sync",
  "description": null,
  "starts_at": "2026-10-01T09:00:00.000Z",
  "ends_at": "2026-10-01T09:30:00.000Z",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "join_url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "recurrence": "weekly",
  "recurrence_until": null,
  "timezone": "Asia/Amman",
  "created_at": "2026-09-17T09:15:02.000Z"
}
PATCH/meetings/{meeting_id}meetings:write

تعديل اجتماع

Changes a meeting. Fields you leave out keep their value. For a repeating meeting every occurrence changes. Connected calendars are updated too, and meeting.updated is sent.

معاملات المسار

meeting_iduuidمطلوب
The meeting's id.

جسم الطلب

titlestring
1–120 characters.
starts_atISO 8601
With a timezone offset. For a series, the first occurrence.
ends_atISO 8601
After starts_at; a meeting lasts at most 24 hours.
descriptionstring | null
Up to 1000 characters.
recurrence"none" | "daily" | "weekdays" | "weekly" | "biweekly" | "monthly"
How the meeting repeats. Default none.
recurrence_untilISO 8601 | null
When a series ends. null: it doesn't.
timezonestring | null
IANA zone the series repeats in, e.g. Asia/Amman, so 10:00 stays 10:00 through daylight saving.

يعيد The updated meeting.

الطلب
curl -X PATCH "https://deewan.io/api/v1/meetings/$MEETING_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Weekly sync (new time)","starts_at":"2026-10-01T10:00:00+03:00","ends_at":"2026-10-01T10:30:00+03:00"}'
الاستجابة
{
  "object": "meeting",
  "id": "a1d3f0c9-6b2e-4e8f-8d1a-7c0b9e5f2a11",
  "title": "Weekly sync",
  "description": null,
  "starts_at": "2026-10-01T09:00:00.000Z",
  "ends_at": "2026-10-01T09:30:00.000Z",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "join_url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "recurrence": "weekly",
  "recurrence_until": null,
  "timezone": "Asia/Amman",
  "created_at": "2026-09-17T09:15:02.000Z"
}
DELETE/meetings/{meeting_id}meetings:write

إلغاء اجتماع

Removes the meeting from the calendar, and from connected Google and Outlook calendars. The room is not affected.

معاملات المسار

meeting_iduuidمطلوب
The meeting's id.

يعيد The cancelled meeting with deleted: true.

الطلب
curl -X DELETE "https://deewan.io/api/v1/meetings/$MEETING_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "meeting",
  "id": "a1d3f0c9-6b2e-4e8f-8d1a-7c0b9e5f2a11",
  "title": "Weekly sync",
  "description": null,
  "starts_at": "2026-10-01T09:00:00.000Z",
  "ends_at": "2026-10-01T09:30:00.000Z",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "join_url": "https://deewan.io/en/r/k7pq-3mzt-9xwe",
  "recurrence": "weekly",
  "recurrence_until": null,
  "timezone": "Asia/Amman",
  "created_at": "2026-09-17T09:15:02.000Z",
  "deleted": true
}

الاستطلاعات

GET/rooms/{room_id}/pollspolls:read

عرض الاستطلاعات

Polls asked in this room in the last 24 hours, newest first, with their counts. Voter names are never returned.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد A list of poll objects.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/polls" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "poll",
      "id": "7c1f4a90-52d3-4f1e-9a6b-2e8c0d4f7b31",
      "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
      "question": "Ready to move on?",
      "kind": "single",
      "anonymous": false,
      "results": "after_close",
      "status": "open",
      "created_by": "API",
      "created_at": "2026-09-17T09:30:02.000Z",
      "closed_at": null,
      "total_voters": 12,
      "options": [
        {
          "id": "3b9d1c77-0a44-4f52-8f0e-1d2c3b4a5e60",
          "label": "Yes",
          "votes": 9
        },
        {
          "id": "9f2a5e31-7c08-4b63-9d1a-8e7f6c5b4a32",
          "label": "Not yet",
          "votes": 3
        }
      ]
    }
  ],
  "has_more": false
}
POST/rooms/{room_id}/pollspolls:write

إنشاء استطلاع

Asks everyone in the meeting a question. It appears immediately for people in Deewan's meeting interface.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

questionstringمطلوب
Up to 240 characters.
optionsstring[]مطلوب
Two to ten answers, each up to 120 characters.
kind"single" | "multiple"
One answer, or several. Defaults to single.
anonymousboolean
When true, nobody — including hosts — learns who picked what.
results"live" | "after_vote" | "after_close"
When participants see the counts. Defaults to live.

يعيد The created poll.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/polls" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question":"Ready to move on?","options":["Yes","Not yet"],"results":"after_close"}'
الاستجابة
{
  "object": "poll",
  "id": "7c1f4a90-52d3-4f1e-9a6b-2e8c0d4f7b31",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "question": "Ready to move on?",
  "kind": "single",
  "anonymous": false,
  "results": "after_close",
  "status": "open",
  "created_by": "API",
  "created_at": "2026-09-17T09:30:02.000Z",
  "closed_at": null,
  "total_voters": 12,
  "options": [
    {
      "id": "3b9d1c77-0a44-4f52-8f0e-1d2c3b4a5e60",
      "label": "Yes",
      "votes": 9
    },
    {
      "id": "9f2a5e31-7c08-4b63-9d1a-8e7f6c5b4a32",
      "label": "Not yet",
      "votes": 3
    }
  ]
}
PATCH/polls/{poll_id}polls:write

إغلاق استطلاع أو إعادة فتحه

Closing stops voting and reveals results that were hidden until the end.

معاملات المسار

poll_iduuidمطلوب
The poll's id.

جسم الطلب

status"open" | "closed"مطلوب
The new state.

يعيد The updated poll.

الطلب
curl -X PATCH "https://deewan.io/api/v1/polls/{poll_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"closed"}'
الاستجابة
{
  "object": "poll",
  "id": "7c1f4a90-52d3-4f1e-9a6b-2e8c0d4f7b31",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "question": "Ready to move on?",
  "kind": "single",
  "anonymous": false,
  "results": "after_close",
  "status": "closed",
  "created_by": "API",
  "created_at": "2026-09-17T09:30:02.000Z",
  "closed_at": "2026-09-17T09:31:10.000Z",
  "total_voters": 12,
  "options": [
    {
      "id": "3b9d1c77-0a44-4f52-8f0e-1d2c3b4a5e60",
      "label": "Yes",
      "votes": 9
    },
    {
      "id": "9f2a5e31-7c08-4b63-9d1a-8e7f6c5b4a32",
      "label": "Not yet",
      "votes": 3
    }
  ]
}
DELETE/polls/{poll_id}polls:write

حذف استطلاع

Removes the poll and its votes for everyone.

معاملات المسار

poll_iduuidمطلوب
The poll's id.

يعيد { object: "poll", id, deleted: true }.

الطلب
curl -X DELETE "https://deewan.io/api/v1/polls/{poll_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "poll",
  "id": "7c1f4a90-52d3-4f1e-9a6b-2e8c0d4f7b31",
  "deleted": true
}

الغرف الفرعية

GET/rooms/{room_id}/breakoutsbreakouts:read

عرض الغرف الفرعية

The breakout session running in this meeting, with who is placed in each room and who is still unassigned, plus the ten most recent sessions. active is null when nothing is running.

معاملات المسار

room_iduuidمطلوب
The room's id.

يعيد { object: "breakouts", room_id, active, history }, where active is a breakout_session.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "breakouts",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "active": {
    "object": "breakout_session",
    "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
    "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
    "status": "open",
    "auto_join": true,
    "allow_return": true,
    "self_select": false,
    "duration_seconds": 600,
    "started_at": "2026-09-17T10:00:00.000Z",
    "ends_at": "2026-09-17T10:10:00.000Z",
    "rooms": [
      {
        "id": "e14b07d9-3a52-4c6f-b8d1-92f6a0c73e58",
        "name": "Room 1",
        "members": [
          {
            "id": "user_2fK9…",
            "name": "Salma",
            "present": true,
            "can_return": true
          },
          {
            "id": "api_Xk3mQp9Lr2",
            "name": "Omar",
            "present": true,
            "can_return": false
          }
        ]
      },
      {
        "id": "5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3",
        "name": "Room 2",
        "members": [
          {
            "id": "user_7Qa1…",
            "name": "Hana",
            "present": true,
            "can_return": true
          }
        ]
      }
    ],
    "unassigned": []
  },
  "history": [
    {
      "object": "breakout_session_summary",
      "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
      "status": "open",
      "started_by": "api",
      "started_at": "2026-09-17T10:00:00.000Z",
      "ends_at": "2026-09-17T10:10:00.000Z",
      "closed_at": null,
      "rooms": 2,
      "people": 3
    }
  ]
}
POST/rooms/{room_id}/breakoutsbreakouts:write

بدء الغرف الفرعية

Splits the people in the meeting into smaller private rooms. Each breakout has its own end-to-end encryption key, so nobody can join or decrypt a room they were not placed in. Only one session can be open at a time; a second start returns 409. Hosts stay in the main room unless include_hosts is set, and can visit any breakout.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

roomsinteger | string[]مطلوب
How many rooms (1–50), or their names. Unnamed rooms are called Room 1, Room 2, …
assign"auto" | "manual" | "none"
auto (default) deals everyone out evenly at random; manual uses placements; none opens empty rooms for people to choose from.
placements{ participant, room }[]
With assign: "manual": who goes where. participant is a participant id or a connection identity; room is a 0-based index into rooms. Anyone not in the meeting is ignored.
auto_joinboolean
Move people into their room without asking. Defaults to true.
allow_returnboolean
Let people go back to the main room by themselves. Defaults to true.
self_selectboolean
Let people pick their own room. Implied by assign: "none".
duration_secondsinteger | null
Close the rooms automatically after this long (60 to 14400). Omit to run until ended.
include_hostsboolean
Deal hosts into rooms too when using auto.

يعيد The started breakout_session.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rooms":2,"assign":"auto","duration_seconds":600}'
الاستجابة
{
  "object": "breakout_session",
  "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "status": "open",
  "auto_join": true,
  "allow_return": true,
  "self_select": false,
  "duration_seconds": 600,
  "started_at": "2026-09-17T10:00:00.000Z",
  "ends_at": "2026-09-17T10:10:00.000Z",
  "rooms": [
    {
      "id": "e14b07d9-3a52-4c6f-b8d1-92f6a0c73e58",
      "name": "Room 1",
      "members": [
        {
          "id": "user_2fK9…",
          "name": "Salma",
          "present": true,
          "can_return": true
        },
        {
          "id": "api_Xk3mQp9Lr2",
          "name": "Omar",
          "present": true,
          "can_return": false
        }
      ]
    },
    {
      "id": "5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3",
      "name": "Room 2",
      "members": [
        {
          "id": "user_7Qa1…",
          "name": "Hana",
          "present": true,
          "can_return": true
        }
      ]
    }
  ],
  "unassigned": []
}
POST/rooms/{room_id}/breakouts/assignmentsbreakouts:write

نقل مشارك بين الغرف

Places one person in a breakout room, moves them to another, or sends them back to the main room. It takes effect straight away for people who are connected, and holds for people who reconnect.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

participantstringمطلوب
The participant id, or a connection identity from GET /rooms/{room_id}/participants.
breakout_iduuid | nullمطلوب
The breakout room's id, or null for the main room.
can_returnboolean
Whether this person may go back to the main room by themselves. Defaults to the session's allow_return.

يعيد The updated breakout_session.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts/assignments" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"participant":"api_Xk3mQp9Lr2","breakout_id":"5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3"}'
الاستجابة
{
  "object": "breakout_session",
  "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "status": "open",
  "auto_join": true,
  "allow_return": true,
  "self_select": false,
  "duration_seconds": 600,
  "started_at": "2026-09-17T10:00:00.000Z",
  "ends_at": "2026-09-17T10:10:00.000Z",
  "rooms": [
    {
      "id": "e14b07d9-3a52-4c6f-b8d1-92f6a0c73e58",
      "name": "Room 1",
      "members": [
        {
          "id": "user_2fK9…",
          "name": "Salma",
          "present": true,
          "can_return": true
        },
        {
          "id": "api_Xk3mQp9Lr2",
          "name": "Omar",
          "present": true,
          "can_return": false
        }
      ]
    },
    {
      "id": "5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3",
      "name": "Room 2",
      "members": [
        {
          "id": "user_7Qa1…",
          "name": "Hana",
          "present": true,
          "can_return": true
        }
      ]
    }
  ],
  "unassigned": []
}
POST/rooms/{room_id}/breakouts/roomsbreakouts:write

إضافة غرفة

Adds a room to the running session, with its own end-to-end key. Up to 50 rooms.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

namestring
Up to 60 characters. Defaults to "Room N".

يعيد The updated breakout_session.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts/rooms" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Room 3"}'
الاستجابة
{
  "object": "breakout_session",
  "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "status": "open",
  "auto_join": true,
  "allow_return": true,
  "self_select": false,
  "duration_seconds": 600,
  "started_at": "2026-09-17T10:00:00.000Z",
  "ends_at": "2026-09-17T10:10:00.000Z",
  "rooms": [
    {
      "id": "e14b07d9-3a52-4c6f-b8d1-92f6a0c73e58",
      "name": "Room 1",
      "members": [
        {
          "id": "user_2fK9…",
          "name": "Salma",
          "present": true,
          "can_return": true
        },
        {
          "id": "api_Xk3mQp9Lr2",
          "name": "Omar",
          "present": true,
          "can_return": false
        }
      ]
    },
    {
      "id": "5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3",
      "name": "Room 2",
      "members": [
        {
          "id": "user_7Qa1…",
          "name": "Hana",
          "present": true,
          "can_return": true
        }
      ]
    }
  ],
  "unassigned": []
}
PATCH/rooms/{room_id}/breakouts/rooms/{breakout_id}breakouts:write

إعادة تسمية غرفة

Renames a room. People inside see the new name at once.

معاملات المسار

room_iduuidمطلوب
The room's id.
breakout_iduuidمطلوب
The breakout room's id.

جسم الطلب

namestringمطلوب
1–60 characters.

يعيد The updated breakout_session.

الطلب
curl -X PATCH "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts/rooms/{breakout_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Design review"}'
الاستجابة
{
  "object": "breakout_session",
  "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "status": "open",
  "auto_join": true,
  "allow_return": true,
  "self_select": false,
  "duration_seconds": 600,
  "started_at": "2026-09-17T10:00:00.000Z",
  "ends_at": "2026-09-17T10:10:00.000Z",
  "rooms": [
    {
      "id": "e14b07d9-3a52-4c6f-b8d1-92f6a0c73e58",
      "name": "Room 1",
      "members": [
        {
          "id": "user_2fK9…",
          "name": "Salma",
          "present": true,
          "can_return": true
        },
        {
          "id": "api_Xk3mQp9Lr2",
          "name": "Omar",
          "present": true,
          "can_return": false
        }
      ]
    },
    {
      "id": "5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3",
      "name": "Room 2",
      "members": [
        {
          "id": "user_7Qa1…",
          "name": "Hana",
          "present": true,
          "can_return": true
        }
      ]
    }
  ],
  "unassigned": []
}
DELETE/rooms/{room_id}/breakouts/rooms/{breakout_id}breakouts:write

حذف غرفة

Removes a room from the running session. Anyone in it goes back to the main room. A session keeps at least one room.

معاملات المسار

room_iduuidمطلوب
The room's id.
breakout_iduuidمطلوب
The breakout room's id.

يعيد The updated breakout_session.

الطلب
curl -X DELETE "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts/rooms/{breakout_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "breakout_session",
  "id": "b3d9a7c2-6e41-4f08-8c15-0a7e52d1f9c6",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "status": "open",
  "auto_join": true,
  "allow_return": true,
  "self_select": false,
  "duration_seconds": 600,
  "started_at": "2026-09-17T10:00:00.000Z",
  "ends_at": "2026-09-17T10:10:00.000Z",
  "rooms": [
    {
      "id": "e14b07d9-3a52-4c6f-b8d1-92f6a0c73e58",
      "name": "Room 1",
      "members": [
        {
          "id": "user_2fK9…",
          "name": "Salma",
          "present": true,
          "can_return": true
        },
        {
          "id": "api_Xk3mQp9Lr2",
          "name": "Omar",
          "present": true,
          "can_return": false
        }
      ]
    },
    {
      "id": "5a0c9e21-77d4-4b3e-a1f8-c4d62b90e7a3",
      "name": "Room 2",
      "members": [
        {
          "id": "user_7Qa1…",
          "name": "Hana",
          "present": true,
          "can_return": true
        }
      ]
    }
  ],
  "unassigned": []
}
POST/rooms/{room_id}/breakouts/announcebreakouts:write

إرسال رسالة إلى كل الغرف

Shows a short message to everyone in the meeting and in every breakout room at once, for example "Five minutes left". Announcements are shown as a banner and are not end-to-end encrypted, so do not put anything private in them. Limited to ten a minute.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

messagestringمطلوب
Up to 300 characters.

يعيد { object: "breakout_announcement", room_id, sent: true }.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts/announce" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Five minutes left."}'
الاستجابة
{
  "object": "breakout_announcement",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "sent": true
}
POST/rooms/{room_id}/breakouts/endbreakouts:write

إنهاء الغرف الفرعية

Brings everyone back to the main room. With warn: true people see a 60-second countdown and the rooms close when it ends; otherwise they close at once. Ending the whole meeting also ends any open breakouts.

معاملات المسار

room_iduuidمطلوب
The room's id.

جسم الطلب

warnboolean
Give a 60-second countdown first. Defaults to false.

يعيد { object: "breakouts", room_id, ended, closing, ends_at }.

الطلب
curl -X POST "https://deewan.io/api/v1/rooms/$ROOM_ID/breakouts/end" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"warn":true}'
الاستجابة
{
  "object": "breakouts",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "ended": false,
  "closing": true,
  "ends_at": "2026-09-17T10:06:00.000Z"
}

التسجيلات

GET/recordingsrecordings:read

عرض التسجيلات

Recordings made in this workspace's rooms, newest first.

معاملات الاستعلام

room_iduuid
Only recordings from this room.
limitinteger
1–100, default 50.

يعيد A list of recording objects.

الطلب
curl -X GET "https://deewan.io/api/v1/recordings" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "recording",
      "id": "e91c7d45-3a62-4b8f-9c0d-1a2b3c4d5e6f",
      "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
      "title": "Onboarding call",
      "status": "ready",
      "visibility": "room",
      "mime_type": "video/webm;codecs=vp9,opus",
      "parts": 14,
      "bytes": 65011712,
      "duration_ms": 1832000,
      "started_at": "2026-09-17T09:20:00.000Z",
      "ended_at": "2026-09-17T09:50:32.000Z"
    }
  ],
  "has_more": false
}
GET/recordings/{recording_id}recordings:read

قراءة تسجيل

Metadata for one recording, including how many encrypted parts it has.

معاملات المسار

recording_iduuidمطلوب
The recording's id.

يعيد A recording object.

الطلب
curl -X GET "https://deewan.io/api/v1/recordings/{recording_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "recording",
  "id": "e91c7d45-3a62-4b8f-9c0d-1a2b3c4d5e6f",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "title": "Onboarding call",
  "status": "ready",
  "visibility": "room",
  "mime_type": "video/webm;codecs=vp9,opus",
  "parts": 14,
  "bytes": 65011712,
  "duration_ms": 1832000,
  "started_at": "2026-09-17T09:20:00.000Z",
  "ended_at": "2026-09-17T09:50:32.000Z"
}
POST/recordings/{recording_id}/downloadrecordings:read

الحصول على الأجزاء والمفتاح

Everything needed to rebuild the file: the part URLs and the key for this one recording. Each part is a 12-byte IV followed by AES-256-GCM ciphertext, authenticated with deewan-recording:<recording id>:<index>. The SDK's recordings.download() does this for you. Treat the key like a password.

معاملات المسار

recording_iduuidمطلوب
The recording's id.

يعيد A recording.download object.

الطلب
curl -X POST "https://deewan.io/api/v1/recordings/{recording_id}/download" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "recording.download",
  "id": "e91c7d45-3a62-4b8f-9c0d-1a2b3c4d5e6f",
  "mime_type": "video/webm;codecs=vp9,opus",
  "bytes": 65011712,
  "encryption": {
    "algorithm": "AES-256-GCM",
    "key": "xq7…",
    "key_encoding": "base64url",
    "iv_bytes": 12
  },
  "parts": [
    {
      "index": 0,
      "url": "https://deewan.io/api/v1/recordings/e91c7d45-3a62-4b8f-9c0d-1a2b3c4d5e6f/parts/0"
    }
  ]
}
GET/recordings/{recording_id}/parts/{index}recordings:read

تنزيل جزء

One encrypted part, exactly as stored. The response is binary, not JSON.

معاملات المسار

recording_iduuidمطلوب
The recording's id.
indexintegerمطلوب
Part number, starting at 0.

يعيد application/octet-stream — IV + ciphertext.

الطلب
curl -X GET "https://deewan.io/api/v1/recordings/{recording_id}/parts/{index}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
"<binary>"
DELETE/recordings/{recording_id}recordings:write

حذف تسجيل

Deletes the recording and its stored parts. This cannot be undone.

معاملات المسار

recording_iduuidمطلوب
The recording's id.

يعيد { object: "recording", id, deleted: true }.

الطلب
curl -X DELETE "https://deewan.io/api/v1/recordings/{recording_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "recording",
  "id": "e91c7d45-3a62-4b8f-9c0d-1a2b3c4d5e6f",
  "deleted": true
}

نصوص الاجتماعات

GET/rooms/{room_id}/sessions/{session_id}/transcripttranscripts:read

عرض نص الاجتماع

What was said in one session of a room with settings.transcription on: every finished line with the speaker, their participant_ref and the time, and Deewan AI's summary (what the meeting was about and how it went, key points, follow-ups). The summary is written right after the meeting ends — transcript.ready fires when it's there — and is null until then.

معاملات المسار

room_iduuidمطلوب
The room's id.
session_idstringمطلوب
From the sessions list, or the session_id on a webhook.

يعيد A transcript.

الطلب
curl -X GET "https://deewan.io/api/v1/rooms/$ROOM_ID/sessions/{session_id}/transcript" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "transcript",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "session_id": "RM_wQr8kE2mZpN",
  "summary": {
    "summary": "A first-round interview for the frontend role. Omar walked through two recent projects and a take-home exercise; the conversation was relaxed and he answered the system-design questions in depth.",
    "key_points": [
      "Five years of React, two leading a small team",
      "Prefers a hybrid schedule",
      "Available from December"
    ],
    "action_items": [
      "Sara sends the technical task by Thursday",
      "Omar shares two references"
    ]
  },
  "lines": [
    {
      "participant_ref": "api_Qm9vZ3YxN2d0",
      "speaker": "Sara Ahmed",
      "text": "Thanks for joining, Omar. Shall we start with your current role?",
      "lang": "en",
      "at": "2026-09-17T09:01:52.000Z"
    },
    {
      "participant_ref": "api_Wm9yYTE4MmFh",
      "speaker": "Omar Khalil",
      "text": "Sure. I lead the web team at a logistics startup…",
      "lang": "en",
      "at": "2026-09-17T09:01:58.000Z"
    }
  ]
}
DELETE/rooms/{room_id}/sessions/{session_id}/transcripttranscripts:write

حذف نص الاجتماع

Deletes a session's transcript and its summary for good.

معاملات المسار

room_iduuidمطلوب
The room's id.
session_idstringمطلوب
The session.

يعيد The deleted transcript's ids.

الطلب
curl -X DELETE "https://deewan.io/api/v1/rooms/$ROOM_ID/sessions/{session_id}/transcript" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "transcript",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "session_id": "RM_wQr8kE2mZpN",
  "deleted": true
}

الويب هوك

GET/webhookswebhooks:manage

عرض النقاط

Webhook endpoints in the key's scope.

يعيد A list of webhook_endpoint objects.

الطلب
curl -X GET "https://deewan.io/api/v1/webhooks" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "webhook_endpoint",
      "id": "3c9e…",
      "url": "https://example.com/hooks/deewan",
      "description": null,
      "events": [
        "room.started"
      ],
      "enabled": true,
      "created_at": "2026-09-17T09:00:00.000Z"
    }
  ],
  "has_more": false
}
POST/webhookswebhooks:manage

إنشاء نقطة

Registers a public HTTPS endpoint. The response includes secret, shown only once — store it to verify signatures. Up to 10 endpoints per scope.

جسم الطلب

urlstringمطلوب
A public https:// URL. Private and local addresses are refused.
eventsstring[]مطلوب
Event types to receive, or ["*"] for all.
descriptionstring | null
Up to 120 characters.
enabledboolean
Default true.

يعيد The new webhook_endpoint plus secret.

الطلب
curl -X POST "https://deewan.io/api/v1/webhooks" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hooks/deewan","events":["room.started","room.finished","participant.joined"]}'
الاستجابة
{
  "object": "webhook_endpoint",
  "id": "3c9e…",
  "url": "https://example.com/hooks/deewan",
  "description": null,
  "events": [
    "room.started",
    "room.finished",
    "participant.joined"
  ],
  "enabled": true,
  "created_at": "2026-09-17T09:00:00.000Z",
  "secret": "whsec_…"
}
PATCH/webhooks/{webhook_id}webhooks:manage

تعديل نقطة

Change the URL, events, description, or pause it with enabled: false.

معاملات المسار

webhook_iduuidمطلوب
The endpoint's id.

جسم الطلب

urlstring
A public https:// URL.
eventsstring[]
Replaces the event list.
descriptionstring | null
Up to 120 characters.
enabledboolean
Pause or resume deliveries.

يعيد The updated webhook_endpoint.

الطلب
curl -X PATCH "https://deewan.io/api/v1/webhooks/$WEBHOOK_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'
الاستجابة
{
  "object": "webhook_endpoint",
  "id": "3c9e…",
  "url": "https://example.com/hooks/deewan",
  "description": null,
  "events": [
    "room.started"
  ],
  "enabled": false,
  "created_at": "2026-09-17T09:00:00.000Z"
}
DELETE/webhooks/{webhook_id}webhooks:manage

حذف نقطة

Stops deliveries and deletes the endpoint.

معاملات المسار

webhook_iduuidمطلوب
The endpoint's id.

يعيد The deleted endpoint with deleted: true.

الطلب
curl -X DELETE "https://deewan.io/api/v1/webhooks/$WEBHOOK_ID" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "webhook_endpoint",
  "id": "3c9e…",
  "deleted": true
}
POST/webhooks/{webhook_id}/testwebhooks:manage

إرسال حدث تجريبي

Delivers a signed webhook.test event now and reports your endpoint's response.

معاملات المسار

webhook_iduuidمطلوب
The endpoint's id.

يعيد { object: "webhook_test", ok, status }

الطلب
curl -X POST "https://deewan.io/api/v1/webhooks/$WEBHOOK_ID/test" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "webhook_test",
  "ok": true,
  "status": 200
}
GET/webhooks/{webhook_id}/deliverieswebhooks:manage

عرض التسليمات

The 50 most recent delivery attempts, with outcome and your endpoint's status code.

معاملات المسار

webhook_iduuidمطلوب
The endpoint's id.

يعيد A list of webhook_delivery objects.

الطلب
curl -X GET "https://deewan.io/api/v1/webhooks/$WEBHOOK_ID/deliveries" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "webhook_delivery",
      "id": "77aa…",
      "event_id": "evt_…",
      "event_type": "room.started",
      "status": "succeeded",
      "attempts": 1,
      "response_code": 200,
      "error": null,
      "created_at": "2026-09-17T09:20:00.000Z"
    }
  ],
  "has_more": false
}

واجهة المشارك

GET/participantroom token

صاحب هذا الرمز

The Participant API is what one person may do for themselves inside a meeting, for interfaces you build yourself. Send the participant's own room token (from POST /rooms/{room_id}/tokens) as Authorization: Bearer <token>, never an API key, so it's safe to call from a browser or an app; it allows any origin and never uses cookies. Each call checks the token's signature and that the person is in the meeting right now; a token works for up to 12 hours while they stay. Limited to 60 requests a minute per connection. The client SDKs call these for you.

يعيد A participant.

الطلب
curl -X GET "https://deewan.io/api/v1/participant" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "participant",
  "identity": "api_Qm9vZ3Y.k2d9x0aa",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "name": "Omar",
  "role": "participant"
}
POST/participant/handroom token

رفع اليد أو خفضها

Everyone sees it as the participant's hand attribute (when it went up). Hosts lower anyone's hand with the server API.

جسم الطلب

raisedbooleanمطلوب
true to raise, false to lower.

يعيد { object: "hand", raised }

الطلب
curl -X POST "https://deewan.io/api/v1/participant/hand" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"raised":true}'
الاستجابة
{
  "object": "hand",
  "raised": true
}
POST/participant/attributesroom token

ضبط سمات الوكيل

Agent tokens only (kind: "agent"). Sets attributes on your own agent connection: LiveKit Agents' lk.agent.* keys (such as lk.agent.state: listening, thinking, speaking) and your own app.* keys (such as app.ends_at). Everyone in the meeting sees them; the client SDKs show them on agents(). An empty string removes a key. Agents can't set attributes directly on the media server, because that would let any connection rewrite role; other keys are refused here.

جسم الطلب

attributesobjectمطلوب
1–10 keys, lk.agent.* or app.*; string values up to 512 characters, 4 KB in all.

يعيد { object: "participant_attributes", attributes }

الطلب
curl -X POST "https://deewan.io/api/v1/participant/attributes" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"attributes":{"lk.agent.state":"speaking"}}'
الاستجابة
{
  "object": "participant_attributes",
  "attributes": {
    "lk.agent.state": "speaking"
  }
}
GET/participant/pollsroom token

عرض استطلاعات الاجتماع

As this participant may see them: results stay hidden until the poll's rule allows (after_vote, after_close), and who voted for what is never shown here. When something changes, clients get a nudge on the poll data topic.

يعيد A list of poll objects.

الطلب
curl -X GET "https://deewan.io/api/v1/participant/polls" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "poll",
      "id": "c0f1…",
      "question": "Ship it?",
      "kind": "single",
      "anonymous": false,
      "results": "after_vote",
      "status": "open",
      "voted": false,
      "show_results": false,
      "total_voters": 0,
      "options": [
        {
          "id": "9a2e…",
          "label": "Yes",
          "votes": 0,
          "mine": false
        }
      ]
    }
  ]
}
POST/participant/polls/{poll_id}/votesroom token

التصويت في استطلاع

Votes in an open poll of this meeting; voting again replaces the earlier answer. A closed poll returns 409.

معاملات المسار

poll_iduuidمطلوب
The poll's id.

جسم الطلب

option_idsstring[]مطلوب
One option for a single-choice poll, up to 10 for multiple choice.

يعيد { object: "vote", poll_id, option_ids }

الطلب
curl -X POST "https://deewan.io/api/v1/participant/polls/{poll_id}/votes" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"option_ids":["9a2e…"]}'
الاستجابة
{
  "object": "vote",
  "poll_id": "c0f1…",
  "option_ids": [
    "9a2e…"
  ]
}
POST/participant/captionsroom token

تشغيل الترجمة النصية أو إيقافها

Caption lines arrive on the caption data topic. Not available in strict rooms (409).

جسم الطلب

onbooleanمطلوب
true to turn on.

يعيد { object: "captions", on }

الطلب
curl -X POST "https://deewan.io/api/v1/participant/captions" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"on":true}'
الاستجابة
{
  "object": "captions",
  "on": true
}
POST/participant/still-hereroom token

الرد على «هل ما زلت هنا؟»

Someone alone in a meeting for the room's idle_timeout_minutes receives { type: "alone_check", seconds } on the system data topic; calling this within those seconds keeps them in, and the clock starts again. Otherwise they get { type: "alone" } and are removed. Tokens with max_duration_seconds get { type: "time_warning", seconds } two minutes before their end and { type: "time_up" } at it. The client SDKs surface these as aloneCheck, timeWarning and the alone / time_up leave reasons.

يعيد { object: "still_here", ok: true }

الطلب
curl -X POST "https://deewan.io/api/v1/participant/still-here" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "still_here",
  "ok": true
}
POST/participant/e2eeroom token

تمرير مفاتيح الغرف الصارمة

The postbox for strict rooms' key exchange: hand the meeting key, sealed to each recipient's exchange key (ECDH P-256, HKDF-SHA-256, AES-256-GCM), to people in the room, or ask for it. Deewan relays ciphertext it can't open. The client SDKs do all of this; you only need it to write your own client.

جسم الطلب

deliver{ to, box }[]
Sealed keys for particular people (up to 50).
needboolean
Ask the people who have the key to send it.

يعيد { object: "e2ee_relay", delivered }

الطلب
curl -X POST "https://deewan.io/api/v1/participant/e2ee" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"need":true}'
الاستجابة
{
  "object": "e2ee_relay",
  "delivered": 0
}

مستخدمو المحادثة

POST/userschat:write

إنشاء مستخدم أو تحديثه

Someone in your app, known by your own id. Creating an existing id updates them, so call it whenever someone signs in. Users are separate per environment: test keys never see live users.

جسم الطلب

idstringمطلوب
Your own id: letters, digits and _ . @ : -, up to 128.
namestring
Shown to others (up to 120).
imagestring
An https:// picture.
metadataobject
Your own data, up to 8 KB.

يعيد A chat_user.

الطلب
curl -X POST "https://deewan.io/api/v1/users" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"user_123","name":"Sara Ahmed","image":"https://cdn.example.com/sara.jpg","metadata":{"plan":"pro"}}'
الاستجابة
{
  "object": "chat_user",
  "id": "user_123",
  "name": "Sara Ahmed",
  "image": "https://cdn.example.com/sara.jpg",
  "metadata": {
    "plan": "pro"
  },
  "created_at": "2026-11-25T09:00:00.000Z",
  "updated_at": "2026-11-25T09:00:00.000Z"
}
POST/users/{user_id}/tokenchat:write

إنشاء رمز مستخدم

Credentials for this user's device (browser or app) to use chat and calls as them, and nothing else: the client API below, connectChat in @deewanio/sdk/client. Never put your API key on a device; your server makes this token after it has signed the person in. It expires (1 hour by default, at most 24); the SDK asks your server for a new one. Revoking the API key that made it ends it within 30 seconds; deleting the user ends it at once.

معاملات المسار

user_idstringمطلوب
Your own id for the user.

جسم الطلب

expires_ininteger
Seconds, 60–86400. Default 3600.

يعيد A chat_user_token.

الطلب
curl -X POST "https://deewan.io/api/v1/users/{user_id}/token" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expires_in":3600}'
الاستجابة
{
  "object": "chat_user_token",
  "user_id": "user_123",
  "token": "dwu_eyJ2IjoxLCJrIjoi…",
  "expires_at": "2026-11-25T10:00:00.000Z"
}
GET/users/{user_id}chat:read

عرض مستخدم

The user, and whether they're connected right now (online).

معاملات المسار

user_idstringمطلوب
Your own id for the user.

يعيد A chat_user with online.

الطلب
curl -X GET "https://deewan.io/api/v1/users/{user_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "chat_user",
  "id": "user_123",
  "name": "Sara Ahmed",
  "image": "https://cdn.example.com/sara.jpg",
  "metadata": {
    "plan": "pro"
  },
  "created_at": "2026-11-25T09:00:00.000Z",
  "updated_at": "2026-11-25T09:00:00.000Z",
  "online": true
}
PATCH/users/{user_id}chat:write

تعديل مستخدم

Change a user's name, picture or metadata; the people they chat with see it.

معاملات المسار

user_idstringمطلوب
Your own id for the user.

جسم الطلب

namestring
Up to 120.
imagestring
An https:// picture; null clears it.
metadataobject
Replaces it.

يعيد A chat_user.

الطلب
curl -X PATCH "https://deewan.io/api/v1/users/{user_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Sara A."}'
الاستجابة
{
  "object": "chat_user",
  "id": "user_123",
  "name": "Sara A.",
  "image": "https://cdn.example.com/sara.jpg",
  "metadata": {
    "plan": "pro"
  },
  "created_at": "2026-11-25T09:00:00.000Z",
  "updated_at": "2026-11-25T09:00:00.000Z"
}
GET/userschat:read

عرض المستخدمين

Your app's users, by id.

معاملات الاستعلام

limitinteger
1–100, default 50.
starting_afterstring
A user id: the page after it.

يعيد A list of chat_user.

الطلب
curl -X GET "https://deewan.io/api/v1/users" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "chat_user",
      "id": "user_123",
      "name": "Sara Ahmed",
      "image": "https://cdn.example.com/sara.jpg",
      "metadata": {
        "plan": "pro"
      },
      "created_at": "2026-11-25T09:00:00.000Z",
      "updated_at": "2026-11-25T09:00:00.000Z"
    }
  ],
  "has_more": false
}
DELETE/users/{user_id}chat:write

حذف مستخدم

Removes the user, their memberships, reactions and tokens. Their messages stay in their channels, without a sender, so conversations still read.

معاملات المسار

user_idstringمطلوب
Your own id for the user.

يعيد { object: "chat_user", id, deleted: true }

الطلب
curl -X DELETE "https://deewan.io/api/v1/users/{user_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "chat_user",
  "id": "user_123",
  "deleted": true
}

القنوات

POST/channelschat:write

إنشاء قناة

A 1:1 (direct, exactly two members; asking again returns the same channel) or a group (up to 1000). Created by your server, a group's members are all admins until you set roles; created by a user (client API), its creator is its admin.

جسم الطلب

kind"direct" | "group"مطلوب
One to one, or a group.
membersstring[]مطلوب
User ids (they must exist).
namestring
Groups: up to 120.
imagestring
An https:// picture.
external_idstring
Your own id for it (a class, an order, a team): you can use it wherever a channel id goes.
metadataobject
Your own data, up to 8 KB.

يعيد A channel.

الطلب
curl -X POST "https://deewan.io/api/v1/channels" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"group","members":["teacher_1","user_123"],"name":"Grade 10 · Physics","external_id":"class-42"}'
الاستجابة
{
  "object": "channel",
  "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "external_id": "class-42",
  "kind": "group",
  "name": "Grade 10 · Physics",
  "image": null,
  "metadata": {},
  "frozen": false,
  "members": [
    {
      "user_id": "teacher_1",
      "role": "admin",
      "last_read_seq": 12
    },
    {
      "user_id": "user_123",
      "role": "member",
      "last_read_seq": 10
    }
  ],
  "last_seq": 12,
  "last_message_at": "2026-11-25T09:20:00.000Z",
  "created_at": "2026-11-25T09:00:00.000Z"
}
GET/channelschat:read

عرض القنوات

Newest activity first.

معاملات الاستعلام

userstring
Only this user's channels.
limitinteger
1–100, default 30.
beforestring
An ISO time: channels last active before it (the next page).

يعيد A list of channel.

الطلب
curl -X GET "https://deewan.io/api/v1/channels" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "channel",
      "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
      "external_id": "class-42",
      "kind": "group",
      "name": "Grade 10 · Physics",
      "image": null,
      "metadata": {},
      "frozen": false,
      "members": [
        {
          "user_id": "teacher_1",
          "role": "admin",
          "last_read_seq": 12
        },
        {
          "user_id": "user_123",
          "role": "member",
          "last_read_seq": 10
        }
      ],
      "last_seq": 12,
      "last_message_at": "2026-11-25T09:20:00.000Z",
      "created_at": "2026-11-25T09:00:00.000Z"
    }
  ],
  "has_more": false
}
GET/channels/{channel_id}chat:read

عرض قناة

With its members, their roles and how far each has read.

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

يعيد A channel.

الطلب
curl -X GET "https://deewan.io/api/v1/channels/{channel_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "channel",
  "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "external_id": "class-42",
  "kind": "group",
  "name": "Grade 10 · Physics",
  "image": null,
  "metadata": {},
  "frozen": false,
  "members": [
    {
      "user_id": "teacher_1",
      "role": "admin",
      "last_read_seq": 12
    },
    {
      "user_id": "user_123",
      "role": "member",
      "last_read_seq": 10
    }
  ],
  "last_seq": 12,
  "last_message_at": "2026-11-25T09:20:00.000Z",
  "created_at": "2026-11-25T09:00:00.000Z"
}
PATCH/channels/{channel_id}chat:write

تعديل قناة

Rename it, change its picture or metadata, or frozen: true: only your server can post (announcements, a closed thread).

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

جسم الطلب

namestring
Up to 120; null clears it.
imagestring
An https:// picture; null clears it.
metadataobject
Replaces it.
frozenboolean
Only your server may post.

يعيد A channel.

الطلب
curl -X PATCH "https://deewan.io/api/v1/channels/{channel_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"frozen":true}'
الاستجابة
{
  "object": "channel",
  "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "external_id": "class-42",
  "kind": "group",
  "name": "Grade 10 · Physics",
  "image": null,
  "metadata": {},
  "frozen": true,
  "members": [
    {
      "user_id": "teacher_1",
      "role": "admin",
      "last_read_seq": 12
    },
    {
      "user_id": "user_123",
      "role": "member",
      "last_read_seq": 10
    }
  ],
  "last_seq": 12,
  "last_message_at": "2026-11-25T09:20:00.000Z",
  "created_at": "2026-11-25T09:00:00.000Z"
}
POST/channels/{channel_id}/memberschat:write

إضافة أعضاء أو إزالتهم

Groups only. role applies to those added (and changes the role of anyone already in).

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

جسم الطلب

addstring[]
User ids to add.
removestring[]
User ids to remove.
role"admin" | "member"
For those added. Default member.

يعيد A channel.

الطلب
curl -X POST "https://deewan.io/api/v1/channels/{channel_id}/members" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"add":["user_456"]}'
الاستجابة
{
  "object": "channel",
  "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "external_id": "class-42",
  "kind": "group",
  "name": "Grade 10 · Physics",
  "image": null,
  "metadata": {},
  "frozen": false,
  "members": [
    {
      "user_id": "teacher_1",
      "role": "admin",
      "last_read_seq": 12
    },
    {
      "user_id": "user_123",
      "role": "member",
      "last_read_seq": 10
    }
  ],
  "last_seq": 12,
  "last_message_at": "2026-11-25T09:20:00.000Z",
  "created_at": "2026-11-25T09:00:00.000Z"
}
DELETE/channels/{channel_id}chat:write

حذف قناة

With all its messages, for everyone.

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

يعيد { object: "channel", id, deleted: true }

الطلب
curl -X DELETE "https://deewan.io/api/v1/channels/{channel_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "channel",
  "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "deleted": true
}

الرسائل

POST/channels/{channel_id}/messageschat:write

إرسال رسالة

From your server: as the system (no user_id: user_id is null in the message) or on behalf of a member (a bot, an import). Everyone in the channel gets it live; message.created goes to your webhooks with the members, so you can push-notify phones.

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

جسم الطلب

textstring
Up to 8000 characters. Text, attachments, or both.
attachmentsarray
Up to 10 files you host: { url, type?, name?, size?, width?, height?, duration? }; https:// URLs only. Deewan never fetches them.
reply_tostring
A message in the same channel this replies to.
metadataobject
Your own data, up to 8 KB.
idstring
Your own UUID for the message: sending again with the same id returns the same message, so retries are safe.
user_idstring
Post as this member.

يعيد A message.

الطلب
curl -X POST "https://deewan.io/api/v1/channels/{channel_id}/messages" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Homework is due Sunday."}'
الاستجابة
{
  "object": "message",
  "id": "c1d7a9e2-0b4f-4d3a-8e21-5f6a7b8c9d00",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "seq": 13,
  "user_id": null,
  "text": "Homework is due Sunday.",
  "attachments": [],
  "reply_to": null,
  "metadata": {},
  "reactions": {
    "👍": [
      "teacher_1"
    ]
  },
  "created_at": "2026-11-25T09:21:00.000Z",
  "edited_at": null,
  "deleted": false
}
GET/channels/{channel_id}/messageschat:read

عرض الرسائل

Oldest first within the page. Every message has a seq (1, 2, 3… per channel): page back with before, catch up after a reconnect with after.

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

معاملات الاستعلام

beforeinteger
Messages with a lower seq (older).
afterinteger
Messages with a higher seq (newer).
limitinteger
1–200, default 50.

يعيد A list of message.

الطلب
curl -X GET "https://deewan.io/api/v1/channels/{channel_id}/messages" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "message",
      "id": "c1d7a9e2-0b4f-4d3a-8e21-5f6a7b8c9d00",
      "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
      "seq": 13,
      "user_id": "user_123",
      "text": "Is the homework due Sunday?",
      "attachments": [],
      "reply_to": null,
      "metadata": {},
      "reactions": {
        "👍": [
          "teacher_1"
        ]
      },
      "created_at": "2026-11-25T09:21:00.000Z",
      "edited_at": null,
      "deleted": false
    }
  ],
  "has_more": true
}
PATCH/messages/{message_id}chat:write

تعديل رسالة

Sets edited_at; everyone in the channel sees the change live.

معاملات المسار

message_idstringمطلوب
The message's id.

جسم الطلب

textstring
The new text.
metadataobject
Replaces it.

يعيد A message.

الطلب
curl -X PATCH "https://deewan.io/api/v1/messages/{message_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Homework is due Monday."}'
الاستجابة
{
  "object": "message",
  "id": "c1d7a9e2-0b4f-4d3a-8e21-5f6a7b8c9d00",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "seq": 13,
  "user_id": "user_123",
  "text": "Is the homework due Sunday?",
  "attachments": [],
  "reply_to": null,
  "metadata": {},
  "reactions": {
    "👍": [
      "teacher_1"
    ]
  },
  "created_at": "2026-11-25T09:21:00.000Z",
  "edited_at": "2026-11-25T09:25:00.000Z",
  "deleted": false
}
DELETE/messages/{message_id}chat:write

حذف رسالة

Erases its text, attachments, metadata and reactions from Deewan's servers; the slot stays as deleted: true so the conversation keeps its shape.

معاملات المسار

message_idstringمطلوب
The message's id.

يعيد The message, deleted.

الطلب
curl -X DELETE "https://deewan.io/api/v1/messages/{message_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "message",
  "id": "c1d7a9e2-0b4f-4d3a-8e21-5f6a7b8c9d00",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "seq": 13,
  "user_id": "user_123",
  "text": null,
  "attachments": [],
  "reply_to": null,
  "metadata": {},
  "reactions": {},
  "created_at": "2026-11-25T09:21:00.000Z",
  "edited_at": null,
  "deleted": true
}

المكالمات

POST/callscalls:write

بدء مكالمة

Rings a channel's members or a list of users, for 45 seconds. Connected devices get call.ringing live; call.ringing also goes to your webhooks with who to ring, so you can push-notify phones. Each call is its own Deewan room (room_id, single use, members only), so recording, breakout rooms, polls, captions and moderation work on it through the room APIs. encryption: "strict": the call's key is made and kept on the devices, never on Deewan's servers. Calling a channel that already has a call returns that call.

جسم الطلب

channel_idstring
Ring this channel's members (or give members).
membersstring[]
Ring these users (up to 100).
fromstring
The user calling (they're joined; the others ring).
kind"audio" | "video"
Default video.
encryption"standard" | "strict"
Default standard.

يعيد A call.

الطلب
curl -X POST "https://deewan.io/api/v1/calls" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel_id":"8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10","from":"teacher_1","kind":"video"}'
الاستجابة
{
  "object": "call",
  "id": "4e2a9b7c-1d3f-4a5e-9b8c-7d6e5f4a3b21",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "kind": "video",
  "status": "ringing",
  "encryption": "standard",
  "created_by": "teacher_1",
  "members": [
    {
      "user_id": "teacher_1",
      "state": "joined"
    },
    {
      "user_id": "user_123",
      "state": "invited"
    }
  ],
  "created_at": "2026-11-25T09:30:00.000Z",
  "answered_at": null,
  "ended_at": null
}
GET/calls/{call_id}chat:read

عرض مكالمة

status: ringing → active → ended, or missed / declined. Each member's state: invited, joined, declined, left.

معاملات المسار

call_idstringمطلوب
The call's id.

يعيد A call.

الطلب
curl -X GET "https://deewan.io/api/v1/calls/{call_id}" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "call",
  "id": "4e2a9b7c-1d3f-4a5e-9b8c-7d6e5f4a3b21",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "kind": "video",
  "status": "active",
  "encryption": "standard",
  "created_by": "teacher_1",
  "members": [
    {
      "user_id": "teacher_1",
      "state": "joined"
    },
    {
      "user_id": "user_123",
      "state": "invited"
    }
  ],
  "created_at": "2026-11-25T09:30:00.000Z",
  "answered_at": "2026-11-25T09:30:08.000Z",
  "ended_at": null
}
GET/callschat:read

عرض المكالمات

Newest first; a call history for a channel with channel_id.

معاملات الاستعلام

channel_idstring
Only this channel's calls.
limitinteger
1–100, default 30.

يعيد A list of call.

الطلب
curl -X GET "https://deewan.io/api/v1/calls" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "call",
      "id": "4e2a9b7c-1d3f-4a5e-9b8c-7d6e5f4a3b21",
      "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
      "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
      "kind": "video",
      "status": "ringing",
      "encryption": "standard",
      "created_by": "teacher_1",
      "members": [
        {
          "user_id": "teacher_1",
          "state": "joined"
        },
        {
          "user_id": "user_123",
          "state": "invited"
        }
      ],
      "created_at": "2026-11-25T09:30:00.000Z",
      "answered_at": null,
      "ended_at": null
    }
  ],
  "has_more": false
}
POST/calls/{call_id}/endcalls:write

إنهاء مكالمة

Ends it for everyone (a ringing call becomes missed).

معاملات المسار

call_idstringمطلوب
The call's id.

يعيد A call.

الطلب
curl -X POST "https://deewan.io/api/v1/calls/{call_id}/end" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "call",
  "id": "4e2a9b7c-1d3f-4a5e-9b8c-7d6e5f4a3b21",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "kind": "video",
  "status": "ended",
  "encryption": "standard",
  "created_by": "teacher_1",
  "members": [
    {
      "user_id": "teacher_1",
      "state": "joined"
    },
    {
      "user_id": "user_123",
      "state": "invited"
    }
  ],
  "created_at": "2026-11-25T09:30:00.000Z",
  "answered_at": null,
  "ended_at": "2026-11-25T09:45:00.000Z"
}

واجهة العميل للمحادثة

GET/chat/eventsuser token

الأحداث المباشرة

Server-sent events for this user: hello, message.new, message.updated, message.deleted, read, typing, channel.created, channel.updated, channel.deleted, call.ringing, call.updated. Send the token as Authorization: Bearer, or as ?token= where headers aren't possible (browser EventSource). Reconnect when it drops and catch up with GET …/messages?after=. connectChat does all of this for you.

يعيد text/event-stream

الطلب
curl -X GET "https://deewan.io/api/v1/chat/events" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "type": "message.new",
  "message": {
    "object": "message",
    "id": "c1d7a9e2-0b4f-4d3a-8e21-5f6a7b8c9d00",
    "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
    "seq": 13,
    "user_id": "user_123",
    "text": "Is the homework due Sunday?",
    "attachments": [],
    "reply_to": null,
    "metadata": {},
    "reactions": {
      "👍": [
        "teacher_1"
      ]
    },
    "created_at": "2026-11-25T09:21:00.000Z",
    "edited_at": null,
    "deleted": false
  }
}
GET/chat/channelsuser token

قنواتك

The token's user's channels, newest activity first. POST the same path to start a 1:1 or a group (you're its admin). Also: GET/PATCH /chat/channels/{id}, POST /chat/channels/{id}/members (admins add/remove; anyone leaves), POST /chat/channels/{id}/read { seq }, POST /chat/channels/{id}/typing.

يعيد A list of channel.

الطلب
curl -X GET "https://deewan.io/api/v1/chat/channels" \
  -H "Authorization: Bearer $DEEWAN_API_KEY"
الاستجابة
{
  "object": "list",
  "data": [
    {
      "object": "channel",
      "id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
      "external_id": "class-42",
      "kind": "group",
      "name": "Grade 10 · Physics",
      "image": null,
      "metadata": {},
      "frozen": false,
      "members": [
        {
          "user_id": "teacher_1",
          "role": "admin",
          "last_read_seq": 12
        },
        {
          "user_id": "user_123",
          "role": "member",
          "last_read_seq": 10
        }
      ],
      "last_seq": 12,
      "last_message_at": "2026-11-25T09:20:00.000Z",
      "created_at": "2026-11-25T09:00:00.000Z"
    }
  ],
  "has_more": false
}
POST/chat/channels/{channel_id}/messagesuser token

أرسل باسمك

In channels you're in (not frozen ones). Up to 30 messages in 10 seconds. Also: GET the same path for history, PATCH/DELETE /chat/messages/{id} for your own messages (admins delete any), POST /chat/messages/{id}/reactions { emoji, on }.

معاملات المسار

channel_idstringمطلوب
The channel's id, or your external_id for it.

جسم الطلب

textstring
Up to 8000 characters. Text, attachments, or both.
attachmentsarray
Up to 10 files you host: { url, type?, name?, size?, width?, height?, duration? }; https:// URLs only. Deewan never fetches them.
reply_tostring
A message in the same channel this replies to.
metadataobject
Your own data, up to 8 KB.
idstring
Your own UUID for the message: sending again with the same id returns the same message, so retries are safe.

يعيد A message.

الطلب
curl -X POST "https://deewan.io/api/v1/chat/channels/{channel_id}/messages" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Is the homework due Sunday?"}'
الاستجابة
{
  "object": "message",
  "id": "c1d7a9e2-0b4f-4d3a-8e21-5f6a7b8c9d00",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "seq": 13,
  "user_id": "user_123",
  "text": "Is the homework due Sunday?",
  "attachments": [],
  "reply_to": null,
  "metadata": {},
  "reactions": {
    "👍": [
      "teacher_1"
    ]
  },
  "created_at": "2026-11-25T09:21:00.000Z",
  "edited_at": null,
  "deleted": false
}
POST/chat/callsuser token

اتصل بأحد

Ring a channel you're in or people in your app (10 a minute). Then POST /chat/calls/{id}/accept, /decline, /leave, and /token ({ exchange_key } for strict calls) for your media credentials: pass them to joinMeeting, or use chat.calls.join(call), which does every step.

جسم الطلب

channel_idstring
Or members.
membersstring[]
User ids.
kind"audio" | "video"
Default video.
encryption"standard" | "strict"
Default standard.

يعيد A call.

الطلب
curl -X POST "https://deewan.io/api/v1/chat/calls" \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"members":["teacher_1"],"kind":"audio"}'
الاستجابة
{
  "object": "call",
  "id": "4e2a9b7c-1d3f-4a5e-9b8c-7d6e5f4a3b21",
  "channel_id": "8b1f0c52-6a1e-4c1d-9e0a-3c2b7d1e9f10",
  "room_id": "5f0c2b8e-1d7a-4c52-9a0e-2f3b7c1d9e44",
  "kind": "audio",
  "status": "ringing",
  "encryption": "standard",
  "created_by": "user_123",
  "members": [
    {
      "user_id": "teacher_1",
      "state": "joined"
    },
    {
      "user_id": "user_123",
      "state": "invited"
    }
  ],
  "created_at": "2026-11-25T09:30:00.000Z",
  "answered_at": null,
  "ended_at": null
}