Register an event queue

POST https://team.webramz.com/api/v1/register

This powerful endpoint can be used to register a Zulip "event queue" (subscribed to certain types of "events", or updates to the messages and other Zulip data the current user has access to), as well as to fetch the current state of that data.

(register also powers the call_on_each_event Python API, and is intended primarily for complex applications for which the more convenient call_on_each_event API is insufficient).

This endpoint returns a queue_id and a last_event_id; these can be used in subsequent calls to the "events" endpoint to request events from the Zulip server using long-polling.

The server will queue events for up to 10 minutes of inactivity. After 10 minutes, your event queue will be garbage-collected. The server will send heartbeat events every minute, which makes it easy to implement a robust client that does not miss events unless the client loses network connectivity with the Zulip server for 10 minutes or longer.

Once the server garbage-collects your event queue, the server will return an error with a code of BAD_EVENT_QUEUE_ID if you try to fetch events from the event queue. Your software will need to handle that error condition by re-initializing itself (e.g. this is what triggers your browser reloading the Zulip webapp when your laptop comes back online after being offline for more than 10 minutes).

When prototyping with this API, we recommend first calling register with no event_types parameter to see all the available data from all supported event types. Before using your client in production, you should set appropriate event_types and fetch_event_types filters so that your client only requests the data it needs. A few minutes doing this often saves 90% of the total bandwidth and other resources consumed by a client using this API.

See the events system developer documentation if you need deeper details about how the Zulip event queue system works, avoids clients needing to worry about large classes of potentially messy races, etc.

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Register the queue
result = client.register(
    event_types=["message", "realm_emoji"],
)
print(result)

More examples and documentation can be found here.

const zulipInit = require("zulip-js");

// Pass the path to your zuliprc file here.
const config = { zuliprc: "zuliprc" };

(async () => {
    const client = await zulipInit(config);

    // Register a queue
    const params = {
        event_types: ["message"],
    };

    console.log(await client.queues.register(params));
})();

curl -sSX POST https://team.webramz.com/api/v1/register \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode 'event_types=["message"]'

Parameters

apply_markdown boolean optional

Example: true

Set to true if you would like the content to be rendered in HTML format (otherwise the API will return the raw text that the user entered)

Defaults to false.


client_gravatar boolean optional

Example: true

Whether the client supports computing gravatars URLs. If enabled, avatar_url will be included in the response only if there is a Zulip avatar, and will be null for users who are using gravatar as their avatar. This option significantly reduces the compressed size of user data, since gravatar URLs are long, random strings and thus do not compress well. The client_gravatar field is set to true if clients can compute their own gravatars.

Defaults to false.


slim_presence boolean optional

Example: true

Setting this to true will make presence dictionaries be keyed by user_id instead of email.

Changes: New in Zulip 3.0 (Unstable with no feature level yet).

Defaults to false.


event_types (string)[] optional

Example: ["message"]

A JSON-encoded array indicating which types of events you're interested in. Values that you might find useful include:

  • message (messages)
  • subscription (changes in your subscriptions)
  • realm_user (changes to users in the organization and their properties, such as their name).

If you do not specify this parameter, you will receive all events, and have to filter out the events not relevant to your client in your client code. For most applications, one is only interested in messages, so one specifies: event_types=['message']

Event types not supported by the server are ignored, in order to simplify the implementation of client apps that support multiple server versions.


all_public_streams boolean optional

Example: true

Whether you would like to request message events from all public streams. Useful for workflow bots that you'd like to see all new messages sent to public streams. (You can also subscribe the user to private streams).

Defaults to false.


include_subscribers boolean optional

Example: true

Whether each returned stream object should include a subscribers field containing a list of the user IDs of its subscribers.

(This may be significantly slower in organizations with thousands of users subscribed to many streams.)

Changes: New in Zulip 2.1.0.

Defaults to false.


client_capabilities object optional

Example: {"notification_settings_null": true}

Dictionary containing details on features the client supports that are relevant to the format of responses sent by the server.

  • notification_settings_null: Boolean for whether the client can handle the current API with null values for stream-level notification settings (which means the stream is not customized and should inherit the user's global notification settings for stream messages). New in Zulip 2.1.0; in earlier Zulip releases, stream-level notification settings were simple booleans.

  • bulk_message_deletion: Boolean for whether the client's handler for the delete_message event type has been updated to process the new bulk format (with a message_ids, rather than a singleton message_id). Otherwise, the server will send delete_message events in a loop. New in Zulip 3.0 (feature level 13). This capability is for backwards-compatibility; it will be required in a future server release.

  • user_avatar_url_field_optional: Boolean for whether the client required avatar URLs for all users, or supports using GET /avatar/{user_id} to access user avatars. If the client has this capability, the server may skip sending a avatar_url field in the realm_user at its sole discretion to optimize network performance. This is an important optimization in organizations with 10,000s of users. New in Zulip 3.0 (feature level 18).

  • stream_typing_notifications: Boolean for whether the client supports stream typing notifications.

New in Zulip 4.0 (feature level 58). This capability is for backwards-compatibility; it will be required in a future server release.


fetch_event_types (string)[] optional

Example: ["message"]

Same as the event_types parameter except that the values in fetch_event_types are used to fetch initial data. If fetch_event_types is not provided, event_types is used and if event_types is not provided, this parameter defaults to None.

Event types not supported by the server are ignored, in order to simplify the implementation of client apps that support multiple server versions.


narrow ((string)[])[] optional

Example: [["stream", "Denmark"]]

A JSON-encoded array of arrays of length 2 indicating the narrow for which you'd like to receive events for. For instance, to receive events for the stream Denmark, you would specify narrow=[['stream', 'Denmark']]. Another example is narrow=[['is', 'private']] for private messages. Default is [].


Response

Return values

  • queue_id: string The ID of the queue that has been allocated for your client.

  • last_event_id: integer The initial value of last_event_id to pass to GET /api/v1/events.

  • zulip_feature_level: integer The server's current Zulip feature level.

  • zulip_version: string The server's version.

  • alert_words: (string)[] Present if alert_words is present in fetch_event_types.

    An array of strings, each an alert word that the current user has configured.

  • custom_profile_fields: (object)[] Present if custom_profile_fields is present in fetch_event_types.

    An array of dictionaries where each dictionary contains the details of a single custom profile field that is available to users in this Zulip organization. This must be combined with the custom profile field values on individual user objects to display users' full profiles.

    • id: integer The ID of the custom profile field. This will be referenced in custom the profile fields section of user objects.

    • type: integer An integer indicating the type of the custom profile field, which determines how it is configured and displayed to users.

      See the Add custom profile fields article for details on what each type means.

      • 1: Short text
      • 2: Long text
      • 3: List of options
      • 4: Date picker
      • 5: Link
      • 6: Person picker
      • 7: External account
    • order: integer Custom profile fields are displayed in both settings UI and UI showing users' profiles in increasing order.

    • name: string The name of the custom profile field.

    • hint: string The help text to be displayed for the custom profile field in user-facing settings UI for configuring custom profile fields.

    • field_data: string Field types 3 (List of options) and 7 (External account) support storing additional configuration for the field type in the field_data attribute.

      For field type 3 (List of options), this attribute is a JSON dictionary defining the choices and the order they will be displayed in the dropdown UI for individual users to select an option.

      The interface for field type 7 is not yet stabilized.

  • custom_profile_field_types: object Present if custom_profile_fields is present in fetch_event_types.

    An array of objects; each object describes a type of custom profile field that could be configured on this Zulip server. Each custom profile type has a id and the type property of a custom profile field is equal to one of these ids.

    This attribute is only useful for clients containing UI for changing the set of configured custom profile fields in a Zulip organization.

    • {FIELD_TYPE}: object Dictionary which contains the details of the field type with the field type as the name of the property itself. The current supported field types are as follows:

      • SHORT_TEXT
      • LONG_TEXT
      • DATE for date-based fields.
      • CHOICE for a list of options.
      • URL for links.
      • EXTERNAL_ACCOUNT for external accounts.
      • USER for selecting a user for the field.

      • id: integer The id of the custom profile field type.

      • name: string The name of the custom profile field type.

  • hotspots: (object)[] Present if hotspots is present in fetch_event_types.

    An array of dictionaries, where each dictionary contains details about a single onboarding hotspot that should be shown to new users.

    We expect that only official Zulip clients will interact with these data.

    • delay: number The delay after which the user should be shown the hotspot.

    • name: string The name of the hotspot.

    • title: string The title of the hotspot, as will be displayed to the user.

    • description: string The description of the hotspot, as will be displayed to the user.

  • max_message_id: integer Present if message is present in fetch_event_types.

    The highest message ID among all messages the user has received as of the moment of this request.

    Deprecated: This field may be removed in future versions as it no longer has a clear purpose. Clients wishing to fetch the latest messages should pass anchor="latest" to GET /messages.

  • max_stream_name_length: integer Present if realm is present in fetch_event_types.

    The maximum allowed length for a stream name. Clients should use these properties rather than hardcoding field sizes, as they may change in a future Zulip release.

    Changes: New in Zulip 4.0 (feature level 53). Previously, this required stream in fetch_event_types, was called stream_name_max_length, and always had value 60.

  • max_stream_description_length: integer Present if realm is present in fetch_event_types.

    The maximum allowed length for a stream description. Clients should use these properties rather than hardcoding field sizes, as they may change in a future Zulip release.

    Changes: New in Zulip 4.0 (feature level 53). Previously, this required stream in fetch_event_types, was called stream_description_max_length, and always had value 1024.

  • max_topic_length: integer Present if realm is present in fetch_event_types.

    The maximum allowed length for a topic. Clients should use these properties rather than hardcoding field sizes, as they may change in a future Zulip release.

    Changes: New in Zulip 4.0 (feature level 53). Previously, this always had value 60.

  • max_message_length: integer Present if realm is present in fetch_event_types.

    The maximum allowed length for a message. Clients should use these properties rather than hardcoding field sizes, as they may change in a future Zulip release.

    Changes: New in Zulip 4.0 (feature level 53). Previously, this always had value 10000.

  • muted_topics: ((string | integer)[])[] Present if muted_topics is present in fetch_event_types.

    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.

  • muted_users: (object)[] Present if muted_users is present in fetch_event_types.

    A list of dictionaries where each dictionary describes a muted user.

    Changes: New in Zulip 4.0 (feature level 48).

    • id: integer The ID of the muted user.

    • timestamp: integer An integer UNIX timestamp representing when the user was muted.

  • presences: object Present if presence is present in fetch_event_types.

    A dictionary where each entry describes the presence details for another user in the Zulip organization.

    Users who have been offline for multiple weeks may not appear in this object.

    • {user_id} or {user_email}: object Depending on the value of slim_presence. Each entry contains the details of the presence of the user with the specific id or email.
  • realm_domains: (object)[] Present if realm_domains is present in fetch_event_types.

    An array of dictionaries where each dictionary describes a domain within which users can join the organization without and invitation.

    • domain: string The new allowed domain.

    • allow_subdomains: boolean Whether subdomains are allowed for this domain.

  • realm_emoji: object | (integer)[] Present if realm_emoji is present in fetch_event_types.

    An array of dictionaries where each dictionary describes a custom emoji that has been uploaded in this Zulip organization.

  • realm_linkifiers: (object)[] Present if realm_linkifiers is present in fetch_event_types.

    Array of objects where each object describes a single linkifier.

    Changes: New in Zulip 4.0 (feature level 54). Clients can access these data on older server versions via the previous realm_filters key.

    • pattern: string The string regex pattern which represents the pattern that should be linkified on matching.

    • url_format: string The URL with which the pattern matching string should be linkified.

    • id: integer The ID of the linkifier.

  • realm_filters: ((integer | string)[])[] Legacy property for linkifiers. Present if realm_filters is present in fetch_event_types.

    An array of tuples (fixed-length arrays) where each tuple describes a single 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.

    Changes: Deprecated in Zulip 4.0 (feature level 54), replaced by the realm_linkifiers key instead.

  • realm_playgrounds: (object)[] Present if realm_playgrounds is present in fetch_event_types.

    An array of dictionaries where each dictionary describes a code playground configured for this Zulip organization.

    Changes: New in Zulip 4.0 (feature level 49).

    • id: integer The unique ID for the realm playground.

    • name: string The user-visible display name of the playground. Clients should display this in UI for picking which playground to open a code block in, to differentiate between multiple configured playground options for a given pygments language.

      Changes: New in Zulip 4.0 (feature level 49).

    • pygments_language: string The name of the Pygments language lexer for that programming language.

    • url_prefix: string The url prefix for the playground.

  • realm_user_groups: (object)[] Present if realm_user_groups is present in fetch_event_types.

    An array of dictionaries where each dictionary describes a user group in the Zulip organization.

    • name: string The name of the user group.

    • description: string The description of the user group.

    • members: (integer)[] Array containing the id of the users who are members of this user group.

    • id: integer The ID of the user group.

  • realm_bots: (object)[] Present if realm_bot is present in fetch_event_types.

    An array of dictionaries where each dictionary describes a bot that the current user can administer. If the current user is an organization administrator, this will include all bots in the organization. Otherwise, it will only include bots owned by the user (either because the user created the bot or an administrator transferred the bot's ownership to the user).

    • user_id: integer The user id of the bot.

    • full_name: string The full name of the bot.

    • api_key: string The API key of the bot which it uses to make API requests.

    • default_sending_stream: string The default sending stream of the bot. Null if the bot doesn't have a default sending stream.

    • default_events_register_stream: string 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: boolean Whether the bot can send messages to all streams by default.

    • avatar_url: string The URL of the bot's avatar.

    • owner_id: integer The user id of the bot's owner.

      Null if the bot has no owner.

    • services: (object | object)[] The "Services" array contains extra configuration fields only relevant for Outgoing webhook bots and Embedded bots. It is always a single-element array.

      We consider this part of the Zulip API to be unstable; it is used only for UI elements for administering bots and is likely to change.

    • email: string The email of the bot.

    • bot_type: integer 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: boolean A boolean describing whether the user account has been deactivated.

  • realm_embedded_bots: (object)[] Present if realm_embedded_bots is present in fetch_event_types.

    An array of dictionaries where each dictionary describes an type of embedded bot that is available to be configured on this Zulip server.

    Clients only need these data if they contain UI for creating or administering bots.

    • name: string The name of the bot.

    • config: object A "string: string" dictionary which describes the configuration for the embedded bot (usually details like API keys).

      • String describing the config data.
  • realm_incoming_webhook_bots: (object)[] Present if realm_incoming_webhook_bots is present in fetch_event_types.

    An array of dictionaries where each dictionary describes an type of incoming webhook integration that is available to be configured on this Zulip server.

    Clients only need these data if they contain UI for creating or administering bots.

    • name: string The name of the bot.

    • config: object A "string: string" dictionary which describes the configuration for the embedded bot (usually details like API keys).

      • String describing the config data.
  • recent_private_conversations: (object)[] Present if recent_private_conversations is present in fetch_event_types.

    An array of dictionaries containing data on all private message and group private message conversations that the user has received (or sent) messages in, organized by conversation. This data set is designed to support UI elements such as the "Private messages" widget in the web application showing recent private message conversations that the user has participated in.

    "Recent" is defined as the server's discretion; the original implementation interpreted that as "the 1000 most recent private messages the user received".

    • max_message_id: integer The highest message id of the conversation, intended to support sorting the conversations by recency.

    • user_ids: (integer)[] The list of users other than the current user in the private message conversation. This will be an empty list for private messages sent to oneself.

  • subscriptions: (object)[] Present if subscription is present in fetch_event_types.

    A array of dictionaries where each dictionary describes the properties of a stream the user is subscribed to (as well as that user's personal per-stream settings).

    • stream_id: integer The unique ID of a stream.

    • name: string The name of a stream.

    • description: string The short description of a stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

    • rendered_description: string A short description of a stream rendered as HTML, intended to be used when displaying the stream description in a UI.

      One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

      Changes: New in Zulip 4.0 (feature level 30).

    • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

    • subscribers: (integer)[] A list of user IDs of users who are also subscribed to a given stream. Included only if include_subscribers is true.

    • desktop_notifications: boolean A boolean specifying whether desktop notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_desktop_notifications, for this stream.

    • email_notifications: boolean A boolean specifying whether email notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_email_notifications, for this stream.

    • wildcard_mentions_notify: boolean A boolean specifying whether wildcard mentions trigger notifications as though they were personal mentions in this stream.

      A null value means the value of this setting should be inherited from the user-level default setting, wildcard_mentions_notify, for this stream.

    • push_notifications: boolean A boolean specifying whether push notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_push_notifications, for this stream.

    • audible_notifications: boolean A boolean specifying whether audible notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_audible_notifications, for this stream.

    • pin_to_top: boolean A boolean specifying whether the given stream has been pinned to the top.

    • email_address: string Email address of the given stream, used for sending emails to the stream.

    • is_muted: boolean Whether the user has muted the stream. Muted streams do not count towards your total unread count and do not show up in All messages view (previously known as Home view).

      Changes: Prior to Zulip 2.1, this feature was represented by the more confusingly named in_home_view (with the opposite value, in_home_view=!is_muted).

    • in_home_view: boolean Legacy property for if the given stream is muted, with inverted meeting.

      Deprecated; clients should use is_muted where available.

    • is_announcement_only: boolean Whether only organization administrators can post to the stream.

      Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

    • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

    • role: integer The user's role within the stream (distinct from the user's organization-level role). Valid values are:

      • 20 => Stream administrator.
      • 50 => Subscriber.

      Changes: New in Zulip 4.0 (feature level 31).

    • color: string The user's personal color for the stream.

    • stream_post_policy: integer Policy for which users can post messages to the stream.

      • 1 => Any user can post.
      • 2 => Only administrators can post.
      • 3 => Only full members can post.
      • 4 => Only moderators can post.

      Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

    • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

      • null, the default, means the stream will inherit the organization level setting.
      • -1 encodes retaining messages in this stream forever.

      Changes: New in Zulip 3.0 (feature level 17).

    • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

      Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

    • first_message_id: integer The id of the first message in the stream.

      Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

      Null is used for streams with no message history.

    • stream_weekly_traffic: integer The average number of messages sent to the stream in recent weeks, rounded to the nearest integer.

      Null means the stream was recently created and there is insufficient data to estimate the average traffic.

  • unsubscribed: (object)[] Present if subscription is present in fetch_event_types.

    A array of dictionaries where each dictionary describes one of the streams the user has unsubscribed from but was previously subscribed to along with the subscription details.

    Unlike never_subscribed, the user might have messages in their personal message history that were sent to these streams.

    • stream_id: integer The unique ID of a stream.

    • name: string The name of a stream.

    • description: string The short description of a stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

    • rendered_description: string A short description of a stream rendered as HTML, intended to be used when displaying the stream description in a UI.

      One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

      Changes: New in Zulip 4.0 (feature level 30).

    • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

    • subscribers: (integer)[] A list of user IDs of users who are also subscribed to a given stream. Included only if include_subscribers is true.

    • desktop_notifications: boolean A boolean specifying whether desktop notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_desktop_notifications, for this stream.

    • email_notifications: boolean A boolean specifying whether email notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_email_notifications, for this stream.

    • wildcard_mentions_notify: boolean A boolean specifying whether wildcard mentions trigger notifications as though they were personal mentions in this stream.

      A null value means the value of this setting should be inherited from the user-level default setting, wildcard_mentions_notify, for this stream.

    • push_notifications: boolean A boolean specifying whether push notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_push_notifications, for this stream.

    • audible_notifications: boolean A boolean specifying whether audible notifications are enabled for the given stream.

      A null value means the value of this setting should be inherited from the user-level default setting, enable_stream_audible_notifications, for this stream.

    • pin_to_top: boolean A boolean specifying whether the given stream has been pinned to the top.

    • email_address: string Email address of the given stream, used for sending emails to the stream.

    • is_muted: boolean Whether the user has muted the stream. Muted streams do not count towards your total unread count and do not show up in All messages view (previously known as Home view).

      Changes: Prior to Zulip 2.1, this feature was represented by the more confusingly named in_home_view (with the opposite value, in_home_view=!is_muted).

    • in_home_view: boolean Legacy property for if the given stream is muted, with inverted meeting.

      Deprecated; clients should use is_muted where available.

    • is_announcement_only: boolean Whether only organization administrators can post to the stream.

      Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

    • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

    • role: integer The user's role within the stream (distinct from the user's organization-level role). Valid values are:

      • 20 => Stream administrator.
      • 50 => Subscriber.

      Changes: New in Zulip 4.0 (feature level 31).

    • color: string The user's personal color for the stream.

    • stream_post_policy: integer Policy for which users can post messages to the stream.

      • 1 => Any user can post.
      • 2 => Only administrators can post.
      • 3 => Only full members can post.
      • 4 => Only moderators can post.

      Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

    • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

      • null, the default, means the stream will inherit the organization level setting.
      • -1 encodes retaining messages in this stream forever.

      Changes: New in Zulip 3.0 (feature level 17).

    • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

      Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

    • first_message_id: integer The id of the first message in the stream.

      Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

      Null is used for streams with no message history.

    • stream_weekly_traffic: integer The average number of messages sent to the stream in recent weeks, rounded to the nearest integer.

      Null means the stream was recently created and there is insufficient data to estimate the average traffic.

  • never_subscribed: (object)[] Present if subscription is present in fetch_event_types.

    A array of dictionaries where each dictionary describes one of the streams that is visible to the user and the user has never been subscribed to.

    Important for clients containing UI where one can browse streams to subscribe to.

    • stream_id: integer The unique ID of the stream.

    • name: string The name of the stream.

    • description: string The short description of the stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

    • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

      Changes: New in Zulip 4.0 (feature level 30).

    • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

    • rendered_description: string The short description of the stream rendered as HTML, intended to be used when displaying the stream description in a UI.

      One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

    • stream_post_policy: integer Policy for which users can post messages to the stream.

      • 1 => Any user can post.
      • 2 => Only administrators can post.
      • 3 => Only full members can post.
      • 4 => Only moderators can post.

      Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

    • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

      • null, the default, means the stream will inherit the organization level setting.
      • -1 encodes retaining messages in this stream forever.

      Changes: New in Zulip 3.0 (feature level 17).

    • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

      Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

    • first_message_id: integer The id of the first message in the stream.

      Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

      Null is used for streams with no message history.

    • is_announcement_only: boolean Whether the given stream is announcement only or not.

      Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

    • stream_weekly_traffic: integer The average number of messages sent to the stream in recent weeks, rounded to the nearest integer.

      Null means the stream was recently created and there is insufficient data to estimate the average traffic.

    • subscribers: (integer)[] A list of user IDs of users who are subscribed to the stream. Included only if include_subscribers is true.

      If a user is not allowed to know the subscribers for a stream, we will send an empty array. API authors should use other data to determine whether users like guest users are forbidden to know the subscribers.

  • unread_msgs: (object)[] Present if message and update_message_flags are both present in event_types.

    A set of data structures describing the conversations containing the 50000 most recent unread messages the user has received. This will usually contain every unread message the user has received, but clients should support users with even more unread messages (and not hardcode the number 50000).

    • count: integer The total number of unread messages to display; this includes private and group private messages, as well as all messages to unmuted topics on unmuted streams.

    • pms: (object)[] An array of dictionaries where each entry contains details of unread private messages with a specific user.

      • sender_id: integer The user id of the other participant in a PM conversation.

      • message_ids: (integer)[] The message ids of the recent unread PM messages sent by the other user.

    • streams: (object)[] An array of dictionaries where each dictionary contains details of all unread messages of a single subscribed stream, including muted streams.

      • sender_ids: (integer)[] Array containing the id of the users who have sent recent messages on this stream under the given topic which have been unread by the user.

      • topic: string The topic under which the message was sent.

      • stream_id: integer The id of the stream to which the message was sent.

      • unread_message_ids: (integer)[] The message ids of the recent unread messages sent in this stream.

    • huddles: (object)[] An array of dictionaries where each dictionary contains details of all unread group private messages of a single group.

      • user_ids_string: string A string containing the ids of all users in the huddle(group PMs) separated by commas(,). Example: "1,2,3".

      • message_ids: (integer)[] The message ids of the recent unread messages which have been sent in this group.

    • mentions: (integer)[] Array containing the ids of all messages in which the user has been mentioned. For muted streams, wildcard mentions will not be considered for this array.

    • old_unreads_missing: boolean True if this data set was truncated because the user has too many unread messages. When truncation occurs, only the most recent MAX_UNREAD_MESSAGES (currently 50000) messages will be considered when forming this response. When true, we recommend that clients display a warning, as they are likely to produce erroneous results until reloaded with the user having fewer than MAX_UNREAD_MESSAGES unread messages.

      Changes: New in Zulip 4.0 (feature level 44).

    • stream_id: integer The unique ID of the stream.

    • name: string The name of the stream.

    • description: string The short description of the stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

    • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

      Changes: New in Zulip 4.0 (feature level 30).

    • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

    • rendered_description: string The short description of the stream rendered as HTML, intended to be used when displaying the stream description in a UI.

      One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

    • stream_post_policy: integer Policy for which users can post messages to the stream.

      • 1 => Any user can post.
      • 2 => Only administrators can post.
      • 3 => Only full members can post.
      • 4 => Only moderators can post.

      Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

    • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

      • null, the default, means the stream will inherit the organization level setting.
      • -1 encodes retaining messages in this stream forever.

      Changes: New in Zulip 3.0 (feature level 17).

    • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

      Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

    • first_message_id: integer The id of the first message in the stream.

      Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

      Null is used for streams with no message history.

    • is_announcement_only: boolean Whether the given stream is announcement only or not.

      Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

  • starred_messages: (integer)[] Present if starred_messages is present in fetch_event_types.

    Array containing the ids of all messages which have been starred by the user.

  • streams: (object)[] Present if stream is present in fetch_event_types.

    Array of dictionaries where each dictionary contains details about a single stream in the organization that is visible to the user.

    For organization administrators, this will include all private streams in the organization.

    • stream_id: integer The unique ID of the stream.

    • name: string The name of the stream.

    • description: string The short description of the stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

    • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

      Changes: New in Zulip 4.0 (feature level 30).

    • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

    • rendered_description: string The short description of the stream rendered as HTML, intended to be used when displaying the stream description in a UI.

      One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

    • stream_post_policy: integer Policy for which users can post messages to the stream.

      • 1 => Any user can post.
      • 2 => Only administrators can post.
      • 3 => Only full members can post.
      • 4 => Only moderators can post.

      Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

    • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

      • null, the default, means the stream will inherit the organization level setting.
      • -1 encodes retaining messages in this stream forever.

      Changes: New in Zulip 3.0 (feature level 17).

    • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

      Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

    • first_message_id: integer The id of the first message in the stream.

      Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

      Null is used for streams with no message history.

    • is_announcement_only: boolean Whether the given stream is announcement only or not.

      Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

  • realm_default_streams: (object)[] Present if default_streams is present in fetch_event_types.

    An array of dictionaries where each dictionary contains details about a single default stream for the Zulip organization.

    • stream_id: integer The unique ID of the stream.

    • name: string The name of the stream.

    • description: string The short description of the stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

    • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

      Changes: New in Zulip 4.0 (feature level 30).

    • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

    • rendered_description: string The short description of the stream rendered as HTML, intended to be used when displaying the stream description in a UI.

      One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

    • stream_post_policy: integer Policy for which users can post messages to the stream.

      • 1 => Any user can post.
      • 2 => Only administrators can post.
      • 3 => Only full members can post.
      • 4 => Only moderators can post.

      Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

    • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

      • null, the default, means the stream will inherit the organization level setting.
      • -1 encodes retaining messages in this stream forever.

      Changes: New in Zulip 3.0 (feature level 17).

    • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

      Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

    • first_message_id: integer The id of the first message in the stream.

      Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

      Null is used for streams with no message history.

    • is_announcement_only: boolean Whether the given stream is announcement only or not.

      Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

  • realm_default_stream_groups: (object)[] Present if default_stream_groups is present in fetch_event_types.

    An array of dictionaries where each dictionary contains details about a single default stream group configured for this Zulip organization.

    Default stream groups are an experimental feature.

    • name: string Name of the default stream group.

    • description: string Description of the default stream group.

    • id: integer id of the default stream group.

    • streams: (object)[] Array containing details about the streams in the default stream group.

      • stream_id: integer The unique ID of the stream.

      • name: string The name of the stream.

      • description: string The short description of the stream in text/markdown format, intended to be used to prepopulate UI for editing a stream's description.

      • date_created: integer The UNIX timestamp for when the stream was created, in UTC seconds.

        Changes: New in Zulip 4.0 (feature level 30).

      • invite_only: boolean Specifies whether the stream is private or not. Only people who have been invited can access a private stream.

      • rendered_description: string The short description of the stream rendered as HTML, intended to be used when displaying the stream description in a UI.

        One should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

      • is_web_public: boolean Whether the stream has been configured to allow unauthenticated access to its message history from the web.

      • stream_post_policy: integer Policy for which users can post messages to the stream.

        • 1 => Any user can post.
        • 2 => Only administrators can post.
        • 3 => Only full members can post.
        • 4 => Only moderators can post.

        Changes: New in Zulip 3.0, replacing the previous is_announcement_only boolean.

      • message_retention_days: integer Number of days that messages sent to this stream will be stored before being automatically deleted by the message retention policy. There are two special values:

        • null, the default, means the stream will inherit the organization level setting.
        • -1 encodes retaining messages in this stream forever.

        Changes: New in Zulip 3.0 (feature level 17).

      • history_public_to_subscribers: boolean Whether the history of the stream is public to its subscribers.

        Currently always true for public streams (i.e. invite_only=False implies history_public_to_subscribers=True), but clients should not make that assumption, as we may change that behavior in the future.

      • first_message_id: integer The id of the first message in the stream.

        Intended to help clients determine whether they need to display UI like the "more topics" widget that would suggest the stream has older history that can be accessed.

        Null is used for streams with no message history.

      • is_announcement_only: boolean Whether the given stream is announcement only or not.

        Changes: Deprecated in Zulip 3.0 (feature level 1), use stream_post_policy instead.

  • stop_words: (string)[] Present if stop_words is present in fetch_event_types.

    An array containing the stop words used by the Zulip server's full-text search implementation. Useful for showing helpful error messages when a search returns limited results because a stop word in the query was ignored.

  • user_status: object Present if user_status is present in fetch_event_types.

    A dictionary which contains the status of all users in the Zulip organization who have set a status.

    • {user_id}: object Object containing the status details of a user with the key of the object being the id of the user.

      • away: boolean Whether the user has marked themself "away".

      • status_text: string The text content of the status message.

  • has_zoom_token: boolean Present if video_calls is present in fetch_event_types.

    A boolean which signifies whether the user has a zoom token and has thus completed OAuth flow for the Zoom integration. Clients need to know whether initiating Zoom OAuth is required before creating a Zoom call.

  • giphy_api_key: string Present if giphy is present in fetch_event_types.

    GIPHY's client-side SDKs needs this API key to use the GIPHY API. GIPHY API keys are not secret (their main purpose appears to be allowing GIPHY to block a problematic app). Please don't use our API key for an app unrelated to Zulip.

    Developers of clients should also read the GIPHY API TOS before using this API key.

    Changes: Added in Zulip 4.0 (feature level 47).

  • enable_desktop_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_digest_emails: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_login_emails: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_marketing_emails: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_offline_email_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_offline_push_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_online_push_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_sounds: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_stream_desktop_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_stream_email_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_stream_push_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • enable_stream_audible_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • wildcard_mentions_notify: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • message_content_in_email_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • notification_sound: string Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • pm_content_in_desktop_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • desktop_icon_count_display: integer Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • realm_name_in_notifications: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • presence_enabled: boolean Present if update_global_notifications is present in fetch_event_types.

    The current value of this global notification setting for the user. See update-notification-settings for details on notification settings.

  • available_notification_sounds: (string)[] Present if update_global_notifications is present in fetch_event_types.

    Array containing the names of the notification sound options supported by this Zulip server. Only relevant to support UI for configuring notification sounds.

  • color_scheme: integer Present if update_display_settings is present in fetch_event_types.

    The color scheme selected by the user.

    See PATCH /settings/display for api details on display settings.

  • default_language: string Present if update_display_settings is present in fetch_event_types.

    The default language chosen by the user.

    See PATCH /settings/display for api details on display settings.

  • demote_inactive_streams: integer Present if update_display_settings is present in fetch_event_types.

    Whether the user has chosen to demote inactive streams.

    See PATCH /settings/display for api details on display settings.

  • dense_mode: boolean Present if update_display_settings is present in fetch_event_types.

    Whether the user has switched on dense mode. Dense mode is an experimental feature that is only available in development environments.

    See PATCH /settings/display for api details on display settings.

  • emojiset: string Present if update_display_settings is present in fetch_event_types.

    The name of the emojiset that the user has chosen.

    See PATCH /settings/display for api details on display settings.

  • fluid_layout_width: boolean Present if update_display_settings is present in fetch_event_types.

    Whether the user has chosen for the layout width to be fluid.

    See PATCH /settings/display for api details on display settings.

  • default_view: string Present if update_display_settings is present in fetch_event_types.

    The default view in Zulip, represented as the URL suffix after # to be rendered when Zulip loads.

    Currently supported values are all_messages and recent_topics.

    See PATCH /settings/display for api details on display settings.

  • high_contrast_mode: boolean Present if update_display_settings is present in fetch_event_types.

    Whether has switched on high contrast mode.

    See PATCH /settings/display for api details on display settings.

  • left_side_userlist: boolean Present if update_display_settings is present in fetch_event_types.

    Whether the user has chosen for the userlist to be displayed on the left side of the screen (for desktop app and webapp) in narrow windows.

    See PATCH /settings/display for api details on display settings.

  • starred_message_counts: boolean Present if update_display_settings is present in fetch_event_types.

    Whether the user has chosen the number of starred messages to be displayed similar to unread counts.

    See PATCH /settings/display for api details on display settings.

  • timezone: string Present if update_display_settings is present in fetch_event_types.

    The timezone configured for the user. This is used primarily to display the user's timezone to other users.

    See PATCH /settings/display for api details on display settings.

  • translate_emoticons: boolean Present if update_display_settings is present in fetch_event_types.

    Whether the user has chosen for emoticons to be translated into emoji in the Zulip compose box.

    See PATCH /settings/display for api details on display settings.

  • twenty_four_hour_time: boolean Present if update_display_settings is present in fetch_event_types.

    Whether the user has chosen a twenty four hour time display (true) or a twelve hour one (false).

    See PATCH /settings/display for api details on display settings.

  • emojiset_choices: (object)[] Present if update_display_settings is present in fetch_event_types.

    Array of dictionaries where each dictionary describes an emojiset supported by this version of the Zulip server.

    Only relevant to clients with configuration UI for choosing an emojiset; the currently selected emojiset is available in the emojiset key.

    See PATCH /settings/display for api details on display settings.

    • key: string The key or the name of the emojiset which will be the value of emojiset if this emojiset is chosen.

    • text: string The text describing the emojiset.

  • realm_add_emoji_by_admins_only: boolean Present if realm is present in fetch_event_types.

    Whether the organization is configured to only allow administrators to upload new custom emoji.

  • realm_allow_edit_history: boolean Present if realm is present in fetch_event_types.

    Whether this organization is configured to allow users to access message edit history.

  • realm_allow_message_deleting: boolean Present if realm is present in fetch_event_types.

    Whether messages can be deleted in this Zulip organization.

  • realm_bot_creation_policy: integer Present if realm is present in fetch_event_types.

    The policy for which users can create bot users in this organization.

  • realm_create_stream_policy: integer Present if realm is present in fetch_event_types.

    The policy for which users can create streams in this organization.

  • realm_invite_to_stream_policy: integer Present if realm is present in fetch_event_types.

    The policy for which users can add other users to streams in this organization.

  • realm_wildcard_mention_policy: integer Present if realm is present in fetch_event_types.

    The policy for who can use wildcard mentions in large streams.

    • 1 => Any user can use wildcard mentions in large streams.
    • 2 => Only members can use wildcard mentions in large streams.
    • 3 => Only full members can use wildcard mentions in large streams.
    • 4 => Only stream and organization administrators can use wildcard mentions in large streams.
    • 5 => Only organization administrators can use wildcard mentions in large streams.
    • 6 => Nobody can use wildcard mentions in large streams.
    • 7 => Only organization adminstartors and moderators can use wildcard mentions in large streams.

    All users will receive a warning/reminder when using mentions in large streams, even when permitted to do so.

    Changes: New in Zulip 4.0 (feature level 33). Moderators option added in Zulip 4.0 (feature level 62).

  • realm_default_language: string Present if realm is present in fetch_event_types.

    The default UI language for new users joining this organization.

  • realm_default_twenty_four_hour_time: boolean Present if realm is present in fetch_event_types.

    Whether new members of this organization will see times displayed in 24-hour time (true) or 12-hour time (false).

  • realm_description: string Present if realm is present in fetch_event_types.

    The description of the organization, used on login and registration pages.

  • realm_digest_emails_enabled: boolean Present if realm is present in fetch_event_types.

    Whether the organization has enabled weekly digest emails.

  • realm_disallow_disposable_email_addresses: boolean Present if realm is present in fetch_event_types.

    Whether the organization disallows disposable email addresses.

  • realm_email_address_visibility: integer Present if realm is present in fetch_event_types.

    The policy for which users in this organization can see the real email addresses of other users.

    • 1 = everyone
    • 2 = members only
    • 3 = administrators only
    • 4 = nobody (though note that administrators can change this setting).
  • realm_email_changes_disabled: boolean Present if realm is present in fetch_event_types.

    Whether users are allowed to change their own email address in this organization. This is typically disabled for organizations that synchronize accounts from LDAP or a similar corporate database.

  • realm_invite_required: boolean Present if realm is present in fetch_event_types.

    Whether an invitation is required to join this organization.

  • realm_invite_to_realm_policy: integer Present if realm is present in fetch_event_types.

    Policy for who can invite new users to join the organization:

    • 1 = Members only
    • 2 = Administrators only
    • 3 = Full members only
    • 4 = Moderators only

    Changes: New in Zulip 4.0 (feature level 50) replacing the previous realm_invite_by_admins_only boolean.

  • realm_move_messages_between_streams_policy: integer Present if realm is present in fetch_event_types.

    The policy for which users can move messages from one stream to another.

    • 1 = Members only
    • 2 = Administrators only
    • 3 = Full members only
    • 4 = Moderators only

    Changes: New in Zulip 4.0 (feature level 56)

  • realm_inline_image_preview: boolean Present if realm is present in fetch_event_types.

    Whether this organization has been configured to enable previews of linked images.

  • realm_inline_url_embed_preview: boolean Present if realm is present in fetch_event_types.

    Whether this organization has been configured to enable previews of linked websites.

  • realm_mandatory_topics: boolean Present if realm is present in fetch_event_types.

    Whether topics are required for messages in this organization.

  • realm_message_retention_days: integer Present if realm is present in fetch_event_types.

    The default message retention policy for this organization. Pass "forever" to request that messages by retained forever (the default).

  • realm_name: string Present if realm is present in fetch_event_types.

    The name of the organization, used in login pages etc.

  • realm_name_changes_disabled: boolean Present if realm is present in fetch_event_types.

    Indicates whether users are allowed to change their name via the Zulip UI in this organization. Typically disabled in organizations syncing this this type of account information an external user database like LDAP.

  • realm_avatar_changes_disabled: boolean Present if realm is present in fetch_event_types.

    Indicates whether users are allowed to change their avatar via the Zulip UI in this organization. Typically disabled in organizations syncing this this type of account information an external user database like LDAP.

  • realm_emails_restricted_to_domains: boolean Present if realm is present in fetch_event_types.

    Whether new users joining this organization are required to have an email address in one of the realm_domains configured for the organization.

  • realm_send_welcome_emails: boolean Present if realm is present in fetch_event_types.

    Whether or not this organization is configured to send the standard Zulip welcome emails to new users joining the organization.

  • realm_message_content_allowed_in_email_notifications: boolean Present if realm is present in fetch_event_types.

    Whether notification emails in this organization are allowed to contain Zulip the message content, or simply indicate that a new message was sent.

  • realm_video_chat_provider: integer Present if realm is present in fetch_event_types.

    The configured video call provider for the organization.

  • realm_giphy_rating: integer Present if realm is present in fetch_event_types.

    The configured GIPHY rating for the organization.

    Changes: New in Zulip 4.0 (feature level 55).

  • realm_waiting_period_threshold: integer Present if realm is present in fetch_event_types.

    Members whose accounts have been created at least this many days ago will be treated as full members for the purpose of settings that restrict access to new members.

  • realm_digest_weekday: integer Present if realm is present in fetch_event_types.

    The day of the week when the organization will send its weekly digest email to inactive users.

  • realm_private_message_policy: integer Present if realm is present in fetch_event_types.

    Policy for who can send private messages in this organization.

    • 1 = Everyone
    • 2 = Nobody
  • realm_user_group_edit_policy: integer Present if realm is present in fetch_event_types.

    The organization's policy for who can manage user groups .

    • 1 = All members can create and edit user groups
    • 2 = Only organization administrators can create and edit user groups
  • realm_default_code_block_language: string Present if realm is present in fetch_event_types.

    The default pygments language code to be used for a code blocks in this organization. Null if no default has been set.

  • realm_message_content_delete_limit_seconds: integer Present if realm is present in fetch_event_types.

    Messages sent more than this many seconds ago cannot be deleted with this organization's message deletion policy.

  • realm_authentication_methods: object Present if realm is present in fetch_event_types.

    Dictionary of 'authentication_method_name': 'boolean' with each entry describing whether the authentication name can be used for authenticating into the organization.

    • Boolean describing whether the authentication method (i.e its key) is enabled in this organization.
  • realm_allow_message_editing: boolean Present if realm is present in fetch_event_types.

    Whether this organizations message edit policy allows editing the content of messages.

  • realm_allow_community_topic_editing: boolean Present if realm is present in fetch_event_types.

    Whether community topic editing is enabled in this organization.

  • realm_message_content_edit_limit_seconds: integer Present if realm is present in fetch_event_types.

    Messages sent more than this many seconds ago cannot be edited with this organization's message edit policy.

  • realm_community_topic_editing_limit_seconds: integer Present if realm is present in fetch_event_types.

    Messages sent more than this many seconds ago cannot have their topics edited by other users with this organization's message edit policy.

    Changes: New in Zulip 3.0 (feature level 11). Previously this value was hardcoded to 86400 seconds (1 day).

  • realm_icon_url: string Present if realm is present in fetch_event_types.

    The URL of the organization's profile icon.

  • realm_icon_source: string Present if realm is present in fetch_event_types.

    String indicating whether the organization's profile icon was uploaded by a user or is the default. Useful for UI allowing editing the organization's icon.

    • "G" means generated by Gravatar (the default).
    • "U" means uploaded by an organization administrator.
  • max_icon_file_size: integer Present if realm is present in fetch_event_types.

    The maximum file size allowed for the organization's icon. Useful for UI allowing editing the organization's icon.

  • realm_logo_url: string Present if realm is present in fetch_event_types.

    The URL of the organization's wide logo configured in the organization profile.

  • realm_logo_source: string Present if realm is present in fetch_event_types.

    String indicating whether the organization's profile wide logo was uploaded by a user or is the default. Useful for UI allowing editing the organization's wide logo.

    • "D" means the logo is the default Zulip logo.
    • "U" means uploaded by an organization administrator.
  • realm_night_logo_url: string Present if realm is present in fetch_event_types.

    The URL of the organization's night theme wide-format logo configured in the organization profile.

  • realm_night_logo_source: string Present if realm is present in fetch_event_types.

    String indicating whether the organization's night theme profile wide logo was uploaded by a user or is the default. Useful for UI allowing editing the organization's wide logo.

    • "D" means the logo is the default Zulip logo.
    • "U" means uploaded by an organization administrator.
  • max_logo_file_size: integer Present if realm is present in fetch_event_types.

    The maximum file size allowed for the uploaded organization logos.

  • realm_bot_domain: string Present if realm is present in fetch_event_types.

    The fake email domain that will be used for new bots created this organization. Useful for UI for creating bots.

  • realm_uri: string Present if realm is present in fetch_event_types.

    The URL for the organization.

  • realm_available_video_chat_providers: object Present if realm is present in fetch_event_types.

    Dictionary where each entry describes a supported video call provider that is configured on this server and could be selected by an organization administrator.

    Useful for administrative settings UI that allows changing the video call provider.

    • {provider_name}: object Dictionary containing the details of the video call provider with the name of the chat provider as the key.

      • name: string The name of the video call provider.

      • id: integer The ID of the video call provider.

  • realm_presence_disabled: boolean Present if realm is present in fetch_event_types.

    Whether online presence of other users is shown in this organization.

  • settings_send_digest_emails: boolean Present if realm is present in fetch_event_types.

    Whether this Zulip server is configured to allow organizations to enable digest emails.

    Relevant for administrative settings UI that can change the digest email settings.

  • realm_is_zephyr_mirror_realm: boolean Present if realm is present in fetch_event_types.

    Whether the organization is a Zephyr mirror realm.

  • realm_email_auth_enabled: boolean Present if realm is present in fetch_event_types.

    Whether the organization has enabled Zulip's default email and password authentication feature. Determines whether Zulip stores a password for the user and clients should offer any UI for changing the user's Zulip password.

  • realm_password_auth_enabled: boolean Present if realm is present in fetch_event_types.

    Whether the organization allows any sort of password-based authentication (whether via EmailAuthBackend or LDAP passwords).

    Determines whether a client might ever need to display a password prompt (clients will primarily look at this attribute in server_settings before presenting a login page).

  • realm_push_notifications_enabled: boolean Present if realm is present in fetch_event_types.

    Whether push notifications are enabled for this organization. Typically false for self-hosted servers that have not configured the Mobile push notifications service.

  • realm_upload_quota: integer Present if realm is present in fetch_event_types.

    The total quota for uploaded files in this organization.

    Clients are not responsible for checking this quota; it is included in the API only for display purposes.

    Null if there is no limit.

  • realm_plan_type: integer Present if realm is present in fetch_event_types.

    The plan type of the organization.

    • 1 = Self-hosted organization (SELF_HOSTED)
    • 2 = Zulip Cloud free plan (LIMITED)
    • 3 = Zulip Cloud Standard plan (STANDARD)
    • 4 = Zulip Cloud Standard plan, sponsored for free (STANDARD_FREE)
  • zulip_plan_is_not_limited: boolean Present if realm is present in fetch_event_types.

    Whether the organization is using a limited (Zulip Cloud Free) plan.

  • upgrade_text_for_wide_organization_logo: string Present if realm is present in fetch_event_types.

    Text to use when displaying UI for wide organization logos, a feature that is currently not available on the Zulip Cloud Free plan.

    Useful only for clients supporting administrative UI for uploading a new wide organization logo to brand the organization.

  • realm_default_external_accounts: object Present if realm is present in fetch_event_types.

    Dictionary where each entry describes a default external account type that can be configured with Zulip's custom profile fields feature.

    • {site_name}: object Dictionary containing the details of the default external account provider with the name of the website as the key.

      • name: string The name of the external account provider

      • text: string The text describing the external account.

      • hint: string The help text to be displayed for the custom profile field in user-facing settings UI for configuring custom profile fields for this account.

      • url_pattern: string The regex pattern of the URL of a profile page on the external site.

  • jitsi_server_url: string Present if realm is present in fetch_event_types.

    The base URL the organization uses to create Jitsi video calls.

  • development_environment: boolean Present if realm is present in fetch_event_types.

    Whether this Zulip server is a development environment. Used to control certain features or UI (such as error popups) that should only apply when connected to a Zulip development environment.

  • server_generation: integer Present if realm is present in fetch_event_types.

    A timestamp indicating when the process hosting this event queue was started. Clients will likely only find this value useful for inclusion in detailed error reports.

  • password_min_length: integer Present if realm is present in fetch_event_types.

    This Zulip server's configured minimum required length for passwords. Necessary for password change UI to show whether the password will be accepted.

  • password_min_guesses: integer Present if realm is present in fetch_event_types.

    This Zulip server's configured minimum zxcvbn minimum guesses. Necessary for password change UI to show whether the password will be accepted.

  • giphy_rating_options: object Dictionary where each entry describes a valid rating that is configured on this server and could be selected by an organization administrator.

    Useful for administrative settings UI that allows changing the allowed rating of GIFs.

    • {rating_name}: object Dictionary containing the details of the rating with the name of the rating as the key.

      • name: string The description of the rating option.

      • id: integer The ID of the rating option.

  • max_file_upload_size_mib: integer Present if realm is present in fetch_event_types.

    The maximum file size that can be uploaded to this Zulip server.

  • max_avatar_file_size_mib: integer Present if realm is present in fetch_event_types.

    The maximum avatar size that can be uploaded to this Zulip server.

  • server_inline_image_preview: boolean Present if realm is present in fetch_event_types.

    Whether the server is configured with support for inline image previews. Clients containing administrative UI for changing realm_inline_image_preview should consult this field before offering that feature.

  • server_inline_url_embed_preview: boolean Present if realm is present in fetch_event_types.

    Whether the server is configured with support for inline URL previews. Clients containing administrative UI for changing realm_inline_url_embed_preview should consult this field before offering that feature.

  • server_avatar_changes_disabled: boolean Present if realm is present in fetch_event_types.

    Whether the server allows avatar changes. Similar to realm_avatar_changes_disabled but based on the AVATAR_CHANGES_DISABLED Zulip server level setting.

  • server_name_changes_disabled: boolean Present if realm is present in fetch_event_types.

    Whether the server allows name changes. Similar to realm_name_changes_disabled but based on the NAME_CHANGES_DISABLED Zulip server level setting.

  • realm_notifications_stream_id: integer Present if realm is present in fetch_event_types.

    The ID of the stream to which notifications announcing the creation of new streams are sent. -1 if such notifications are disabled.

    Since these notifications are sent by the server, this field is primarily relevant to clients containing UI for changing it.

  • realm_signup_notifications_stream_id: integer Present if realm is present in fetch_event_types.

    The ID of the stream to which notifications announcing that new users have joined the organization are sent. -1 if such notifications are disabled.

    Since these notifications are sent by the server, this field is primarily relevant to clients containing UI for changing it.

  • realm_users: (object)[] Present if realm_user is present in fetch_event_types.

    A array of dictionaries where each entry describes a user whose account has not been deactivated. Note that unlike the usual User dictionary, this does not contain the is_active key, as all the users present in this array have active accounts.

    See also cross_realm_bots and realm_non_active_users.

    • email: string The Zulip API email address of the user or bot.

      If you do not have permission to view the email address of the target user, this will be a fake email address that is usable for the Zulip API but nothing else.

    • is_bot: boolean A boolean specifying whether the user is a bot or full account.

    • avatar_url: string URL for the user's avatar. Will be null if the client_gravatar query parameter was set to True and the user's avatar is hosted by the Gravatar provider (i.e. the user has never uploaded an avatar).

      Changes: In Zulip 3.0 (feature level 18), if the client has the user_avatar_url_field_optional capability, this will be missing at the server's sole discretion.

    • avatar_version: integer Version for the user's avatar. Used for cache-busting requests for the user's avatar. Clients generally shouldn't need to use this; most avatar URLs sent by Zulip will already end with ?v={avatar_version}.

    • full_name: string Full name of the user or bot, used for all display purposes.

    • is_admin: boolean A boolean specifying whether the user is an organization administrator.

    • is_owner: boolean A boolean specifying whether the user is an organization owner. If true, is_admin will also be true.

      Changes: New in Zulip 3.0 (feature level 8).

    • role: integer Organization-level role) of the user. Poosible values are:

      • Organization owner => 100
      • Organization administrator => 200
      • Organization moderator => 300
      • Member => 400
      • Guest => 600

      Changes: New in Zulip 4.0 (feature level 59).

    • bot_type: integer An integer describing the type of bot:

      • null if the user isn't a bot.
      • 1 for a Generic bot.
      • 2 for an Incoming webhook bot.
      • 3 for an Outgoing webhook bot.
      • 4 for an Embedded bot.
    • user_id: integer The unique ID of the user.

    • bot_owner_id: integer If the user is a bot (i.e. is_bot is True), bot_owner is the user ID of the bot's owner (usually, whoever created the bot).

      Will be null for legacy bots that do not have an owner.

      Changes: New in Zulip 3.0 (feature level 1). In previous versions, there was a bot_owner field containing the email address of the bot's owner.

    • is_active: boolean A boolean specifying whether the user account has been deactivated.

    • is_guest: boolean A boolean specifying whether the user is a guest user.

    • timezone: string The time zone of the user.

    • date_joined: string The time the user account was created.

    • delivery_email: string The user's real email address. This field is present only if email address visibility is limited and you are an administrator with access to real email addresses under the configured policy.

    • profile_data: object A dictionary containing custom profile field data for the user. Each entry maps the integer ID of a custom profile field in the organization to a dictionary containing the user's data for that field. Generally the data includes just a single value key; for those custom profile fields supporting Markdown, a rendered_value key will also be present.

      • {id}: object Object with data about what value user filled in the custom profile field with id id.

        • value: string User's personal value for this custom profile field.

        • rendered_value: string The value rendered in HTML. Will only be present for custom profile field types that support Markdown rendering.

          This user-generated HTML content should be rendered using the same CSS and client-side security protections as are used for message content.

  • realm_non_active_users: (object)[] Present if realm_user is present in fetch_event_types.

    A array of dictionaries where each entry describes a user whose account has been deactivated. Note that unlike the usual User dictionary this does not contain the is_active key as all the users present in this array have deactivated accounts.

    • email: string The Zulip API email address of the user or bot.

      If you do not have permission to view the email address of the target user, this will be a fake email address that is usable for the Zulip API but nothing else.

    • is_bot: boolean A boolean specifying whether the user is a bot or full account.

    • avatar_url: string URL for the user's avatar. Will be null if the client_gravatar query parameter was set to True and the user's avatar is hosted by the Gravatar provider (i.e. the user has never uploaded an avatar).

      Changes: In Zulip 3.0 (feature level 18), if the client has the user_avatar_url_field_optional capability, this will be missing at the server's sole discretion.

    • avatar_version: integer Version for the user's avatar. Used for cache-busting requests for the user's avatar. Clients generally shouldn't need to use this; most avatar URLs sent by Zulip will already end with ?v={avatar_version}.

    • full_name: string Full name of the user or bot, used for all display purposes.

    • is_admin: boolean A boolean specifying whether the user is an organization administrator.

    • is_owner: boolean A boolean specifying whether the user is an organization owner. If true, is_admin will also be true.

      Changes: New in Zulip 3.0 (feature level 8).

    • role: integer Organization-level role) of the user. Poosible values are:

      • Organization owner => 100
      • Organization administrator => 200
      • Organization moderator => 300
      • Member => 400
      • Guest => 600

      Changes: New in Zulip 4.0 (feature level 59).

    • bot_type: integer An integer describing the type of bot:

      • null if the user isn't a bot.
      • 1 for a Generic bot.
      • 2 for an Incoming webhook bot.
      • 3 for an Outgoing webhook bot.
      • 4 for an Embedded bot.
    • user_id: integer The unique ID of the user.

    • bot_owner_id: integer If the user is a bot (i.e. is_bot is True), bot_owner is the user ID of the bot's owner (usually, whoever created the bot).

      Will be null for legacy bots that do not have an owner.

      Changes: New in Zulip 3.0 (feature level 1). In previous versions, there was a bot_owner field containing the email address of the bot's owner.

    • is_active: boolean A boolean specifying whether the user account has been deactivated.

    • is_guest: boolean A boolean specifying whether the user is a guest user.

    • timezone: string The time zone of the user.

    • date_joined: string The time the user account was created.

    • delivery_email: string The user's real email address. This field is present only if email address visibility is limited and you are an administrator with access to real email addresses under the configured policy.

    • profile_data: object A dictionary containing custom profile field data for the user. Each entry maps the integer ID of a custom profile field in the organization to a dictionary containing the user's data for that field. Generally the data includes just a single value key; for those custom profile fields supporting Markdown, a rendered_value key will also be present.

      • {id}: object Object with data about what value user filled in the custom profile field with id id.

        • value: string User's personal value for this custom profile field.

        • rendered_value: string The value rendered in HTML. Will only be present for custom profile field types that support Markdown rendering.

          This user-generated HTML content should be rendered using the same CSS and client-side security protections as are used for message content.

  • avatar_source: string Present if realm_user is present in fetch_event_types.

    The avatar data source type for the current user.

    Value values are G (gravatar) and U (uploaded by user).

  • avatar_url_medium: string Present if realm_user is present in fetch_event_types.

    The avatar URL for the current user at 500x500 resolution, appropriate for use in settings UI showing the user's avatar.

  • avatar_url: string Present if realm_user is present in fetch_event_types.

    The URL of the avatar for the current user at 100x100 resolution. See also avatar_url_medium.

  • can_create_streams: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user is allowed to create streams with the organization's stream creation policy.

  • can_subscribe_other_users: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user is allowed to subscribe other users to streams with the organization's streams policy.

  • can_invite_others_to_realm: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user [is allowed to invite others] (/help/invite-new-users#change-who-can-send-invitations) to the organization.

    Changes: New in Zulip 4.0 (feature level 51).

  • is_admin: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user is an organization administrator.

  • is_owner: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user is an organization owner.

  • is_moderator: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user is an organization moderator.

    Changes: New in Zulip 4.0 (feature level 60).

  • is_guest: boolean Present if realm_user is present in fetch_event_types.

    Whether the current user is a guest user.

  • enter_sends: boolean Present if realm_user is present in fetch_event_types.

    Whether the user setting for sending on pressing Enter in the compose box is enabled.

  • user_id: integer Present if realm_user is present in fetch_event_types.

    The unique ID for the current user.

  • email: string Present if realm_user is present in fetch_event_types.

    The Zulip display email address for the current user. See also delivery_email; these may be the same or different depending on the organization's email_address_visibility policy.

  • delivery_email: string Present if realm_user is present in fetch_event_types.

    The user's email address, appropriate for UI for changing the user's email address. See also email.

  • full_name: string Present if realm_user is present in fetch_event_types.

    The full name of the current user.

  • cross_realm_bots: (object)[] Present if realm_user is present in fetch_event_types.

    Array of dictionaries where each dictionary contains details of a single cross realm bot. Cross-realm bots are special system bot accounts like Notification Bot.

    Most clients will want to combine this with realm_users in many contexts.

    • email: string The Zulip API email address of the user or bot.

      If you do not have permission to view the email address of the target user, this will be a fake email address that is usable for the Zulip API but nothing else.

    • is_bot: boolean A boolean specifying whether the user is a bot or full account.

    • avatar_url: string URL for the user's avatar. Will be null if the client_gravatar query parameter was set to True and the user's avatar is hosted by the Gravatar provider (i.e. the user has never uploaded an avatar).

      Changes: In Zulip 3.0 (feature level 18), if the client has the user_avatar_url_field_optional capability, this will be missing at the server's sole discretion.

    • avatar_version: integer Version for the user's avatar. Used for cache-busting requests for the user's avatar. Clients generally shouldn't need to use this; most avatar URLs sent by Zulip will already end with ?v={avatar_version}.

    • full_name: string Full name of the user or bot, used for all display purposes.

    • is_admin: boolean A boolean specifying whether the user is an organization administrator.

    • is_owner: boolean A boolean specifying whether the user is an organization owner. If true, is_admin will also be true.

      Changes: New in Zulip 3.0 (feature level 8).

    • role: integer Organization-level role) of the user. Poosible values are:

      • Organization owner => 100
      • Organization administrator => 200
      • Organization moderator => 300
      • Member => 400
      • Guest => 600

      Changes: New in Zulip 4.0 (feature level 59).

    • bot_type: integer An integer describing the type of bot:

      • null if the user isn't a bot.
      • 1 for a Generic bot.
      • 2 for an Incoming webhook bot.
      • 3 for an Outgoing webhook bot.
      • 4 for an Embedded bot.
    • user_id: integer The unique ID of the user.

    • bot_owner_id: integer If the user is a bot (i.e. is_bot is True), bot_owner is the user ID of the bot's owner (usually, whoever created the bot).

      Will be null for legacy bots that do not have an owner.

      Changes: New in Zulip 3.0 (feature level 1). In previous versions, there was a bot_owner field containing the email address of the bot's owner.

    • is_active: boolean A boolean specifying whether the user account has been deactivated.

    • is_guest: boolean A boolean specifying whether the user is a guest user.

    • timezone: string The time zone of the user.

    • date_joined: string The time the user account was created.

    • delivery_email: string The user's real email address. This field is present only if email address visibility is limited and you are an administrator with access to real email addresses under the configured policy.

    • profile_data: object A dictionary containing custom profile field data for the user. Each entry maps the integer ID of a custom profile field in the organization to a dictionary containing the user's data for that field. Generally the data includes just a single value key; for those custom profile fields supporting Markdown, a rendered_value key will also be present.

      • {id}: object Object with data about what value user filled in the custom profile field with id id.

        • value: string User's personal value for this custom profile field.

        • rendered_value: string The value rendered in HTML. Will only be present for custom profile field types that support Markdown rendering.

          This user-generated HTML content should be rendered using the same CSS and client-side security protections as are used for message content.

    • is_cross_realm_bot: boolean Whether the user is a cross realm bot.

Example response

A typical successful JSON response may look like:

{
    "last_event_id": -1,
    "msg": "",
    "queue_id": "1517975029:0",
    "realm_emoji": {
        "1": {
            "author_id": 5,
            "deactivated": false,
            "id": "1",
            "name": "green_tick",
            "source_url": "/user_avatars/1/emoji/images/1.png"
        }
    },
    "result": "success",
    "zulip_feature_level": 2,
    "zulip_version": "2.1.0"
}