Browse Platform API
Platform APIEnterprise

Before creating one-to-one conversations

Copy

Adjust default properties before one-to-one conversations are first created. This callback is available in OpenIM Enterprise.

HTTP request

POST {WEBHOOK_ADDRESS}/callbackBeforeCreateSingleChatConversationsCommand

Request body

PropertyTypeDescription
callbackCommandstringcallbackBeforeCreateSingleChatConversationsCommand.
owner_user_idstringUser who owns the conversation.
conversation_idstringConversation ID.
conversation_typeintConversation type.
user_idstringOther participant user ID.
recv_msg_optintMessage receive option.
is_pinnedbooleanWhether the conversation is pinned.
is_markedbooleanWhether the conversation is marked.
is_private_chatbooleanWhether burn-after-reading is enabled.
burn_durationintBurn-after-reading duration.
group_at_typeintGroup mention reminder type.
attached_infostringAttached conversation data.
exstringExtension data.

Response

Return the common before-event fields from Webhooks overview. The response may replace recv_msg_opt, is_pinned, is_marked, is_private_chat, burn_duration, group_at_type, attached_info, and ex.

Processing rules

  • Configuration key: beforeCreateSingleChatConversations.
  • OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue.