2021-05-22 13:21:18 +02:00
|
|
|
{generate_api_title(/realm/emoji/{emoji_name}:post)}
|
2018-12-12 19:49:14 +01:00
|
|
|
|
2020-04-28 20:00:46 +02:00
|
|
|
{generate_api_description(/realm/emoji/{emoji_name}:post)}
|
2018-12-12 19:49:14 +01:00
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
|
|
|
{start_tabs}
|
|
|
|
|
|
|
|
{tab|python}
|
|
|
|
|
2019-07-11 12:45:26 +02:00
|
|
|
{generate_code_example(python)|/realm/emoji/{emoji_name}:post|example}
|
2018-12-12 19:49:14 +01:00
|
|
|
|
|
|
|
{tab|curl}
|
|
|
|
|
2019-10-16 13:06:31 +02:00
|
|
|
{generate_code_example(curl)|/realm/emoji/{emoji_name}:post|example}
|
2018-12-12 19:49:14 +01:00
|
|
|
|
|
|
|
{end_tabs}
|
|
|
|
|
|
|
|
|
2020-06-18 15:35:25 +02:00
|
|
|
## Parameters
|
2018-12-12 19:49:14 +01:00
|
|
|
|
|
|
|
As described above, the image file to upload must be provided in the
|
|
|
|
request's body.
|
|
|
|
|
|
|
|
## Emoji name
|
|
|
|
|
|
|
|
The emoji name can only contain letters, numbers, dashes, and spaces.
|
|
|
|
Upper and lower case letters are treated the same, and underscores (_)
|
|
|
|
are treated the same as spaces (consistent with how the Zulip UI
|
|
|
|
handles emoji).
|
|
|
|
|
|
|
|
## Maximum file size
|
|
|
|
|
|
|
|
The maximum file size for uploads can be configured by the
|
2021-05-29 09:04:19 +02:00
|
|
|
administrator of the Zulip server by setting `MAX_EMOJI_FILE_SIZE_MIB`
|
|
|
|
in the [server's settings][1]. `MAX_EMOJI_FILE_SIZE_MIB` defaults
|
2018-12-12 19:49:14 +01:00
|
|
|
to 5MB.
|
|
|
|
|
|
|
|
[1]: https://zulip.readthedocs.io/en/latest/subsystems/settings.html#server-settings
|
|
|
|
|
|
|
|
## Response
|
|
|
|
#### Example response
|
|
|
|
|
2019-07-11 12:45:26 +02:00
|
|
|
{generate_code_example|/realm/emoji/{emoji_name}:post|fixture(200)}
|
2021-06-07 22:53:29 +02:00
|
|
|
|
|
|
|
{generate_code_example|/realm/emoji/{emoji_name}:post|fixture(400)}
|