Add alert words
POST https://zulip.4nclresults.co.uk/api/v1/users/me/alert_words
Add words (or phrases) to the user's set of configured alert words.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Add words (or phrases) to the user's set of configured alert words.
word = ["foo", "bar"]
result = client.add_alert_words(word)
print(result)
curl -sSX POST https://zulip.4nclresults.co.uk/api/v1/users/me/alert_words \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode 'alert_words=["foo", "bar"]'
Parameters
alert_words (string)[] required
Example: ["foo", "bar"]
An array of strings to be added to the user's set of configured
alert words. Strings already present in the user's set of alert words
already are ignored.
Alert words are case insensitive.
Response
Return values
Example response(s)
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported
array.
A typical successful JSON response may look like:
{
"alert_words": [
"foo",
"bar",
"natural",
"illustrious"
],
"msg": "",
"result": "success"
}
An example JSON response for when a supplied alert word (or phrase)
exceeds the character limit:
{
"code": "BAD_REQUEST",
"msg": "alert_words[0] is too long (limit: 100 characters)",
"result": "error"
}