Create organization filters

Establish patterns in the messages that should be automatically linkified.


Usage examples

#!/usr/bin/env python3

import zulip

# Download ~/zuliprc-dev from your dev server
client = zulip.Client(config_file="~/zuliprc-dev")

# Add a filter to automatically linkify #<number> to the corresponding
# issue in Zulip's server repo
result = client.add_realm_filter('#(?P<id>[0-9]+)',

curl -X POST \
    -d "pattern=#(?P<id>[0-9]+)" \
    -d "url_format_string="


Argument Example Required Description
pattern "#(?P<id>[0-9]+)" Yes

The Python regular expression that should trigger the linkifier.

url_format_string "https:\/\/\/zulip\/zulip\/issues\/%(id)s" Yes

The URL used for the link. If you used named groups for the pattern, you can insert their content here with %(name_of_the_capturing_group)s.


Return values

  • id: The numeric ID assigned to this filter.

Example response

A typical successful JSON response may look like:

    "id": 42,
    "msg": "",
    "result": "success"