Set "typing" status

Send an event indicating that the user has started or stopped typing on their client. See the typing notification docs for details on Zulip's typing notifications protocol.

POST https://zulip.dioco.io/api/v1/typing

Usage examples

#!/usr/bin/env python3

import zulip

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

# The user has started to type in the group PM with Iago and Polonius
user_id1 = 10
user_id2 = 11

request = {
    'op': 'start',
    'to': [user_id1, user_id2],
}
result = client.set_typing_status(request)
# The user has finished typing in the group PM with Iago and Polonius
user_id1 = 10
user_id2 = 11

request = {
    'op': 'stop',
    'to': [user_id1, user_id2],
}
result = client.set_typing_status(request)
print(result)

More examples and documentation can be found here.

const Zulip = require('zulip-js');

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

Zulip(config).then(async (client) => {
    const user_id1 = 9;
    const user_id2 = 10;

    const typingParams = {
        op: "start",
        to: [user_id1, user_id2],
    };

    // The user has started to type in the group PM with Iago and Polonius
    return await client.typing.send(typingParams);
}).then(console.log).catch(console.err);

curl -sSX POST https://zulip.dioco.io/api/v1/typing \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    -d 'op=start' \
    --data-urlencode to='[9, 10]'

Parameters

op required

Example: start

Whether the user has started (start) or stopped (stop) to type.

Must be one of: start, stop.


to required

Example: [9, 10]

The user_ids of the recipients of the message being typed. Typing notifications are only supported for private messages. Send a JSON-encoded list of user_ids. (Use a list even if there is only one recipient.).

Changes: Before Zulip 2.0, this parameter accepted only a JSON-encoded list of email addresses. Support for the email address-based format was removed in Zulip 3.0 (feature level 11).


Response

Example response

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}