Update user status
This endpoint is only available to organization administrators.
POST https://chat.zulip.org/api/v1/users/{user_id}/status
Administrator endpoint for changing the status of
another user.
Usage examples
curl -sSX POST https://chat.zulip.org/api/v1/users/12/status \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode 'status_text=on vacation' \
--data-urlencode emoji_name=car \
--data-urlencode emoji_code=1f697 \
--data-urlencode reaction_type=unicode_emoji
Parameters
user_id integer required in path
Example: 12
status_text string optional
Example: "on vacation"
The text content of the status message. Sending the empty string
will clear the user's status.
Note: The limit on the size of the message is 60 characters.
emoji_name string optional
Example: "car"
The name for the emoji to associate with this status.
Changes: New in Zulip 5.0 (feature level 86).
emoji_code string optional
Example: "1f697"
A unique identifier, defining the specific emoji codepoint requested,
within the namespace of the reaction_type
.
Changes: New in Zulip 5.0 (feature level 86).
reaction_type string optional
Example: "unicode_emoji"
A string indicating the type of emoji. Each emoji reaction_type
has an independent namespace for values of emoji_code
.
Must be one of the following values:
-
unicode_emoji
: In this namespace, emoji_code
will be a
dash-separated hex encoding of the sequence of Unicode codepoints
that define this emoji in the Unicode specification.
-
realm_emoji
: In this namespace, emoji_code
will be the ID of
the uploaded custom emoji.
-
zulip_extra_emoji
: These are special emoji included with Zulip.
In this namespace, emoji_code
will be the name of the emoji (e.g.
"zulip").
Changes: New in Zulip 5.0 (feature level 86).
Response
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:
{
"msg": "",
"result": "success"
}
An example JSON error response user making request does not have permission to update other user's status.:
{
"code": "BAD_REQUEST",
"msg": "Insufficient permission",
"result": "error"
}
An example JSON error response when no changes were requested:
{
"code": "BAD_REQUEST",
"msg": "Client did not pass any new values.",
"result": "error"
}
An example JSON error response when the
status_text
message exceeds the limit of
60 characters:
{
"code": "BAD_REQUEST",
"msg": "status_text is too long (limit: 60 characters)",
"result": "error"
}
An example JSON error response when emoji_name
is not specified
but emoji_code
or reaction_type
is specified:
{
"code": "BAD_REQUEST",
"msg": "Client must pass emoji_name if they pass either emoji_code or reaction_type.",
"result": "error"
}
An example JSON error response when the emoji name does not exist:
{
"code": "BAD_REQUEST",
"msg": "Emoji 'invalid' does not exist",
"result": "error"
}
An example JSON error response when the emoji name is invalid:
{
"code": "BAD_REQUEST",
"msg": "Invalid emoji name.",
"result": "error"
}
An example JSON error response when the custom emoji is invalid:
{
"code": "BAD_REQUEST",
"msg": "Invalid custom emoji.",
"result": "error"
}