Duvet DOCS
GitHub

Conversation Events

CONVERSATION_CREATE

EVENT CONVERSATION_CREATE

Sent when a new direct message conversation is created. Delivered to all members of the conversation.

FieldTypeDescription
id stringConversation ID
name string?Conversation name (for group DMs)
owner_id stringID of the conversation creator
type integerConversation type
created_at stringISO 8601 creation timestamp
updated_at stringISO 8601 last update timestamp
deleted_at string?ISO 8601 soft-delete timestamp
members ConversationMember[]List of conversation members
{
  "type": "CONVERSATION_CREATE",
  "data": {
    "id": "019cf96a-24e8-72c5-830f-75e85355de00",
    "name": null,
    "owner_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
    "type": 0,
    "created_at": "2025-06-15T14:00:00Z",
    "updated_at": "2025-06-15T14:00:00Z",
    "deleted_at": null,
    "members": [
      {
        "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00",
        "user_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
        "member_id": "019cf96a-35f9-72c5-830f-75e85355df00",
        "username": "MARCROCK22",
        "alias": null,
        "avatar": "9bd6da82-c850-424b-89a0-9e4733263a45"
      }
    ]
  }
}

CONVERSATION_UPDATE

EVENT CONVERSATION_UPDATE

Sent when a group is renamed, and when its owner leaves and the member who joined first becomes the owner. Carries the conversation's current name and owner. Delivered to all members of the conversation (including the one who left).

FieldTypeDescription
id stringConversation ID
name string?Conversation name
owner_id stringID of the conversation's owner
{
  "type": "CONVERSATION_UPDATE",
  "data": {
    "id": "019cf96a-24e8-72c5-830f-75e85355de00",
    "name": "Project Discussion",
    "owner_id": "019cf96a-24e8-72c5-830f-75e85355de01"
  }
}

CONVERSATION_MEMBER_ADD

EVENT CONVERSATION_MEMBER_ADD

Sent when a user is added to a conversation. Delivered to all members of the conversation.

FieldTypeDescription
conversation_id stringConversation ID
user_id stringID of the added user
member_id stringConversation member record ID
username ?stringUsername of the added user
alias ?string?Display name of the added user
avatar ?string?Avatar attachment ID of the added user
banner ?string?Banner attachment ID of the added user
status_id ?integerOnline status (0 = offline, 1 = online)
{
  "type": "CONVERSATION_MEMBER_ADD",
  "data": {
    "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00",
    "user_id": "019cf96a-13d7-72c5-830f-75e85355dd00",
    "member_id": "019cf96a-470a-72c5-830f-75e85355e000",
    "username": "alice",
    "alias": "Alice",
    "avatar": null,
    "banner": null,
    "status_id": 1
  }
}

CONVERSATION_MEMBER_REMOVE

EVENT CONVERSATION_MEMBER_REMOVE

Sent when a user is removed from a conversation. Delivered to all members of the conversation.

FieldTypeDescription
conversation_id stringConversation ID
user_id stringID of the removed user
{
  "type": "CONVERSATION_MEMBER_REMOVE",
  "data": {
    "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00",
    "user_id": "019cf96a-13d7-72c5-830f-75e85355dd00"
  }
}

DM_MESSAGE_CREATE

EVENT DM_MESSAGE_CREATE

Sent when a new message is created in a conversation. Same shape as MESSAGE_CREATE but with conversation_id instead of room_id. Delivered to all members of the conversation.

FieldTypeDescription
id stringMessage ID
conversation_id string?Conversation ID (always set for this event)
author_id string?ID of the message author (always set for a direct message)
content string?Message text content
type integerMessage type
created_at stringISO 8601 creation timestamp
updated_at stringISO 8601 last update timestamp
nonce ?stringClient-generated nonce for deduplication
attachments Attachment[]File attachments
reactions Reaction[]Reactions on this message
user ?UserAuthor user object
referenced_message ?ReferencedMessageReferenced message (for replies)
sticker_attachment_id string?Sticker attachment ID
embeds Embed[]Link embeds
{
  "type": "DM_MESSAGE_CREATE",
  "data": {
    "id": "019cf96a-581b-72c5-830f-75e85355e100",
    "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00",
    "author_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
    "content": "Hey, how are you?",
    "type": 0,
    "created_at": "2025-06-15T14:30:00Z",
    "updated_at": "2025-06-15T14:30:00Z",
    "nonce": "def456",
    "attachments": [],
    "reactions": [],
    "user": {
      "id": "019cf96a-3d5b-72c5-830f-75e85355d078",
      "username": "MARCROCK22",
      "alias": null,
      "avatar": "9bd6da82-c850-424b-89a0-9e4733263a45",
      "banner": null,
      "flags": 1,
      "badges": 1
    },
    "referenced_message": null,
    "sticker_attachment_id": null,
    "embeds": []
  }
}

DM_MESSAGE_UPDATE

EVENT DM_MESSAGE_UPDATE

Sent when a message in a conversation is edited. Same shape as MESSAGE_UPDATE but with conversation_id. Delivered to all members of the conversation.

FieldTypeDescription
id stringMessage ID
conversation_id string?Conversation ID (always set for this event)
author_id string?ID of the message author (always set for a direct message)
content string?Updated message text content
type integerMessage type
created_at stringISO 8601 creation timestamp
updated_at stringISO 8601 last update timestamp
sticker_attachment_id string?Sticker attachment ID
embeds Embed[]Updated link embeds
user ?UserAuthor user object

DM_MESSAGE_PIN_UPDATE

EVENT DM_MESSAGE_PIN_UPDATE

Sent when a message in a conversation is pinned or unpinned. Delivered to all members of the conversation. A pin also posts the conversation's pin notice, which arrives as a DM_MESSAGE_CREATE of type 2.

FieldTypeDescription
id stringID of the message
conversation_id stringConversation ID
pinned_at ISO 8601?When it was pinned; null when it was unpinned

DM_MESSAGE_DELETE

EVENT DM_MESSAGE_DELETE

Sent when a message in a conversation is deleted. Delivered to all members of the conversation.

FieldTypeDescription
id stringDeleted message ID
conversation_id stringConversation ID
{
  "type": "DM_MESSAGE_DELETE",
  "data": {
    "id": "019cf96a-581b-72c5-830f-75e85355e100",
    "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00"
  }
}

DM_TYPING

EVENT DM_TYPING

Sent when a user starts typing in a conversation, at most once every 2 seconds per user. Delivered to all other members of the conversation; it takes no sequence number and isn't buffered for resume.

FieldTypeDescription
user_id stringID of the typing user
username stringUsername of the typing user
alias string?Display name of the typing user
avatar string?Avatar attachment ID
conversation_id stringConversation where the user is typing
{
  "type": "DM_TYPING",
  "data": {
    "user_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
    "username": "MARCROCK22",
    "alias": null,
    "avatar": "9bd6da82-c850-424b-89a0-9e4733263a45",
    "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00"
  }
}

DM_RECORDING

EVENT DM_RECORDING

Sent when a user is recording a voice message in a conversation, at most once every 2 seconds per user. Delivered to all other members of the conversation; like DM_TYPING, it takes no sequence number and isn't buffered for resume.

FieldTypeDescription
user_id stringID of the recording user
username stringUsername of the recording user
alias string?Display name of the recording user
avatar string?Avatar attachment ID
conversation_id stringConversation where the user is recording

DM_MENTION_CREATE

EVENT DM_MENTION_CREATE

Sent to a user when they are mentioned in a conversation message. Delivered only to the mentioned user.

FieldTypeDescription
message_id stringID of the message containing the mention
conversation_id stringConversation where the mention occurred
author_id stringID of the user who sent the mention
{
  "type": "DM_MENTION_CREATE",
  "data": {
    "message_id": "019cf96a-581b-72c5-830f-75e85355e100",
    "conversation_id": "019cf96a-24e8-72c5-830f-75e85355de00",
    "author_id": "019cf96a-3d5b-72c5-830f-75e85355d078"
  }
}

DM_REACTION_ADD

EVENT DM_REACTION_ADD

Sent when a reaction is added to a conversation message. Delivered to all members of the conversation.

FieldTypeDescription
message_id stringMessage the reaction was added to
user_id stringID of the user who reacted
emoji_name stringUnicode emoji character or custom emoji UUID
emoji_id ?stringCustom emoji attachment ID (only for custom emojis)

DM_REACTION_REMOVE

EVENT DM_REACTION_REMOVE

Sent when a reaction is removed from a conversation message. Delivered to all members of the conversation.

FieldTypeDescription
message_id stringMessage the reaction was removed from
user_id stringID of the user who removed their reaction
emoji_name stringUnicode emoji character or custom emoji UUID