Browse Platform API
Platform API

Before creating a group

Copy

Validate or adjust group information and initial members before a group is created.

HTTP request

POST {WEBHOOK_ADDRESS}/callbackBeforeCreateGroupCommand

Request body

PropertyTypeDescription
callbackCommandstringcallbackBeforeCreateGroupCommand.
operationIDstringOpenIM operation trace ID.
groupIDstringGroup ID.
groupNamestringGroup name.
notificationstringGroup announcement.
introductionstringGroup introduction.
faceURLstringGroup avatar URL.
ownerUserIDstringGroup owner user ID.
createTimeintGroup creation time in milliseconds.
memberCountintInitial member count.
exstringExtension data.
statusintGroup status.
creatorUserIDstringGroup creator user ID.
groupTypeintGroup type.
needVerificationintJoin verification policy.
lookMemberInfointWhether ordinary members can view member profiles.
applyMemberFriendintWhether ordinary members can add other members as friends.
notificationUpdateTimeintAnnouncement update time in milliseconds.
notificationUserIDstringUser who last updated the announcement.
displayIsRead EnterprisebooleanWhether group message read status is displayed.
muteBypassUserIDs Enterprisestring[]Users allowed to send messages while the group is muted.
initMemberListobject[]Initial members, each containing userID and roleLevel.

Response

Return the common before-event fields from Webhooks overview. The response may also return the mutable group fields shown above to replace the values OpenIM is about to process.

Processing rules

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