Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api: Complete get_events response format documetation.
orientore7c9c5566494
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 2bf4ffc40dc..893880c108c 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -272,7 +272,7 @@ paths:user_id:type: integerdescription: |- The id of modified user.+ The ID of modified user.full_name:type: stringdescription: |@@ -285,7 +285,7 @@ paths:user_id:type: integerdescription: |- The id of the user who is affected by this change.+ The ID of the user who is affected by this change.avatar_url:type: stringdescription: |@@ -314,7 +314,7 @@ paths:user_id:type: integerdescription: |- The id of modified user.+ The ID of modified user.email:type: stringdescription: |@@ -335,7 +335,7 @@ paths:user_id:type: integerdescription: |- The id of the user/bot whose owner has changed.+ The ID of the user/bot whose owner has changed.bot_owner_id:type: integerdescription: |@@ -348,7 +348,7 @@ paths:user_id:type: integerdescription: |- The id of the user affected by this change.+ The ID of the user affected by this change.role:type: integerdescription: |@@ -363,7 +363,7 @@ paths:user_id:type: integerdescription: |- The id of the user affected by this change.+ The ID of the user affected by this change.delivery_email:type: stringdescription: |@@ -377,7 +377,7 @@ paths:user_id:type: integerdescription: |- The id of the user affected by this change.+ The ID of the user affected by this change.custom_profile_field:type: objectadditionalProperties: false@@ -388,7 +388,7 @@ paths:id:type: integerdescription: |- The id of the custom profile field which user updated.+ The ID of the custom profile field which user updated.value:type: stringdescription: |@@ -503,7 +503,7 @@ paths:stream_id:type: integerdescription: |- The id of the stream.+ The ID of the stream.name:type: stringdescription: |@@ -517,6 +517,68 @@ paths:[{"name": "test_stream", "stream_id": 9}],"id": 0,}+ - type: object+ description: |+ Event sent to a user's clients when a property of the user's+ subscription to a stream has been updated. This event is used+ only for personal properties like `is_muted`; see the `stream` event+ for global properties of a stream.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - subscription+ op:+ type: string+ enum:+ - update+ stream_id:+ type: integer+ description: |+ The ID of the stream whose subscription details have changed.+ name:+ type: string+ description: |+ The name of the stream whose subscription details have changed.+ property:+ type: string+ description: |+ The property of the subscription which has changed. See+ [/users/me/subscriptions/properties GET](/api/update-subscription-settings)+ for details on the various properties of a stream.++ Clients should generally handle an unknown property received here without+ crashing, since that will naturally happen when connecting to a Zulip+ server running a new version that adds a new subscription property.+ value:+ description: |+ The new value of the changed property.+ oneOf:+ - type: integer+ - type: boolean+ - type: string+ email:+ type: string+ deprecated: true+ description: |+ The display email for the current user.++ **Deprecated** and to be removed as it+ serves no purpose to include this field here.+ additionalProperties: false+ example:+ {+ "op": "update",+ "type": "subscription",+ "property": "pin_to_top",+ "value": true,+ "email": "[email protected]",+ "stream_id": 11,+ "name": "test_stream",+ "id": 0,+ }- type: objectdescription: |Event sent to other users when a user has been subscribed to a@@ -536,11 +598,11 @@ paths:stream_id:type: integerdescription: |- The id of the stream to which the user has subscribed.+ The ID of the stream to which the user has subscribed.user_id:type: integerdescription: |- The id of the user who subscribed.+ The ID of the user who subscribed.additionalProperties: falseexample:{@@ -569,12 +631,12 @@ paths:stream_id:type: integerdescription: |- The id of the stream from which the user has been+ The ID of the stream from which the user has beenunsubscribed from.user_id:type: integerdescription: |- The id of the user who has been unsubscribed.+ The ID of the user who has been unsubscribed.additionalProperties: falseexample:{@@ -780,7 +842,7 @@ paths:user_id:type: integerdescription: |- The id of the deactivated user.+ The ID of the deactivated user.full_name:type: stringdeprecated: true@@ -814,7 +876,7 @@ paths:user_id:type: integerdescription: |- The id of modified user.+ The ID of modified user.email:type: stringdescription: |@@ -900,6 +962,7 @@ paths:type: stringenum:- add+ - createstreams:type: arraydescription: |@@ -997,7 +1060,7 @@ paths:op:type: stringenum:- - vacant+ - vacatestreams:type: arraydescription: |@@ -1090,7 +1153,7 @@ paths:stream_id:type: integerdescription: |- The id of the stream whose details have changed.+ The ID of the stream whose details have changed.name:type: stringdescription: |@@ -1148,6 +1211,7 @@ paths:"id": 0,}- type: object+ additionalProperties: falsedescription: |Event sent when a reaction is added to a message.Sent to all users who were recipients of the message.@@ -1167,7 +1231,7 @@ paths:message_id:type: integerdescription: |- The id of the message to which a reaction was+ The ID of the message to which a reaction wasadded.- example:{@@ -1187,6 +1251,7 @@ paths:"id": 0,}- type: object+ additionalProperties: falsedescription: |Event sent when a reaction is removed from a message.Sent to all users who were recipients of the message.@@ -1206,25 +1271,1557 @@ paths:message_id:type: integerdescription: |- The id of the message from which the reaction was- removed.- - example:+ The ID of the message from which the reaction was+ removed.+ - example:+ {+ "type": "reaction",+ "op": "remove",+ "user_id": 10,+ "user":+ {+ "user_id": 10,+ "email": "[email protected]",+ "full_name": "King Hamlet",+ },+ "message_id": 52,+ "emoji_name": "tada",+ "emoji_code": "1f389",+ "reaction_type": "unicode_emoji",+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to a user's clients when the user uploads a new file+ in a Zulip message. Useful to implement live update in UI showing all files+ the current user has uploaded.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - attachment+ op:+ type: string+ enum:+ - add+ attachment:+ $ref: "#/components/schemas/Attachments"+ upload_space_used:+ type: integer+ description: |+ The total size of all files uploaded by in the organization,+ in bytes.+ example:+ {+ "type": "attachment",+ "op": "add",+ "attachment":+ {+ "id": 1,+ "name": "zulip.txt",+ "path_id": "2\/ce\/2Xpnnwgh8JWKxBXtTfD6BHKV\/zulip.txt",+ "size": 6,+ "create_time": 1594825414000,+ "messages": [],+ },+ "upload_space_used": 6,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent sent to a user's clients when details of a file that user+ uploaded are changed. Most updates will be changes in the list of+ messages that reference the uploaded file.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - attachment+ op:+ type: string+ enum:+ - update+ attachment:+ $ref: "#/components/schemas/Attachments"+ upload_space_used:+ type: integer+ description: |+ The total size of all files uploaded by in the organization,+ in bytes.+ example:+ {+ "type": "attachment",+ "op": "update",+ "attachment":+ {+ "id": 1,+ "name": "zulip.txt",+ "path_id": "2\/ce\/2Xpnnwgh8JWKxBXtTfD6BHKV\/zulip.txt",+ "size": 6,+ "create_time": 1594825414000,+ "messages": [],+ },+ "upload_space_used": 6,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to a user's clients when the user deletes a file+ they had uploaded. Useful primarily for UI showing all the files+ the current user has uploaded.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - attachment+ op:+ type: string+ enum:+ - remove+ attachment:+ type: object+ description: |+ Dictionary containing the id of the deleted attachment.+ properties:+ id:+ type: integer+ description: |+ The ID of the deleted attachment.+ upload_space_used:+ type: integer+ description: |+ The total size of all files uploaded by in the organization,+ in bytes.+ example:+ {+ "type": "attachment",+ "op": "remove",+ "attachment": {"id": 1},+ "upload_space_used": 0,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent when a submessage is added to a message.++ Submessages are an **experimental** API used for widgets such as the+ `/poll` widget in Zulip.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - submessage+ msg_type:+ type: string+ description: |+ The type of the message.+ content:+ type: string+ description: |+ The new content of the submessage.+ message_id:+ type: integer+ description: |+ The ID of the message to which the submessage has been added.+ sender_id:+ type: integer+ description: |+ The ID of the user who sent the message.+ submessage_id:+ type: integer+ description: |+ The ID of the submessage.+ example:+ {+ "type": "submessage",+ "msg_type": "widget",+ "message_id": 970461,+ "submessage_id": 4737,+ "sender_id": 58,+ "content": '{"type":"vote","key":"58,1","vote":1}',+ "id": 28,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the+ status of a user changes.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - user_status+ away:+ type: boolean+ description: |+ Whether the user has marked themself "away".+ status_text:+ type: string+ description: |+ The text content of the status message.+ user_id:+ type: integer+ description: |+ The ID of the user whose status changed.+ example:+ {+ "type": "user_status",+ "user_id": 10,+ "away": true,+ "status_text": "out to lunch",+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when new custom+ profile field types are configured for that Zulip organization.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - custom_profile_fields+ op:+ type: string+ enum:+ - add+ fields:+ type: array+ description: |+ An array of dictionaries where each dictionary contains+ details of a single new custom profile field for the Zulip+ organization.+ items:+ $ref: "#/components/schemas/CustomProfileField"+ example:+ {+ "type": "custom_profile_fields",+ "op": "add",+ "fields":+ [+ {+ "id": 1,+ "name": "Phone number",+ "type": 1,+ "hint": "",+ "field_data": "",+ "order": 1,+ },+ {+ "id": 2,+ "name": "Biography",+ "type": 2,+ "hint": "What are you known for?",+ "field_data": "",+ "order": 2,+ },+ {+ "id": 3,+ "name": "Favorite food",+ "type": 1,+ "hint": "Or drink, if you'd prefer",+ "field_data": "",+ "order": 3,+ },+ {+ "id": 4,+ "name": "Favorite editor",+ "type": 3,+ "hint": "",+ "field_data": '{"vim":{"text":"Vim","order":"1"},"emacs":{"text":"Emacs","order":"2"}}',+ "order": 4,+ },+ {+ "id": 5,+ "name": "Birthday",+ "type": 4,+ "hint": "",+ "field_data": "",+ "order": 5,+ },+ {+ "id": 6,+ "name": "Favorite website",+ "type": 5,+ "hint": "Or your personal blog's URL",+ "field_data": "",+ "order": 6,+ },+ {+ "id": 7,+ "name": "Mentor",+ "type": 6,+ "hint": "",+ "field_data": "",+ "order": 7,+ },+ {+ "id": 8,+ "name": "GitHub",+ "type": 7,+ "hint": "Enter your GitHub username",+ "field_data": '{"subtype":"github"}',+ "order": 8,+ },+ ],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when an organization+ administrator changes the organization's configured default stream groups.++ Default stream groups are an **experimental** feature that is not yet+ stabilized.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - default_stream_groups+ default_stream_groups:+ type: array+ description: |+ An array of dictionaries where each dictionary+ contains details about a single default stream group.+ items:+ type: object+ description: |+ Dictionary containing details of a default stream+ group.+ properties:+ name:+ type: string+ description: |+ Name of the default stream group.+ description:+ type: string+ description: |+ Description of the default stream group.+ id:+ type: integer+ description: |+ id of the default stream group.+ streams:+ type: array+ description: |+ Array containing details about the streams+ in the default stream group.+ items:+ $ref: "#/components/schemas/BasicStream"+ example:+ {+ "type": "default_stream_groups",+ "default_stream_groups":+ [+ {+ "name": "group1",+ "id": 2,+ "description": "New description",+ "streams":+ [+ {+ "name": "Scotland",+ "stream_id": 3,+ "description": "Located in the United Kingdom",+ "rendered_description": "<p>Located in the United Kingdom<\/p>",+ "invite_only": false,+ "is_web_public": false,+ "stream_post_policy": 1,+ "history_public_to_subscribers": true,+ "first_message_id": 1,+ "message_retention_days": null,+ "is_announcement_only": false,+ },+ {+ "name": "Denmark",+ "stream_id": 1,+ "description": "A Scandinavian country",+ "rendered_description": "<p>A Scandinavian country<\/p>",+ "invite_only": false,+ "is_web_public": false,+ "stream_post_policy": 1,+ "history_public_to_subscribers": true,+ "first_message_id": 4,+ "message_retention_days": null,+ "is_announcement_only": false,+ },+ {+ "name": "Verona",+ "stream_id": 5,+ "description": "A city in Italy",+ "rendered_description": "<p>A city in Italy<\/p>",+ "invite_only": false,+ "is_web_public": false,+ "stream_post_policy": 1,+ "history_public_to_subscribers": true,+ "first_message_id": 6,+ "message_retention_days": null,+ "is_announcement_only": false,+ },+ ],+ },+ ],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the+ default streams in the organization are changed by an+ organization administrator.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - default_streams+ default_streams:+ type: array+ description: |+ An array of dictionaries where each dictionary+ contains details about a single default stream.+ items:+ $ref: "#/components/schemas/BasicStream"+ example:+ {+ "type": "default_streams",+ "default_streams":+ [+ {+ "name": "Scotland",+ "stream_id": 3,+ "description": "Located in the United Kingdom",+ "rendered_description": "<p>Located in the United Kingdom<\/p>",+ "invite_only": false,+ "is_web_public": false,+ "stream_post_policy": 1,+ "history_public_to_subscribers": true,+ "first_message_id": 1,+ "message_retention_days": null,+ "is_announcement_only": false,+ },+ ],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent when a message has been deleted.+ Sent to all users who received the message.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - delete_message+ message_ids:+ type: array+ description: |+ The `message_ids` property will be present for clients that support+ the `bulk_message_deletion` client capability.++ An containing the IDs of the newly deleted messages.+ items:+ type: integer+ message_id:+ type: integer+ description: |+ The `message_id` property will be present for clients that do not support+ the `bulk_message_deletion` client capability.++ The ID of the newly deleted message.+ message_type:+ type: string+ description: |+ The type of message. Either 'stream' or 'private'. The other keys+ present in the event, necessary to update various frontend data structures+ that might be tracking the message, depend on the message type.+ recipient_id:+ type: integer+ description: |+ Only present for private messages.++ The ID of the user (or group of users) who received the private message.+ sender_id:+ type: integer+ description: |+ Only present for private messages.++ The ID of the user who sent the private message.+ stream_id:+ type: integer+ description: |+ Only present for stream messages.++ The ID of the stream to which the message was sent.+ topic:+ type: string+ description: |+ Only present for stream messages.++ The topic to which the message was sent.+ example:+ {+ "type": "delete_message",+ "recipient_id": 10,+ "sender_id": 8,+ "message_type": "private",+ "message_id": 37,+ "id": 0,+ }+ - type: object+ description: |+ Event sent to a user's clients when that user's set of+ configured muted topics have changed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - muted_topics+ muted_topics:+ type: array+ description: |+ Array of tuples, where each tuple describes a muted topic.+ The first element of tuple is the stream name in which the topic+ has to be muted, the second element is the topic name to be muted+ and the third element is an integer UNIX timestamp representing+ when the topic was muted.+ items:+ type: array+ items:+ oneOf:+ - type: string+ - type: integer+ additionalProperties: false+ example:+ {+ "type": "muted_topics",+ "muted_topics":+ [["Denmark", "topic", 1594825442]],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent when the set of onboarding "hotspots" to show for+ the current user have changed (E.g. because the user dismissed one).++ Clients that feature a similar tutorial experience to the Zulip+ webapp may want to handle these events.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - hotspots+ hotspots:+ type: array+ description: |+ An array of dictionaries where each+ dictionary contains details about a single hotspot.+ items:+ $ref: "#/components/schemas/Hotspot"+ example:+ {+ "type": "hotspots",+ "hotspots":+ [+ {+ "name": "intro_streams",+ "title": "Catch up on a stream",+ "description": "Messages sent to a stream are seen by everyone subscribed to that stream. Try clicking on one of the stream links below.",+ "delay": 0.5,+ },+ ],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent when a message has been edited.+ Sent to all users who had received the original+ message.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - update_message+ user_id:+ type: integer+ description: |+ The ID of the user who sent the message.+ message_id:+ type: integer+ description: |+ The ID of the message which was edited.+ edit_timestamp:+ type: integer+ description: |+ The timestamp when the message was edited.+ stream_name:+ type: string+ description: |+ Only present if the message was originally sent to a stream.++ The name of the stream that the message was sent to.+ stream_id:+ type: integer+ description: |+ Only present if the message was originally sent to a stream.++ The ID of the stream that the message was sent to.+ new_stream_id:+ type: integer+ description: |+ Note: Only present if message(s) were moved to a different stream.++ The ID of the stream that the message was moved to.+ orig_content:+ type: string+ description: |+ The original markdown content of the message, before this edit.+ orig_rendered_content:+ type: string+ description: |+ The original content of the message, before this edit, rendered as HTML.+ prev_rendered_content_version:+ type: integer+ description: |+ The markdown processor version number for the pre-edit message.+ content:+ type: string+ description: |+ The new content of the message, in the original markdown.+ rendered_content:+ type: string+ description: |+ The new content of the message, rendered in HTML.+ is_me_message:+ type: boolean+ description: |+ Whether the message is now a [/me status message][status-messages].+ propagate_mode:+ type: string+ description: |+ Which message(s) should be edited: just the one indicated in+ `message_id`, messages in the same topic that had been sent after this+ one, or all of them.+ enum:+ - change_one+ - change_later+ - change_all+ orig_subject:+ type: string+ description: |+ The original topic of the message. Only present if the topic of the message+ was changed.+ subject:+ type: string+ description: |+ The current topic of the message following the edit.+ topic_links:+ type: array+ items:+ type: string+ description: |+ Data on any links to be included in the `topic`+ line (these are generated by [custom linkification+ filters][linkification-filters] that match content in the+ message's topic.)++ **Changes**: New in Zulip 3.0 (feature level 1).+ Previously, this field was called `subject_links`;+ clients are recommended to rename `subject_links`+ to `topic_links` if present for compatibility with+ older Zulip servers.+ message_ids:+ type: array+ items:+ type: integer+ description: |+ For edits changing the stream or topic of multiple messages,+ the list of IDs of other messages to be moved as well.++ The messages are guaranteed to have all been previously in the+ sam stream and topic.+ flags:+ type: array+ description: |+ The user's personal [message flags][message-flags] for the message+ following the edit. The client should compare these to the original+ flags to identify cases where a mention was added by the edit.+ items:+ type: string+ example:+ {+ "type": "update_message",+ "user_id": 10,+ "edit_timestamp": 1594825451,+ "message_id": 58,+ "stream_name": "Verona",+ "orig_content": "hello",+ "orig_rendered_content": "<p>hello<\/p>",+ "content": "new content",+ "rendered_content": "<p>new content<\/p>",+ "prev_rendered_content_version": 1,+ "is_me_message": false,+ "propagate_mode": "change_all",+ "stream_id": 5,+ "orig_subject": "test",+ "subject": "new_topic",+ "topic_links": [],+ "message_ids": [58, 57],+ "flags": [],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent when a user starts typing a private or group private message. Sent+ to all clients for users who would receive the message being typed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - typing+ op:+ type: string+ enum:+ - start+ sender:+ additionalProperties: false+ type: object+ description: |+ Object containing user id and email of the sender i.e+ the user who has started typing.+ properties:+ user_id:+ type: integer+ description: |+ The ID of the user.+ email:+ type: string+ description: |+ The Zulip display email address for the user.+ recipients:+ type: array+ description: |+ Array of dictionaries, where each dictionary contains the+ email and user_id of a single user who will receive the+ typed message.+ items:+ type: object+ additionalProperties: false+ description: |+ Object containing the user id and email of a recipient.+ properties:+ user_id:+ type: integer+ description: |+ The ID of the user.+ email:+ type: string+ description: |+ The Zulip display email address for the user.+ example:+ {+ "type": "typing",+ "op": "start",+ "sender":+ {+ "user_id": 10,+ "email": "[email protected]",+ },+ "recipients":+ [+ {+ "user_id": 8,+ "email": "[email protected]",+ },+ {+ "user_id": 10,+ "email": "[email protected]",+ },+ ],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to a user when [message flags][message-flags] are added+ to a message.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - update_message_flags+ operation:+ description: |+ Whether the flags are added or rmeoved.+ type: string+ enum:+ - add+ flag:+ type: string+ description: |+ The flag that was added.+ messages:+ type: array+ description: |+ Array containing the ids of all messages to which+ the flag was added.+ items:+ type: integer+ all:+ type: boolean+ description: |+ Whether the flag was added to all messages (E.g. all messages+ were marked as read).+ If this is true, then the `messages` array will be empty.+ example:+ {+ "type": "update_message_flags",+ "operation": "add",+ "flag": "starred",+ "messages": [63],+ "all": false,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to a user when [message flags][message-flags] are+ removed from a message.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - update_message_flags+ operation:+ type: string+ description: |+ Whether the flags are added or rmeoved.+ enum:+ - remove+ flag:+ type: string+ description: |+ The flag to be removed.+ messages:+ type: array+ description: |+ Array containing the IDs of the messages from which the flag+ was removed.+ items:+ type: integer+ all:+ type: boolean+ description: |+ Whether the flag was removed from all messages.+ If this is true then the `messages` array will be empty.+ example:+ {+ "type": "update_message_flags",+ "operation": "remove",+ "flag": "starred",+ "messages": [63],+ "all": false,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to users in an organization when a [user group](/help/user-groups) is created.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - user_group+ op:+ type: string+ enum:+ - add+ group:+ type: object+ additionalProperties: false+ description: |+ Dictionary containing details of the new user group.+ properties:+ name:+ type: string+ description: |+ The name of the user group.+ description:+ type: string+ description: |+ The description of the user group.+ members:+ type: array+ items:+ type: integer+ description: |+ Array containing the id of the users who are+ members of this user group.+ id:+ type: integer+ description: |+ The ID of the user group.+ example:+ {+ "type": "user_group",+ "op": "add",+ "group":+ {+ "name": "backend",+ "members": [12],+ "description": "Backend team",+ "id": 2,+ },+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization+ when a propety of a user group is changed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - user_group+ op:+ type: string+ enum:+ - update+ group_id:+ type: integer+ description: |+ The ID of the user group whose details have changed.+ data:+ type: object+ additionalProperties: false+ description: |+ Dictionary containing the changed details of the user group.+ properties:+ name:+ type: string+ description: |+ The new name of the user group. Only present if the group's name changed.+ description:+ type: string+ description: |+ The new description of the group. Only present if the description+ changed.+ example:+ {+ "type": "user_group",+ "op": "update",+ "group_id": 2,+ "data":+ {+ "description": "Mention this group to get the security team's attention.",+ },+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users when users have been added to a user group.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - user_group+ op:+ type: string+ enum:+ - add_members+ group_id:+ type: integer+ description: |+ The ID of the user group with new members.+ user_ids:+ type: array+ items:+ type: integer+ description: |+ Array containing the IDs of the users who have been added+ to the user group.+ example:+ {+ "type": "user_group",+ "op": "add_members",+ "group_id": 2,+ "user_ids": [10],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users when users have been removed from+ a user group.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - user_group+ op:+ type: string+ enum:+ - remove_members+ group_id:+ type: integer+ description: |+ The ID of the user group whose details have changed.+ user_ids:+ type: array+ items:+ type: integer+ description: |+ Array containing the IDs of the users who have been removed+ from the user group.+ example:+ {+ "type": "user_group",+ "op": "remove_members",+ "group_id": 2,+ "user_ids": [10],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users when a user group has been deleted.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - user_group+ op:+ type: string+ enum:+ - remove+ group_id:+ type: integer+ description: |+ The ID of the group which has been deleted.+ example:+ {+ "type": "user_group",+ "op": "remove",+ "group_id": 2,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the+ set of configured [Linkifiers](/help/add-a-custom-linkification-filter)+ for the organization has changed.++ Processing this event is important to doing markdown local echo+ correctly.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_filters+ realm_filters:+ type: array+ items:+ type: array+ items:+ oneOf:+ - type: integer+ - type: string+ description: |+ An array of tuples, where each tuple describes a linkifier.+ The first element of the tuple is a+ string regex pattern which represents the pattern that should+ be linkified on matching. The second element is the url with which the+ pattern matching string should be linkified with and the third element+ is the ID of the realm filter.+ example:+ {+ "type": "realm_filters",+ "realm_filters":+ [+ [+ "#(?P<id>[123])",+ "https:\/\/realm.com\/my_realm_filter\/%(id)s",+ 1,+ ],+ ],+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when+ a [custom emoji](/help/add-custom-emoji) has been updated,+ typically when it has been deactivated.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_emoji+ op:+ type: string+ enum:+ - update+ realm_emoji:+ type: object+ description: |+ An object in which each key describes a realm emoji.+ additionalProperties:+ $ref: "#/components/schemas/RealmEmoji"+ example:+ {+ "type": "realm_emoji",+ "op": "update",+ "realm_emoji":+ {+ "2":+ {+ "id": "2",+ "name": "my_emoji",+ "source_url": "\/user_avatars\/2\/emoji\/images\/2.png",+ "deactivated": true,+ "author_id": 11,+ },+ "1":+ {+ "id": "1",+ "name": "green_tick",+ "source_url": "\/user_avatars\/2\/emoji\/images\/1.png",+ "deactivated": false,+ "author_id": 11,+ },+ },+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the set of+ [allowed domains for new users](/help/allow-anyone-to-join-without-an-invitation)+ has changed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_domains+ op:+ type: string+ enum:+ - add+ realm_domain:+ type: object+ additionalProperties: false+ description: |+ Object containing details of the newly added domain.+ properties:+ domain:+ type: string+ description: |+ The new allowed domain.+ allow_subdomains:+ type: boolean+ description: |+ Whether subdomains are allowed for this domain.+ example:+ {+ "type": "realm_domains",+ "op": "add",+ "realm_domain":+ {+ "domain": "zulip.org",+ "allow_subdomains": false,+ },+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the set of+ [allowed domains for new users](/help/allow-anyone-to-join-without-an-invitation)+ has changed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_domains+ op:+ type: string+ enum:+ - change+ realm_domain:+ type: object+ additionalProperties: false+ description: |+ Object containing details of the edited domain.+ properties:+ domain:+ type: string+ description: |+ The domain whose settings have changed.+ allow_subdomains:+ type: boolean+ description: |+ Whether subdomains are allowed for this domain.+ example:+ {+ "type": "realm_domains",+ "op": "change",+ "realm_domain":+ {+ "domain": "zulip.org",+ "allow_subdomains": true,+ },+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the set of+ [allowed domains for new users](/help/allow-anyone-to-join-without-an-invitation)+ has changed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_domains+ op:+ type: string+ enum:+ - remove+ domain:+ type: string+ description: |+ The domain to be removed.+ example:+ {+ "type": "realm_domains",+ "op": "remove",+ "domain": "zulip.org",+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to the user who requested a [data export](/help/export-your-organization)+ when the status of the export changes.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_export+ exports:+ type: array+ description: |+ An array of dictionaries where each dictionary contains+ data about a single organization export request.+ items:+ $ref: "#/components/schemas/RealmExport"+ example:+ {+ "type": "realm_export",+ "exports":+ [+ {+ "id": 107,+ "export_time": 1594825443.6567969322,+ "acting_user_id": 10,+ "export_url": null,+ "deleted_timestamp": null,+ "failed_timestamp": 1594825444.4363360405,+ "pending": false,+ },+ ],+ "id": 1,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to users who can administer a newly created bot+ user. Clients will also receive a `realm_user` event that+ contains basic details (but not the API key).++ The `realm_user` events are sufficient for clients that+ only need to interact with the bot; this `realm_bot` event+ type is relevant only for administering bots.++ Only organization administrators and the user who owns the bot will+ receive this event.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_bot+ op:+ type: string+ enum:+ - add+ bot:+ $ref: "#/components/schemas/Bot"+ example:+ {+ "type": "realm_bot",+ "op": "add",+ "bot":+ {+ "email": "[email protected]",+ "user_id": 36,+ "full_name": "Foo Bot",+ "bot_type": 1,+ "is_active": true,+ "api_key": "6hc6MC9mpNFvoo0gSOWnZEq4aJEn8UNK",+ "default_sending_stream": null,+ "default_events_register_stream": null,+ "default_all_public_streams": false,+ "avatar_url": "https:\/\/secure.gravatar.com\/avatar\/af8abc2537d283b212a6bd4d1289956d?d=identicon&version=1",+ "services": [],+ "owner_id": 10,+ },+ "id": 1,+ }+ - type: object+ description: |+ Event sent to users who can administer a bot user when the bot is+ configured. Clients may also receive a `realm_user` event that+ for changes in public data about the bot (name, etc.).++ The `realm_user` events are sufficient for clients that+ only need to interact with the bot; this `realm_bot` event+ type is relevant only for administering bots.++ Only organization administrators and the user who owns the bot will+ receive this event.+ additionalProperties: false+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_bot+ op:+ type: string+ enum:+ - update+ bot:+ type: object+ description: |+ Object containing details about the changed bot.+ It contains two properties: the user id of the bot and+ the property to be changed. The changed property is one+ of the properties of bot which can be seen in the `bot`+ `add` event.+ properties:+ user_id:+ type: integer+ description: |+ The user ID of the modified bot.+ example:+ {+ "type": "realm_bot",+ "op": "update",+ "bot":+ {+ "user_id": 37,+ "services":+ [+ {+ "base_url": "http:\/\/hostname.domain2.com",+ "interface": 2,+ "token": "grr8I2APXRmVL0FRTMRYAE4DRPQ5Wlaw",+ },+ ],+ },+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users when a bot has been deactivated.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm_bot+ op:+ type: string+ enum:+ - remove+ - delete+ bot:+ type: object+ description: |+ Object containing details about the deactivated bot.+ properties:+ user_id:+ type: integer+ description: |+ The user ID of the deactivated bot.+ full_name:+ type: string+ description: |+ The full name of the deactivated bot.+ example:+ {+ "type": "realm_bot",+ "op": "remove",+ "bot":+ {"user_id": 35, "full_name": "Foo Bot"},+ "id": 1,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the+ configuration of the organization (realm) has changed.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm+ op:+ type: string+ enum:+ - update+ property:+ type: string+ description: |+ The name of the property that was changed.+ value:+ description: |+ The new value of the property.+ oneOf:+ - type: string+ - type: boolean+ - type: integer+ extra_data:+ description: |+ Object containing extra data related to the changed+ property.+ type: object+ additionalProperties: false+ properties:+ upload_quota:+ type: integer+ description: |+ Note: Only present if changed property is `plan_type`.++ The new upload quota for the Zulip organization.+ example:+ {+ "type": "realm",+ "op": "update",+ "property": "disallow_disposable_email_addresses",+ "value": false,+ "id": 0,+ }+ - type: object+ additionalProperties: false+ description: |+ Event sent to all users in a Zulip organization when the+ configuration of the organization (realm) has changed.++ Unlike realm / update, supports multiple properties being changed+ in a single event.+ properties:+ id:+ type: integer+ type:+ type: string+ enum:+ - realm+ op:+ type: string+ enum:+ - update_dict+ property:+ type: string+ description: |+ Always `"default"`. Present for backwards-compatibility with older+ clients that predate the `update_dict` event style.+ data:+ type: object+ description: |+ An object containing the properties that have changed.+ example:+ {+ "type": "realm",+ "op": "update_dict",+ "property": "default",+ "data":{- "type": "reaction",- "op": "remove",- "user_id": 10,- "user":- {- "user_id": 10,- "email": "[email protected]",- "full_name": "King Hamlet",- },- "message_id": 52,- "emoji_name": "tada",- "emoji_code": "1f389",- "reaction_type": "unicode_emoji",- "id": 0,- }+ "allow_message_editing": false,+ "message_content_edit_limit_seconds": 0,+ "allow_community_topic_editing": false,+ },+ "id": 0,+ }queue_id:type: stringdescription: |@@ -1440,62 +3037,7 @@ paths:A list of `attachment` objects, each containingdetails about a file uploaded by the user.items:- type: object- additionalProperties: false- properties:- id:- type: integer- description: |- The unique ID for the attachment.- name:- type: string- description: |- Name of the uploaded file.- path_id:- type: string- description: |- A representation of the path of the file within the- repository of user-uploaded files. If the `path_id` of a- file is `{realm_id}/ab/cdef/temp_file.py`, its URL will be:- `{server_url}/user_uploads/{realm_id}/ab/cdef/temp_file.py`.- size:- type: integer- description: |- Size of the file in bytes.- create_time:- type: integer- description: |- Time when the attachment was uploaded as a UNIX timestamp- multiplied by 1000 (matching the format of getTime() in JavaScript).-- **Changes**: Changed in Zulip 2.2 (feature level 22). This field was- previously a floating point number.- messages:- type: array- description: |- Contains basic details on any Zulip messages that have been- sent referencing this [uploaded file](/api/upload-file).- This includes messages sent by any user in the Zulip- organization who sent a message containing a link to the- uploaded file.- items:- type: object- additionalProperties: false- properties:- date_sent:- type: integer- description: |- Time when the message was sent as a UNIX timestamp- multiplied by 1000 (matching the format of getTime() in JavaScript).-- **Changes**: Changed in Zulip 2.2 (feature level 22). This- field was previously strangely called `name` and was a floating- point number.- id:- type: integer- description: |- The unique message ID. Messages should always be- displayed sorted by ID.+ $ref: "#/components/schemas/Attachments"upload_space_used:type: integerdescription: |@@ -3464,39 +5006,7 @@ paths:An object that contains `emoji` objects, each identified with theiremoji ID as the key.additionalProperties:- type: object- additionalProperties: false- description: |- `{emoji_id}`: Object containing details about the emoji with- the specified ID. It has the following properties:- properties:- id:- type: string- description: |- The ID for this emoji, same as the object's key.- name:- type: string- description: |- The user-friendly name for this emoji. Users in the organization- can use this emoji by writing this name between colons (`:name :`).- source_url:- type: string- description: |- The path relative to the organization's URL where the- emoji's image can be found.- deactivated:- type: boolean- description: |- Whether the emoji has been deactivated or not.- author_id:- type: integer- nullable: true- description: |- The user ID of the user who uploaded the custom emoji.- Will be null if the uploader is unknown.-- **Changes**: New in Zulip 3.0 (feature level 7). Previously- was accessible via and `author` object with an `id` field.+ $ref: "#/components/schemas/RealmEmoji"- example:{"result": "success",@@ -5186,6 +6696,65 @@ components:`/fetch_api_key` or `/dev_fetch_api_key` endpoints.schemas:+ Attachments:+ type: object+ description: |+ Dictionary containing details of a file uploaded by a user.+ additionalProperties: false+ properties:+ id:+ type: integer+ description: |+ The unique ID for the attachment.+ name:+ type: string+ description: |+ Name of the uploaded file.+ path_id:+ type: string+ description: |+ A representation of the path of the file within the+ repository of user-uploaded files. If the `path_id` of a+ file is `{realm_id}/ab/cdef/temp_file.py`, its URL will be:+ `{server_url}/user_uploads/{realm_id}/ab/cdef/temp_file.py`.+ size:+ type: integer+ description: |+ Size of the file in bytes.+ create_time:+ type: integer+ description: |+ Time when the attachment was uploaded as a UNIX timestamp+ multiplied by 1000 (matching the format of getTime() in JavaScript).++ **Changes**: Changed in Zulip 2.2 (feature level 22). This field was+ previously a floating point number.+ messages:+ type: array+ description: |+ Contains basic details on any Zulip messages that have been+ sent referencing this [uploaded file](/api/upload-file).+ This includes messages sent by any user in the Zulip+ organization who sent a message containing a link to the+ uploaded file.+ items:+ type: object+ additionalProperties: false+ properties:+ date_sent:+ type: integer+ description: |+ Time when the message was sent as a UNIX timestamp+ multiplied by 1000 (matching the format of getTime() in JavaScript).++ **Changes**: Changed in Zulip 2.2 (feature level 22). This+ field was previously strangely called `name` and was a floating+ point number.+ id:+ type: integer+ description: |+ The unique message ID. Messages should always be+ displayed sorted by ID.BasicStream:type: objectdescription: |@@ -5284,6 +6853,199 @@ components:**Changes**: Deprecated in Zulip 3.0 (feature level 1), use`stream_post_policy` instead.+ Bot:+ type: object+ additionalProperties: false+ description: |+ Object containing details of a bot.+ properties:+ email:+ type: string+ description: |+ The email of the bot.+ user_id:+ type: integer+ description: |+ The user id of the bot.+ full_name:+ type: string+ description: |+ The full name of the bot.+ bot_type:+ type: integer+ nullable: true+ description: |+ An integer describing the type of bot:+ * `1` for a `Generic` bot.+ * `2` for an `Incoming webhook` bot.+ * `3` for an `Outgoing webhook` bot.+ * `4` for an `Embedded` bot.+ is_active:+ type: boolean+ description: |+ A boolean describing whether the user account has been deactivated.+ api_key:+ type: string+ description: |+ The API key of the bot which it uses to make API requests.+ default_sending_stream:+ type: string+ nullable: true+ description: |+ The default sending stream of the bot. Null if the bot doesn't+ have a default sending stream.+ default_events_register_stream:+ type: string+ nullable: true+ description: |+ The default stream for which the bot receives events/register data. Null if+ the bot doesn't have such a default stream.+ default_all_public_streams:+ type: boolean+ description: |+ Whether the bot can send messages to all streams by default.+ avatar_url:+ type: string+ description: |+ The URL of the bot's avatar.+ owner_id:+ type: integer+ description: |+ The user id of the bot's owner.+ services:+ type: array+ description: |+ The services provided by the bot. Empty except for Outgoing webhook+ and Embedded bots.+ items:+ type: object+ CustomProfileField:+ type: object+ additionalProperties: false+ description: |+ Dictionary containing details of a single custom profile field.+ properties:+ id:+ type: integer+ description: |+ The id of the custom profile field.+ type:+ type: integer+ description: |+ The type of the custom profile field.+ order:+ type: integer+ description: |+ The order of the custom profile field.+ name:+ type: string+ description: |+ The name of the custom profile field.+ hint:+ type: string+ description: |+ A hint regarding the custom profile field.+ For example, 'What are you known for?'.+ field_data:+ type: string+ description: |+ The data related to the custom profile field.+ Hotspot:+ type: object+ additionalProperties: false+ description: |+ Dictionary containing details of a single hotspot.+ properties:+ delay:+ type: number+ description: |+ The delay after which the user should be shown the hotspot.+ name:+ type: string+ description: |+ The name of the hotspot.+ title:+ type: string+ description: |+ The title of the hotspot, as will be displayed to the user.+ description:+ type: string+ description: |+ The description of the hotspot, as will be displayed to the+ user.+ RealmEmoji:+ type: object+ additionalProperties: false+ description: |+ `{emoji_id}`: Object containing details about the emoji with+ the specified ID. It has the following properties:+ properties:+ id:+ type: string+ description: |+ The ID for this emoji, same as the object's key.+ name:+ type: string+ description: |+ The user-friendly name for this emoji. Users in the organization+ can use this emoji by writing this name between colons (`:name :`).+ source_url:+ type: string+ description: |+ The path relative to the organization's URL where the+ emoji's image can be found.+ deactivated:+ type: boolean+ description: |+ Whether the emoji has been deactivated or not.+ author_id:+ type: integer+ nullable: true+ description: |+ The user ID of the user who uploaded the custom emoji.+ Will be null if the uploader is unknown.++ **Changes**: New in Zulip 3.0 (feature level 7). Previously+ was accessible via and `author` object with an `id` field.+ RealmExport:+ type: object+ additionalProperties: false+ description: |+ Object containing details about a realm export.+ properties:+ id:+ type: integer+ description: |+ The id of the export.+ acting_user_id:+ type: integer+ description: |+ The id of the user who did the export.+ export_time:+ type: number+ description: |+ The UNIX timestamp of when the export was made.+ deleted_timestamp:+ type: number+ nullable: true+ description: |+ The timestamp of when the export was deleted.+ Null if it wasn't.+ failed_timestamp:+ type: number+ nullable: true+ description: |+ The timestamp of when the export failed.+ Null if it didn't.+ export_url:+ type: string+ nullable: true+ description: |+ The url of the export. Null if there's no url.+ pending:+ type: boolean+ description: |+ Whether the export is pending or not.Subscriptions:type: objectadditionalProperties: false