Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

openapi: Validate real requests and responses, not fictional mocks.

Anders Kaseorg029e765e2075
diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py
index 2cc6daf8b26..07126f2b35b 100644
--- a/zerver/lib/test_classes.py
+++ b/zerver/lib/test_classes.py
@@ -36,16 +36,18 @@ from django.db import connection
from django.db.migrations.executor import MigrationExecutor
from django.db.migrations.state import StateApps
from django.db.utils import IntegrityError
-from django.http import HttpRequest, HttpResponse
+from django.http import HttpRequest, HttpResponse, HttpResponseBase
from django.http.response import ResponseHeaders
+from django.test import Client as TestClient
from django.test import SimpleTestCase, TestCase, TransactionTestCase
-from django.test.client import BOUNDARY, MULTIPART_CONTENT, encode_multipart
+from django.test.client import BOUNDARY, MULTIPART_CONTENT, ClientHandler, encode_multipart
from django.test.testcases import SerializeMixin
from django.urls import resolve
from django.utils import translation
from django.utils.module_loading import import_string
from django.utils.timezone import now as timezone_now
from fakeldap import MockLDAP
+from openapi_core.contrib.django import DjangoOpenAPIRequest, DjangoOpenAPIResponse
from requests import PreparedRequest
from two_factor.plugins.phonenumber.models import PhoneDevice
from typing_extensions import override
@@ -112,7 +114,7 @@ from zerver.models.groups import SystemGroups
from zerver.models.realms import clear_supported_auth_backends_cache, get_realm
from zerver.models.streams import get_realm_stream, get_stream
from zerver.models.users import get_system_bot, get_user, get_user_by_delivery_email
-from zerver.openapi.openapi import validate_against_openapi_schema, validate_request
+from zerver.openapi.openapi import validate_test_request, validate_test_response
from zerver.tornado.event_queue import clear_client_event_queues_for_testing
if settings.ZILENCER_ENABLED:
@@ -147,6 +149,36 @@ class UploadSerializeMixin(SerializeMixin):
super().setUpClass()
+class ZulipClientHandler(ClientHandler):
+ @override
+ def get_response(self, request: HttpRequest) -> HttpResponseBase:
+ request.body # noqa: B018 # prevents RawPostDataException
+ response = super().get_response(request)
+ if (
+ request.method != "OPTIONS"
+ and isinstance(response, HttpResponse)
+ and not (
+ response.status_code == 302 and response.headers["Location"].startswith("/login/")
+ )
+ ):
+ openapi_request = DjangoOpenAPIRequest(request)
+ openapi_response = DjangoOpenAPIResponse(response)
+ response_validated = validate_test_response(openapi_request, openapi_response)
+ if response_validated:
+ validate_test_request(
+ openapi_request,
+ str(response.status_code),
+ request.META.get("intentionally_undocumented", False),
+ )
+ return response
+
+
+class ZulipTestClient(TestClient):
+ def __init__(self) -> None:
+ super().__init__()
+ self.handler = ZulipClientHandler(enforce_csrf_checks=False)
+
+
class ZulipTestCaseMixin(SimpleTestCase):
# Ensure that the test system just shows us diffs
maxDiff: Optional[int] = None
@@ -154,6 +186,7 @@ class ZulipTestCaseMixin(SimpleTestCase):
# Override this to verify if the given extra console output matches the
# expectation.
expected_console_output: Optional[str] = None
+ client_class = ZulipTestClient
@override
def setUp(self) -> None:
@@ -266,63 +299,6 @@ Output:
elif "HTTP_USER_AGENT" not in extra:
extra["HTTP_USER_AGENT"] = default_user_agent
- def extract_api_suffix_url(self, url: str) -> Tuple[str, Dict[str, List[str]]]:
- """
- Function that extracts the URL after `/api/v1` or `/json` and also
- returns the query data in the URL, if there is any.
- """
- url_split = url.split("?")
- data = {}
- if len(url_split) == 2:
- data = parse_qs(url_split[1])
- url = url_split[0]
- url = url.replace("/json/", "/").replace("/api/v1/", "/")
- return (url, data)
-
- def validate_api_response_openapi(
- self,
- url: str,
- method: str,
- result: "TestHttpResponse",
- data: Union[str, bytes, Mapping[str, Any]],
- extra: Dict[str, str],
- intentionally_undocumented: bool = False,
- ) -> None:
- """
- Validates all API responses received by this test against Zulip's API documentation,
- declared in zerver/openapi/zulip.yaml. This powerful test lets us use Zulip's
- extensive test coverage of corner cases in the API to ensure that we've properly
- documented those corner cases.
- """
- if not url.startswith(("/json", "/api/v1")):
- return
- try:
- content = orjson.loads(result.content)
- except orjson.JSONDecodeError:
- return
- json_url = False
- if url.startswith("/json"):
- json_url = True
- url, query_data = self.extract_api_suffix_url(url)
- if len(query_data) != 0:
- # In some cases the query parameters are defined in the URL itself. In such cases
- # The `data` argument of our function is not used. Hence get `data` argument
- # from url.
- data = query_data
- response_validated = validate_against_openapi_schema(
- content, url, method, str(result.status_code)
- )
- if response_validated:
- validate_request(
- url,
- method,
- data,
- extra,
- json_url,
- str(result.status_code),
- intentionally_undocumented=intentionally_undocumented,
- )
-
@instrument_url
def client_patch(
self,
@@ -342,18 +318,15 @@ Output:
extra["content_type"] = "application/x-www-form-urlencoded"
django_client = self.client # see WRAPPER_COMMENT
self.set_http_headers(extra, skip_user_agent)
- result = django_client.patch(
- url, encoded, follow=follow, secure=secure, headers=headers, **extra
- )
- self.validate_api_response_openapi(
+ return django_client.patch(
url,
- "patch",
- result,
- info,
- extra,
+ encoded,
+ follow=follow,
+ secure=secure,
+ headers=headers,
intentionally_undocumented=intentionally_undocumented,
+ **extra,
)
- return result
@instrument_url
def client_patch_multipart(
@@ -378,24 +351,16 @@ Output:
encoded = encode_multipart(BOUNDARY, dict(info))
django_client = self.client # see WRAPPER_COMMENT
self.set_http_headers(extra, skip_user_agent)
- result = django_client.patch(
+ return django_client.patch(
url,
encoded,
content_type=MULTIPART_CONTENT,
follow=follow,
secure=secure,
headers=headers,
- **extra,
- )
- self.validate_api_response_openapi(
- url,
- "patch",
- result,
- info,
- extra,
intentionally_undocumented=intentionally_undocumented,
+ **extra,
)
- return result
def json_patch(
self,
@@ -477,7 +442,7 @@ Output:
extra["content_type"] = "application/x-www-form-urlencoded"
django_client = self.client # see WRAPPER_COMMENT
self.set_http_headers(extra, skip_user_agent)
- result = django_client.delete(
+ return django_client.delete(
url,
encoded,
follow=follow,
@@ -486,17 +451,9 @@ Output:
"Content-Type": "application/x-www-form-urlencoded", # https://code.djangoproject.com/ticket/33230
**(headers or {}),
},
- **extra,
- )
- self.validate_api_response_openapi(
- url,
- "delete",
- result,
- info,
- extra,
intentionally_undocumented=intentionally_undocumented,
+ **extra,
)
- return result
@instrument_url
def client_options(
@@ -554,7 +511,7 @@ Output:
encoded = urlencode(info, doseq=True)
else:
content_type = MULTIPART_CONTENT
- result = django_client.post(
+ return django_client.post(
url,
encoded,
follow=follow,
@@ -564,17 +521,9 @@ Output:
**(headers or {}),
},
content_type=content_type,
- **extra,
- )
- self.validate_api_response_openapi(
- url,
- "post",
- result,
- info,
- extra,
intentionally_undocumented=intentionally_undocumented,
+ **extra,
)
- return result
@instrument_url
def client_post_request(self, url: str, req: Any) -> "TestHttpResponse":
@@ -604,13 +553,15 @@ Output:
) -> "TestHttpResponse":
django_client = self.client # see WRAPPER_COMMENT
self.set_http_headers(extra, skip_user_agent)
- result = django_client.get(
- url, info, follow=follow, secure=secure, headers=headers, **extra
- )
- self.validate_api_response_openapi(
- url, "get", result, info, extra, intentionally_undocumented=intentionally_undocumented
+ return django_client.get(
+ url,
+ info,
+ follow=follow,
+ secure=secure,
+ headers=headers,
+ intentionally_undocumented=intentionally_undocumented,
+ **extra,
)
- return result
example_user_map = dict(
diff --git a/zerver/openapi/openapi.py b/zerver/openapi/openapi.py
index e9221d36248..51525c133f8 100644
--- a/zerver/openapi/openapi.py
+++ b/zerver/openapi/openapi.py
@@ -12,6 +12,7 @@ from typing import Any, Dict, List, Literal, Mapping, Optional, Set, Tuple, Unio
import orjson
from openapi_core import OpenAPI
+from openapi_core.protocols import Request, Response
from openapi_core.testing import MockRequest, MockResponse
from openapi_core.validation.exceptions import ValidationError as OpenAPIValidationError
from pydantic import BaseModel
@@ -423,10 +424,29 @@ def find_openapi_endpoint(path: str) -> Optional[str]:
def validate_against_openapi_schema(
content: Dict[str, Any], path: str, method: str, status_code: str
) -> bool:
+ mock_request = MockRequest("http://localhost:9991/", method, "/api/v1" + path)
+ mock_response = MockResponse(
+ orjson.dumps(content),
+ status_code=int(status_code),
+ )
+ return validate_test_response(mock_request, mock_response)
+
+
+def validate_test_response(request: Request, response: Response) -> bool:
"""Compare a "content" dict with the defined schema for a specific method
in an endpoint. Return true if validated and false if skipped.
"""
+ if request.path.startswith("/json/"):
+ path = request.path[len("/json") :]
+ elif request.path.startswith("/api/v1/"):
+ path = request.path[len("/api/v1") :]
+ else:
+ return False
+ assert request.method is not None
+ method = request.method.lower()
+ status_code = str(response.status_code)
+
# This first set of checks are primarily training wheels that we
# hope to eliminate over time as we improve our API documentation.
@@ -452,14 +472,8 @@ def validate_against_openapi_schema(
# response have been defined this should be removed.
return True
- mock_request = MockRequest("http://localhost:9991/", method, "/api/v1" + path)
- mock_response = MockResponse(
- # TODO: Use original response content instead of re-serializing it.
- orjson.dumps(content),
- status_code=int(status_code),
- )
try:
- openapi_spec.spec().validate_response(mock_request, mock_response)
+ openapi_spec.spec().validate_response(request, response)
except OpenAPIValidationError as error:
message = f"Response validation error at {method} /api/v1{path} ({status_code}):"
message += f"\n\n{type(error).__name__}: {error}"
@@ -529,10 +543,33 @@ def validate_request(
status_code: str,
intentionally_undocumented: bool = False,
) -> None:
- # Some JSON endpoints have different parameters compared to
- # their `/api/v1` counterparts.
- if json_url and (url, method) in SKIP_JSON:
- return
+ assert isinstance(data, dict)
+ mock_request = MockRequest(
+ "http://localhost:9991/",
+ method,
+ "/api/v1" + url,
+ headers=http_headers,
+ args={k: str(v) for k, v in data.items()},
+ )
+ validate_test_request(mock_request, status_code, intentionally_undocumented)
+
+
+def validate_test_request(
+ request: Request,
+ status_code: str,
+ intentionally_undocumented: bool = False,
+) -> None:
+ assert request.method is not None
+ method = request.method.lower()
+ if request.path.startswith("/json/"):
+ url = request.path[len("/json") :]
+ # Some JSON endpoints have different parameters compared to
+ # their `/api/v1` counterparts.
+ if (url, method) in SKIP_JSON:
+ return
+ else:
+ assert request.path.startswith("/api/v1/")
+ url = request.path[len("/api/v1") :]
# TODO: Add support for file upload endpoints that lack the /json/
# or /api/v1/ prefix.
@@ -550,16 +587,8 @@ def validate_request(
# Now using the openapi_core APIs, validate the request schema
# against the OpenAPI documentation.
- assert isinstance(data, dict)
- mock_request = MockRequest(
- "http://localhost:9991/",
- method,
- "/api/v1" + url,
- headers=http_headers,
- args={k: str(v) for k, v in data.items()},
- )
try:
- openapi_spec.spec().validate_request(mock_request)
+ openapi_spec.spec().validate_request(request)
except OpenAPIValidationError as error:
# Show a block error message explaining the options for fixing it.
msg = f"""
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 9d38de759e3..8302ac4621f 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -33,6 +33,8 @@ servers:
- url: "https://chat.zulip.org/api/v1"
# Development server
- url: "http://localhost:9991/api/v1"
+ # Test suite
+ - url: "http://{subdomain}.testserver/json"
security:
- basicAuth: []
#######################
@@ -69,27 +71,30 @@ paths:
In a [Zulip development environment](https://zulip.readthedocs.io/en/latest/development/overview.html),
see also [the unauthenticated variant](/api/dev-fetch-api-key).
- parameters:
- - name: username
- in: query
- description: |
- The username to be used for authentication (typically, the email
- address, but depending on configuration, it could be an LDAP username).
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ username:
+ description: |
+ The username to be used for authentication (typically, the email
+ address, but depending on configuration, it could be an LDAP username).
- See the `require_email_format_usernames` parameter documented in
- [GET /server_settings](/api/get-server-settings) for details.
- schema:
- type: string
- required: true
- - name: password
- in: query
- schema:
- type: string
- example: abcd1234
- description: |
- The user's Zulip password (or LDAP password, if LDAP authentication is in use).
- required: true
+ See the `require_email_format_usernames` parameter documented in
+ [GET /server_settings](/api/get-server-settings) for details.
+ type: string
+ password:
+ type: string
+ example: abcd1234
+ description: |
+ The user's Zulip password (or LDAP password, if LDAP authentication is in use).
+ required:
+ - username
+ - password
security: []
responses:
"200":
@@ -116,15 +121,20 @@ paths:
**Note:** This endpoint is only available on Zulip development
servers; for obvious security reasons it will always return an error
in a Zulip production server.
- parameters:
- - name: username
- in: query
- description: |
- The email address for the user that owns the API key.
- schema:
- type: string
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ username:
+ description: |
+ The email address for the user that owns the API key.
+ type: string
+ required:
+ - username
security: []
responses:
"200":
@@ -4975,8 +4985,21 @@ paths:
tags: ["real_time_events"]
description: |
Delete a previously registered queue.
- parameters:
- - $ref: "#/components/parameters/QueueId"
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ queue_id:
+ description: |
+ The ID of an event queue that was previously registered via
+ `POST /api/v1/register` (see [Register a queue](/api/register-queue)).
+ type: string
+ example: fb67bf8a-c031-47cc-84cf-ed80accacda8
+ required:
+ - queue_id
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -5108,15 +5131,23 @@ paths:
**Changes**: Deprecated; clients should use the [update personal message
flags for narrow](/api/update-message-flags-for-narrow) endpoint instead
as this endpoint will be removed in a future release.
- parameters:
- - name: stream_id
- in: query
- description: |
- The ID of the stream to access.
- schema:
- type: integer
- example: 43
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ stream_id:
+ description: |
+ The ID of the stream to access.
+ type: integer
+ example: 43
+ required:
+ - stream_id
+ encoding:
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -5132,23 +5163,29 @@ paths:
**Changes**: Deprecated; clients should use the [update personal message
flags for narrow](/api/update-message-flags-for-narrow) endpoint instead
as this endpoint will be removed in a future release.
- parameters:
- - name: stream_id
- in: query
- description: |
- The ID of the stream to access.
- schema:
- type: integer
- example: 43
- required: true
- - name: topic_name
- in: query
- description: |
- The name of the topic whose messages should be marked as read.
- schema:
- type: string
- example: new coffee machine
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ stream_id:
+ description: |
+ The ID of the stream to access.
+ type: integer
+ example: 43
+ topic_name:
+ description: |
+ The name of the topic whose messages should be marked as read.
+ type: string
+ example: new coffee machine
+ required:
+ - stream_id
+ - topic_name
+ encoding:
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -5338,27 +5375,32 @@ paths:
description: |
Create one or more drafts on the server. These drafts will be automatically
synchronized to other clients via `drafts` events.
- parameters:
- - name: drafts
- in: query
- description: |
- A JSON-encoded list of containing new draft objects.
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: "#/components/schemas/Draft"
- example:
- [
- {
- "type": "stream",
- "to": [1],
- "topic": "questions",
- "content": "What are the contribution guidelines for this project?",
- "timestamp": 1595479019,
- },
- ]
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ drafts:
+ description: |
+ A JSON-encoded list of containing new draft objects.
+ type: array
+ items:
+ $ref: "#/components/schemas/Draft"
+ example:
+ [
+ {
+ "type": "stream",
+ "to": [1],
+ "topic": "questions",
+ "content": "What are the contribution guidelines for this project?",
+ "timestamp": 1595479019,
+ },
+ ]
+ encoding:
+ drafts:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -5413,23 +5455,31 @@ paths:
The ID of the draft to be edited.
required: true
example: 2
- - name: draft
- in: query
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Draft"
- example:
- {
- "type": "stream",
- "to": [1],
- "topic": "questions",
- "content": "how tough is a Lamy Safari?",
- "timestamp": 1595479019,
- }
- description: |
- A JSON-encoded object containing a replacement draft object for this ID.
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ draft:
+ allOf:
+ - $ref: "#/components/schemas/Draft"
+ - description: |
+ A JSON-encoded object containing a replacement draft object for this ID.
+ example:
+ {
+ "type": "stream",
+ "to": [1],
+ "topic": "questions",
+ "content": "how tough is a Lamy Safari?",
+ "timestamp": 1595479019,
+ }
+ required:
+ - draft
+ encoding:
+ draft:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -5549,79 +5599,82 @@ paths:
parameter from this endpoint.
New in Zulip 7.0 (feature level 179).
- parameters:
- - name: type
- in: query
- description: |
- The type of scheduled message to be sent. `"direct"` for a direct
- message and `"stream"` for a stream message.
-
- In Zulip 7.0 (feature level 174), `"direct"` was added as the
- preferred way to indicate the type of a direct message, deprecating
- the original `"private"`. While `"private"` is supported for
- scheduling direct messages, clients are encouraged to use to the
- modern convention because support for `"private"` may eventually
- be removed.
- schema:
- type: string
- enum:
- - direct
- - stream
- - private
- example: direct
- required: true
- - name: to
- in: query
- description: |
- The scheduled message's tentative target audience.
-
- For stream messages, the integer ID of the stream.
- For direct messages, a list containing integer user IDs.
- content:
- application/json:
- schema:
- oneOf:
- - type: integer
- - type: array
- items:
- type: integer
- minLength: 1
- example: [9, 10]
- required: true
- - $ref: "#/components/parameters/RequiredContent"
- - name: topic
- in: query
- description: |
- The topic of the message. Only required for stream messages
- (`"type": "stream"`), ignored otherwise.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ type:
+ description: |
+ The type of scheduled message to be sent. `"direct"` for a direct
+ message and `"stream"` for a stream message.
+
+ In Zulip 7.0 (feature level 174), `"direct"` was added as the
+ preferred way to indicate the type of a direct message, deprecating
+ the original `"private"`. While `"private"` is supported for
+ scheduling direct messages, clients are encouraged to use to the
+ modern convention because support for `"private"` may eventually
+ be removed.
+ type: string
+ enum:
+ - direct
+ - stream
+ - private
+ example: direct
+ to:
+ description: |
+ The scheduled message's tentative target audience.
- Clients should use the `max_topic_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum topic length.
- schema:
- type: string
- example: Castle
- allowEmptyValue: true
- - name: scheduled_delivery_timestamp
- in: query
- schema:
- type: integer
- description: |
- The UNIX timestamp for when the message will be sent,
- in UTC seconds.
- required: true
- example: 3165826990
- - name: read_by_sender
- in: query
- schema:
- type: boolean
- description: |
- Whether the message should be initially marked read by its
- sender. If unspecified, the server uses a heuristic based
- on the client name and the recipient.
+ For stream messages, the integer ID of the stream.
+ For direct messages, a list containing integer user IDs.
+ oneOf:
+ - type: integer
+ - type: array
+ items:
+ type: integer
+ minLength: 1
+ example: [9, 10]
+ content:
+ $ref: "#/components/schemas/RequiredContent"
+ topic:
+ description: |
+ The topic of the message. Only required for stream messages
+ (`"type": "stream"`), ignored otherwise.
- **Changes**: New in Zulip 8.0 (feature level 236).
- example: true
+ Clients should use the `max_topic_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum topic length.
+ type: string
+ example: Castle
+ scheduled_delivery_timestamp:
+ type: integer
+ description: |
+ The UNIX timestamp for when the message will be sent,
+ in UTC seconds.
+ example: 3165826990
+ read_by_sender:
+ type: boolean
+ description: |
+ Whether the message should be initially marked read by its
+ sender. If unspecified, the server uses a heuristic based
+ on the client name and the recipient.
+
+ **Changes**: New in Zulip 8.0 (feature level 236).
+ example: true
+ required:
+ - type
+ - to
+ - content
+ - scheduled_delivery_timestamp
+ encoding:
+ to:
+ contentType: application/json
+ scheduled_delivery_timestamp:
+ contentType: application/json
+ read_by_sender:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -5691,88 +5744,88 @@ paths:
after being sent.
required: true
example: 2
- - name: type
- in: query
- description: |
- The type of scheduled message to be sent. `"direct"` for a direct
- message and `"stream"` for a stream message.
-
- When updating the type of the scheduled message, the `to` parameter
- is required. And, if updating the type of the scheduled message to
- `"stream"`, then the `topic` parameter is also required.
-
- In Zulip 7.0 (feature level 174), `"direct"` was added as the
- preferred way to indicate the type of a direct message, deprecating
- the original `"private"`. While `"private"` is supported for
- scheduling direct messages, clients are encouraged to use to the
- modern convention because support for `"private"` may eventually
- be removed.
- schema:
- type: string
- enum:
- - direct
- - stream
- - private
- example: stream
- - name: to
- in: query
- description: |
- The scheduled message's tentative target audience.
-
- For stream messages, the integer ID of the stream.
- For direct messages, a list containing integer user IDs.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ type:
+ description: |
+ The type of scheduled message to be sent. `"direct"` for a direct
+ message and `"stream"` for a stream message.
+
+ When updating the type of the scheduled message, the `to` parameter
+ is required. And, if updating the type of the scheduled message to
+ `"stream"`, then the `topic` parameter is also required.
+
+ In Zulip 7.0 (feature level 174), `"direct"` was added as the
+ preferred way to indicate the type of a direct message, deprecating
+ the original `"private"`. While `"private"` is supported for
+ scheduling direct messages, clients are encouraged to use to the
+ modern convention because support for `"private"` may eventually
+ be removed.
+ type: string
+ enum:
+ - direct
+ - stream
+ - private
+ example: stream
+ to:
+ description: |
+ The scheduled message's tentative target audience.
- Required when updating the `type` of the scheduled message.
- content:
- application/json:
- schema:
- oneOf:
- - type: integer
- - type: array
- items:
- type: integer
- minLength: 1
- example: 8
- - name: content
- in: query
- description: |
- The updated content of the scheduled message.
+ For stream messages, the integer ID of the stream.
+ For direct messages, a list containing integer user IDs.
- Clients should use the `max_message_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum message size.
- schema:
- type: string
- example: Hello
- - name: topic
- in: query
- description: |
- The updated topic of the scheduled message.
+ Required when updating the `type` of the scheduled message.
+ oneOf:
+ - type: integer
+ - type: array
+ items:
+ type: integer
+ minLength: 1
+ example: 8
+ content:
+ description: |
+ The updated content of the scheduled message.
- Required when updating the `type` of the scheduled message to
- `"stream"`. Ignored when the existing or updated `type` of the
- scheduled message is `"direct"` (or `"private"`).
+ Clients should use the `max_message_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum message size.
+ type: string
+ example: Hello
+ topic:
+ description: |
+ The updated topic of the scheduled message.
- Clients should use the `max_topic_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum topic length.
- schema:
- type: string
- example: Castle
- - name: scheduled_delivery_timestamp
- in: query
- schema:
- type: integer
- description: |
- The UNIX timestamp for when the message will be sent,
- in UTC seconds.
+ Required when updating the `type` of the scheduled message to
+ `"stream"`. Ignored when the existing or updated `type` of the
+ scheduled message is `"direct"` (or `"private"`).
- Required when updating a scheduled message that the server
- has already tried and failed to send. This state is indicated
- with `"failed": true` in `scheduled_messages` objects; see
- response description at
- [`GET /scheduled_messages`](/api/get-scheduled-messages#response).
- example: 3165826990
+ Clients should use the `max_topic_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum topic length.
+ type: string
+ example: Castle
+ scheduled_delivery_timestamp:
+ type: integer
+ description: |
+ The UNIX timestamp for when the message will be sent,
+ in UTC seconds.
+
+ Required when updating a scheduled message that the server
+ has already tried and failed to send. This state is indicated
+ with `"failed": true` in `scheduled_messages` objects; see
+ response description at
+ [`GET /scheduled_messages`](/api/get-scheduled-messages#response).
+ example: 3165826990
+ encoding:
+ to:
+ contentType: application/json
+ scheduled_delivery_timestamp:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -5865,15 +5918,23 @@ paths:
for new users joining the organization.
[default-streams]: /help/set-default-streams-for-new-users
- parameters:
- - name: stream_id
- in: query
- description: |
- The ID of the target stream.
- schema:
- type: integer
- example: 7
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ stream_id:
+ description: |
+ The ID of the target stream.
+ type: integer
+ example: 7
+ required:
+ - stream_id
+ encoding:
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -5908,15 +5969,23 @@ paths:
[default-streams]: /help/set-default-streams-for-new-users
x-requires-administrator: true
- parameters:
- - name: stream_id
- in: query
- description: |
- The ID of the target stream.
- schema:
- type: integer
- example: 7
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ stream_id:
+ description: |
+ The ID of the target stream.
+ type: integer
+ example: 7
+ required:
+ - stream_id
+ encoding:
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -6303,103 +6372,103 @@ paths:
description: |
Send a [stream message](/help/streams-and-topics) or a
[direct message](/help/direct-messages).
- parameters:
- - name: type
- in: query
- description: |
- The type of message to be sent.
-
- `"direct"` for a direct message and `"stream"` for a stream message.
-
- **Changes**: In Zulip 7.0 (feature level 174), `"direct"` was added as
- the preferred way to request a direct message, deprecating the original
- `"private"`. While `"private"` is still supported for requesting direct
- messages, clients are encouraged to use to the modern convention with
- servers that support it, because support for `"private"` will eventually
- be removed.
- schema:
- type: string
- enum:
- - direct
- - stream
- - private
- example: direct
- required: true
- - name: to
- in: query
- description: |
- For stream messages, either the name or integer ID of the stream. For
- direct messages, either a list containing integer user IDs or a list
- containing string Zulip API email addresses.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ type:
+ description: |
+ The type of message to be sent.
- **Changes**: Support for using user/stream IDs was added in Zulip 2.0.0.
- content:
- application/json:
- schema:
- oneOf:
- - type: string
- - type: integer
- - type: array
- items:
- type: string
- - type: array
- items:
- type: integer
- minLength: 1
- example: [9, 10]
- required: true
- - $ref: "#/components/parameters/RequiredContent"
- - name: topic
- in: query
- description: |
- The topic of the message. Only required for stream messages
- (`"type": "stream"`), ignored otherwise.
+ `"direct"` for a direct message and `"stream"` for a stream message.
- Clients should use the `max_topic_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum topic length.
+ **Changes**: In Zulip 7.0 (feature level 174), `"direct"` was added as
+ the preferred way to request a direct message, deprecating the original
+ `"private"`. While `"private"` is still supported for requesting direct
+ messages, clients are encouraged to use to the modern convention with
+ servers that support it, because support for `"private"` will eventually
+ be removed.
+ type: string
+ enum:
+ - direct
+ - stream
+ - private
+ example: direct
+ to:
+ description: |
+ For stream messages, either the name or integer ID of the stream. For
+ direct messages, either a list containing integer user IDs or a list
+ containing string Zulip API email addresses.
- **Changes**: New in Zulip 2.0.0. Previous Zulip releases encoded
- this as `subject`, which is currently a deprecated alias.
- schema:
- type: string
- example: Castle
- - name: queue_id
- in: query
- schema:
- type: string
- description: |
- For clients supporting
- [local echo](https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html#local-echo),
- the [event queue](/api/register-queue)
- ID for the client. If passed, `local_id` is required. If the message is
- successfully sent, the server will include `local_id` in the `message` event
- that the client with this `queue_id` will receive notifying it of the new message
- via [`GET /events`](/api/get-events). This lets the client know unambiguously
- that it should replace the locally echoed message, rather than adding this new
- message (which would be correct if the user had sent the new message from another
- device).
- example: "fb67bf8a-c031-47cc-84cf-ed80accacda8"
- - name: local_id
- in: query
- schema:
- type: string
- description: |
- For clients supporting local echo, a unique string-format identifier
- chosen freely by the client; the server will pass it back to the client without
- inspecting it, as described in the `queue_id` description.
- example: "100.01"
- - name: read_by_sender
- in: query
- schema:
- type: boolean
- description: |
- Whether the message should be initially marked read by its
- sender. If unspecified, the server uses a heuristic based
- on the client name.
+ **Changes**: Support for using user/stream IDs was added in Zulip 2.0.0.
+ oneOf:
+ - type: string
+ - type: integer
+ - type: array
+ items:
+ type: string
+ - type: array
+ items:
+ type: integer
+ minLength: 1
+ example: [9, 10]
+ content:
+ $ref: "#/components/schemas/RequiredContent"
+ topic:
+ description: |
+ The topic of the message. Only required for stream messages
+ (`"type": "stream"`), ignored otherwise.
- **Changes**: New in Zulip 8.0 (feature level 236).
- example: true
+ Clients should use the `max_topic_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum topic length.
+
+ **Changes**: New in Zulip 2.0.0. Previous Zulip releases encoded
+ this as `subject`, which is currently a deprecated alias.
+ type: string
+ example: Castle
+ queue_id:
+ type: string
+ description: |
+ For clients supporting
+ [local echo](https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html#local-echo),
+ the [event queue](/api/register-queue)
+ ID for the client. If passed, `local_id` is required. If the message is
+ successfully sent, the server will include `local_id` in the `message` event
+ that the client with this `queue_id` will receive notifying it of the new message
+ via [`GET /events`](/api/get-events). This lets the client know unambiguously
+ that it should replace the locally echoed message, rather than adding this new
+ message (which would be correct if the user had sent the new message from another
+ device).
+ example: "fb67bf8a-c031-47cc-84cf-ed80accacda8"
+ local_id:
+ type: string
+ description: |
+ For clients supporting local echo, a unique string-format identifier
+ chosen freely by the client; the server will pass it back to the client without
+ inspecting it, as described in the `queue_id` description.
+ example: "100.01"
+ read_by_sender:
+ type: boolean
+ description: |
+ Whether the message should be initially marked read by its
+ sender. If unspecified, the server uses a heuristic based
+ on the client name.
+
+ **Changes**: New in Zulip 8.0 (feature level 236).
+ example: true
+ required:
+ - type
+ - to
+ - content
+ encoding:
+ to:
+ contentType: application/json
+ read_by_sender:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -6777,38 +6846,40 @@ paths:
</tbody>
</table>
</div>
- parameters:
- - name: messages
- in: query
- description: |
- An array containing the IDs of the target messages.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [4, 8, 15]
- required: true
- - name: op
- in: query
- description: |
- Whether to `add` the flag or `remove` it.
- schema:
- type: string
- enum:
- - add
- - remove
- example: add
- required: true
- - name: flag
- in: query
- description: |
- The flag that should be added/removed.
- schema:
- type: string
- example: read
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ messages:
+ description: |
+ An array containing the IDs of the target messages.
+ type: array
+ items:
+ type: integer
+ example: [4, 8, 15]
+ op:
+ description: |
+ Whether to `add` the flag or `remove` it.
+ type: string
+ enum:
+ - add
+ - remove
+ example: add
+ flag:
+ description: |
+ The flag that should be added/removed.
+ type: string
+ example: read
+ required:
+ - messages
+ - op
+ - flag
+ encoding:
+ messages:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -6849,114 +6920,115 @@ paths:
parameters:
enum:
- include_anchor
- parameters:
- - name: anchor
- in: query
- description: |
- Integer message ID to anchor updating of flags. Supports special
- string values for when the client wants the server to compute the anchor
- to use:
-
- - `newest`: The most recent message.
- - `oldest`: The oldest message.
- - `first_unread`: The oldest unread message matching the
- query, if any; otherwise, the most recent message.
- schema:
- $ref: "#/components/schemas/Anchor"
- example: "43"
- required: true
- - name: include_anchor
- in: query
- description: |
- Whether a message with the specified ID matching the narrow
- should be included in the update range.
- schema:
- type: boolean
- default: true
- example: false
- - name: num_before
- in: query
- description: |
- Limit the number of messages preceding the anchor in the
- update range. The server may decrease this to bound
- transaction sizes.
- schema:
- type: integer
- minimum: 0
- example: 4
- required: true
- - name: num_after
- in: query
- description: |
- Limit the number of messages following the anchor in the
- update range. The server may decrease this to bound
- transaction sizes.
- schema:
- type: integer
- minimum: 0
- example: 8
- required: true
- - name: narrow
- in: query
- description: |
- The narrow you want update flags within. See how to
- [construct a narrow](/api/construct-narrow).
-
- **Changes**: In Zulip 7.0 (feature level 177), narrows gained support
- for three new filters related to direct messages: `is:dm`, `dm` and
- `dm-including`; replacing and deprecating `is:private`, `pm-with` and
- `group-pm-with` respectively.
- content:
- application/json:
- schema:
- type: array
- items:
- oneOf:
- - type: object
- required:
- - operator
- - operand
- additionalProperties: false
- properties:
- operator:
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ anchor:
+ allOf:
+ - $ref: "#/components/schemas/Anchor"
+ - description: |
+ Integer message ID to anchor updating of flags. Supports special
+ string values for when the client wants the server to compute the anchor
+ to use:
+
+ - `newest`: The most recent message.
+ - `oldest`: The oldest message.
+ - `first_unread`: The oldest unread message matching the
+ query, if any; otherwise, the most recent message.
+ example: "43"
+ include_anchor:
+ description: |
+ Whether a message with the specified ID matching the narrow
+ should be included in the update range.
+ type: boolean
+ default: true
+ example: false
+ num_before:
+ description: |
+ Limit the number of messages preceding the anchor in the
+ update range. The server may decrease this to bound
+ transaction sizes.
+ type: integer
+ minimum: 0
+ example: 4
+ num_after:
+ description: |
+ Limit the number of messages following the anchor in the
+ update range. The server may decrease this to bound
+ transaction sizes.
+ type: integer
+ minimum: 0
+ example: 8
+ narrow:
+ description: |
+ The narrow you want update flags within. See how to
+ [construct a narrow](/api/construct-narrow).
+
+ **Changes**: In Zulip 7.0 (feature level 177), narrows gained support
+ for three new filters related to direct messages: `is:dm`, `dm` and
+ `dm-including`; replacing and deprecating `is:private`, `pm-with` and
+ `group-pm-with` respectively.
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - operator
+ - operand
+ additionalProperties: false
+ properties:
+ operator:
+ type: string
+ operand:
+ oneOf:
+ - type: string
+ - type: integer
+ - type: array
+ items:
+ type: integer
+ negated:
+ type: boolean
+ - type: array
+ items:
type: string
- operand:
- oneOf:
- - type: string
- - type: integer
- - type: array
- items:
- type: integer
- negated:
- type: boolean
- - type: array
- items:
- type: string
- minItems: 2
- maxItems: 2
- default: []
- example: [{"operand": "Denmark", "operator": "stream"}]
- required: true
- - name: op
- in: query
- description: |
- Whether to `add` the flag or `remove` it.
- schema:
- type: string
- enum:
- - add
- - remove
- example: add
- required: true
- - name: flag
- in: query
- description: |
- The flag that should be added/removed. See [available
- flags](/api/update-message-flags#available-flags).
- schema:
- type: string
- example: read
- required: true
+ minItems: 2
+ maxItems: 2
+ default: []
+ example: [{"operand": "Denmark", "operator": "stream"}]
+ op:
+ description: |
+ Whether to `add` the flag or `remove` it.
+ type: string
+ enum:
+ - add
+ - remove
+ example: add
+ flag:
+ description: |
+ The flag that should be added/removed. See [available
+ flags](/api/update-message-flags#available-flags).
+ type: string
+ example: read
+ required:
+ - anchor
+ - num_before
+ - num_after
+ - narrow
+ - op
+ - flag
+ encoding:
+ include_anchor:
+ contentType: application/json
+ num_before:
+ contentType: application/json
+ num_after:
+ contentType: application/json
+ narrow:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -7038,8 +7110,17 @@ paths:
tags: ["messages"]
description: |
Render a message to HTML.
- parameters:
- - $ref: "#/components/parameters/RequiredContent"
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ content:
+ $ref: "#/components/schemas/RequiredContent"
+ required:
+ - content
responses:
"200":
description: Success.
@@ -7079,21 +7160,29 @@ paths:
- reaction_type
parameters:
- $ref: "#/components/parameters/MessageId"
- - name: emoji_name
- in: query
- description: |
- The target emoji's human-readable name.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ emoji_name:
+ description: |
+ The target emoji's human-readable name.
- To find an emoji's name, hover over a message to reveal
- three icons on the right, then click the smiley face icon.
- Images of available reaction emojis appear. Hover over the
- emoji you want, and note that emoji's text name.
- schema:
- type: string
- example: "octopus"
- required: true
- - $ref: "#/components/parameters/EmojiCode"
- - $ref: "#/components/parameters/ReactionType"
+ To find an emoji's name, hover over a message to reveal
+ three icons on the right, then click the smiley face icon.
+ Images of available reaction emojis appear. Hover over the
+ emoji you want, and note that emoji's text name.
+ type: string
+ example: "octopus"
+ emoji_code:
+ $ref: "#/components/schemas/EmojiCode"
+ reaction_type:
+ $ref: "#/components/schemas/ReactionType"
+ required:
+ - emoji_name
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -7141,21 +7230,27 @@ paths:
- reaction_type
parameters:
- $ref: "#/components/parameters/MessageId"
- - name: emoji_name
- in: query
- description: |
- The target emoji's human-readable name.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ emoji_name:
+ description: |
+ The target emoji's human-readable name.
- To find an emoji's name, hover over a message to reveal
- three icons on the right, then click the smiley face icon.
- Images of available reaction emojis appear. Hover over the
- emoji you want, and note that emoji's text name.
- schema:
- type: string
- example: "octopus"
- required: false
- - $ref: "#/components/parameters/EmojiCode"
- - $ref: "#/components/parameters/ReactionType"
+ To find an emoji's name, hover over a message to reveal
+ three icons on the right, then click the smiley face icon.
+ Images of available reaction emojis appear. Hover over the
+ emoji you want, and note that emoji's text name.
+ type: string
+ example: "octopus"
+ emoji_code:
+ $ref: "#/components/schemas/EmojiCode"
+ reaction_type:
+ $ref: "#/components/schemas/ReactionType"
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -7595,96 +7690,101 @@ paths:
- stream_id
parameters:
- $ref: "#/components/parameters/MessageId"
- - name: topic
- in: query
- description: |
- The topic to move the message(s) to, to request changing the topic.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ topic:
+ description: |
+ The topic to move the message(s) to, to request changing the topic.
- Clients should use the `max_topic_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum topic length
+ Clients should use the `max_topic_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum topic length
- Should only be sent when changing the topic, and will throw an error
- if the target message is not a stream message.
+ Should only be sent when changing the topic, and will throw an error
+ if the target message is not a stream message.
- **Changes**: New in Zulip 2.0.0. Previous Zulip releases encoded
- this as `subject`, which is currently a deprecated alias.
- schema:
- type: string
- example: Castle
- - name: propagate_mode
- in: query
- description: |
- Which message(s) should be edited:
+ **Changes**: New in Zulip 2.0.0. Previous Zulip releases encoded
+ this as `subject`, which is currently a deprecated alias.
+ type: string
+ example: Castle
+ propagate_mode:
+ description: |
+ Which message(s) should be edited:
- - `"change_later"`: The target message and all following messages.
- - `"change_one"`: Only the target message.
- - `"change_all"`: All messages in this topic.
+ - `"change_later"`: The target message and all following messages.
+ - `"change_one"`: Only the target message.
+ - `"change_all"`: All messages in this topic.
- Only the default value of `"change_one"` is valid when editing
- only the content of a message.
+ Only the default value of `"change_one"` is valid when editing
+ only the content of a message.
- This parameter determines both which messages get moved and also whether
- clients that are currently narrowed to the topic containing the message
- should navigate or adjust their compose box recipient to point to the
- post-edit stream/topic.
- schema:
- type: string
- enum:
- - change_one
- - change_later
- - change_all
- default: change_one
- example: change_all
- - name: send_notification_to_old_thread
- in: query
- description: |
- Whether to send an automated message to the old topic to
- notify users where the messages were moved to.
+ This parameter determines both which messages get moved and also whether
+ clients that are currently narrowed to the topic containing the message
+ should navigate or adjust their compose box recipient to point to the
+ post-edit stream/topic.
+ type: string
+ enum:
+ - change_one
+ - change_later
+ - change_all
+ default: change_one
+ example: change_all
+ send_notification_to_old_thread:
+ description: |
+ Whether to send an automated message to the old topic to
+ notify users where the messages were moved to.
- **Changes**: Before Zulip 6.0 (feature level 152), this parameter
- had a default of `true` and was ignored unless the stream was changed.
+ **Changes**: Before Zulip 6.0 (feature level 152), this parameter
+ had a default of `true` and was ignored unless the stream was changed.
- New in Zulip 3.0 (feature level 9).
- schema:
- type: boolean
- default: false
- example: true
- - name: send_notification_to_new_thread
- in: query
- description: |
- Whether to send an automated message to the new topic to
- notify users where the messages came from.
+ New in Zulip 3.0 (feature level 9).
+ type: boolean
+ default: false
+ example: true
+ send_notification_to_new_thread:
+ description: |
+ Whether to send an automated message to the new topic to
+ notify users where the messages came from.
- If the move is just [resolving/unresolving a topic](/help/resolve-a-topic),
- this parameter will not trigger an additional notification.
+ If the move is just [resolving/unresolving a topic](/help/resolve-a-topic),
+ this parameter will not trigger an additional notification.
- **Changes**: Before Zulip 6.0 (feature level 152), this parameter
- was ignored unless the stream was changed.
+ **Changes**: Before Zulip 6.0 (feature level 152), this parameter
+ was ignored unless the stream was changed.
- New in Zulip 3.0 (feature level 9).
- schema:
- type: boolean
- default: true
- example: true
- - $ref: "#/components/parameters/OptionalContent"
- - name: stream_id
- in: query
- description: |
- The stream ID to move the message(s) to, to request moving
- messages to another stream.
+ New in Zulip 3.0 (feature level 9).
+ type: boolean
+ default: true
+ example: true
+ content:
+ $ref: "#/components/schemas/OptionalContent"
+ stream_id:
+ description: |
+ The stream ID to move the message(s) to, to request moving
+ messages to another stream.
- Should only be sent when changing the stream, and will throw an error
- if the target message is not a stream message.
+ Should only be sent when changing the stream, and will throw an error
+ if the target message is not a stream message.
- Note that a message's content and stream cannot be changed at the
- same time, so sending both `content` and `stream_id` parameters will
- throw an error.
+ Note that a message's content and stream cannot be changed at the
+ same time, so sending both `content` and `stream_id` parameters will
+ throw an error.
- **Changes**: New in Zulip 3.0 (feature level 1).
- schema:
- type: integer
- example: 43
+ **Changes**: New in Zulip 3.0 (feature level 1).
+ type: integer
+ example: 43
+ encoding:
+ send_notification_to_old_thread:
+ contentType: application/json
+ send_notification_to_new_thread:
+ contentType: application/json
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -8107,31 +8207,32 @@ paths:
[support]: /help/contact-support
[management-commands]: https://zulip.readthedocs.io/en/latest/production/management-commands.html
x-requires-administrator: true
- parameters:
- - name: email
- in: query
- description: |
- The email address of the new user.
- schema:
- type: string
- required: true
- - name: password
- in: query
- description: |
- The password of the new user.
- schema:
- type: string
- example: abcd1234
- required: true
- - name: full_name
- in: query
- description: |
- The full name of the new user.
- schema:
- type: string
- example: New User
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ email:
+ description: |
+ The email address of the new user.
+ type: string
+ password:
+ description: |
+ The password of the new user.
+ type: string
+ example: abcd1234
+ full_name:
+ description: |
+ The full name of the new user.
+ type: string
+ example: New User
+ required:
+ - email
+ - password
+ - full_name
responses:
"200":
description: Success.
@@ -8564,23 +8665,29 @@ paths:
Add words (or phrases) to the user's set of configured [alert words][alert-words].
[alert-words]: /help/dm-mention-alert-notifications#alert-words
- parameters:
- - name: alert_words
- in: query
- description: |
- 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.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ alert_words:
+ description: |
+ 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.
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example: ["foo", "bar"]
- required: true
+ Alert words are case insensitive.
+ type: array
+ items:
+ type: string
+ example: ["foo", "bar"]
+ required:
+ - alert_words
+ encoding:
+ alert_words:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -8633,21 +8740,27 @@ paths:
Alert words are case insensitive.
[alert-words]: /help/dm-mention-alert-notifications#alert-words
- parameters:
- - name: alert_words
- in: query
- description: |
- An array of strings to be removed from the user's set of configured
- alert words. Strings that are not in the user's set of alert words
- are ignored.
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example: ["foo"]
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ alert_words:
+ description: |
+ An array of strings to be removed from the user's set of configured
+ alert words. Strings that are not in the user's set of alert words
+ are ignored.
+ type: array
+ items:
+ type: string
+ example: ["foo"]
+ required:
+ - alert_words
+ encoding:
+ alert_words:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -8691,79 +8804,71 @@ paths:
**Changes**: In Zulip 5.0 (feature level 86), added support for
`emoji_name`, `emoji_code`, and `reaction_type` parameters.
- parameters:
- - name: status_text
- schema:
- type: string
- allowEmptyValue: true
- in: query
- description: |
- 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.
- example: on vacation
- required: false
- - name: away
- deprecated: true
- schema:
- type: boolean
- in: query
- description: |
- Whether the user should be marked as "away".
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ status_text:
+ type: string
+ description: |
+ The text content of the status message. Sending the empty string
+ will clear the user's status.
- **Changes**: Deprecated in Zulip 6.0 (feature level 148);
- starting with that feature level, `away` is a legacy way to
- access the user's `presence_enabled` setting, with
- `away = !presence_enabled`. To be removed in a future release.
- example: true
- required: false
- - name: emoji_name
- schema:
- type: string
- allowEmptyValue: true
- in: query
- description: |
- The name for the emoji to associate with this status.
+ **Note**: The limit on the size of the message is 60 characters.
+ example: on vacation
+ away:
+ deprecated: true
+ type: boolean
+ description: |
+ Whether the user should be marked as "away".
+
+ **Changes**: Deprecated in Zulip 6.0 (feature level 148);
+ starting with that feature level, `away` is a legacy way to
+ access the user's `presence_enabled` setting, with
+ `away = !presence_enabled`. To be removed in a future release.
+ example: true
+ emoji_name:
+ type: string
+ description: |
+ The name for the emoji to associate with this status.
- **Changes**: New in Zulip 5.0 (feature level 86).
- example: car
- required: false
- - name: emoji_code
- schema:
- type: string
- in: query
- description: |
- 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).
+ example: car
+ emoji_code:
+ type: string
+ description: |
+ 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).
- example: 1f697
- required: false
- - name: reaction_type
- schema:
- type: string
- in: query
- description: |
- A string indicating the type of emoji. Each emoji `reaction_type`
- has an independent namespace for values of `emoji_code`.
+ **Changes**: New in Zulip 5.0 (feature level 86).
+ example: 1f697
+ reaction_type:
+ type: string
+ description: |
+ 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:
+ 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.
+ - `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](/help/custom-emoji).
+ - `realm_emoji` : In this namespace, `emoji_code` will be the ID of
+ the uploaded [custom emoji](/help/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").
+ - `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).
- example: unicode_emoji
- required: false
+ **Changes**: New in Zulip 5.0 (feature level 86).
+ example: unicode_emoji
+ encoding:
+ away:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -9026,126 +9131,145 @@ paths:
enum:
- subscriptions
- principals
- parameters:
- - name: subscriptions
- in: query
- description: |
- A list of dictionaries containing the key `name` and value
- specifying the name of the stream to subscribe. If the stream does not
- exist a new stream is created. The description of the stream created can
- be specified by setting the dictionary key `description` with an
- appropriate value.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- additionalProperties: false
- properties:
- name:
- type: string
- description: |
- The name of the stream.
-
- Clients should use the `max_stream_name_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum stream name length.
- description:
- type: string
- description: |
- The [description](/help/change-the-stream-description)
- to use for a new stream being created, in text/markdown format.
-
- Clients should use the `max_stream_description_length` returned
- by the [`POST /register`](/api/register-queue) endpoint to
- determine the maximum stream description length.
- required:
- - name
- example:
- no-description:
- value: {"name": "Verona"}
- with-description:
- value: {"name": "Verona", "description": "Italian city"}
- example: [{"name": "Verona", "description": "Italian city"}]
- required: true
- - $ref: "#/components/parameters/Principals"
- - name: authorization_errors_fatal
- in: query
- description: |
- A boolean specifying whether authorization errors (such as when the
- requesting user is not authorized to access a private stream) should be
- considered fatal or not. When `true`, an authorization error is reported
- as such. When set to `false`, the response will be a 200 and any streams
- where the request encountered an authorization error will be listed
- in the `unauthorized` key.
- schema:
- type: boolean
- default: true
- example: false
- - name: announce
- in: query
- description: |
- If one of the streams specified did not exist previously and is thus created
- by this call, this determines whether [notification bot](/help/configure-notification-bot)
- will send an announcement about the new stream's creation.
- schema:
- type: boolean
- default: false
- example: true
- - name: invite_only
- in: query
- description: |
- As described above, this endpoint will create a new stream if passed
- a stream name that doesn't already exist. This parameters and the ones
- that follow are used to request an initial configuration of a created
- stream; they are ignored for streams that already exist.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ subscriptions:
+ description: |
+ A list of dictionaries containing the key `name` and value
+ specifying the name of the stream to subscribe. If the stream does not
+ exist a new stream is created. The description of the stream created can
+ be specified by setting the dictionary key `description` with an
+ appropriate value.
+ type: array
+ items:
+ type: object
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: |
+ The name of the stream.
- This parameter determines whether any newly created streams will be
- private streams.
- schema:
- type: boolean
- default: false
- example: true
- - name: is_web_public
- in: query
- description: |
- This parameter determines whether any newly created streams will be
- web-public streams.
+ Clients should use the `max_stream_name_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum stream name length.
+ description:
+ type: string
+ description: |
+ The [description](/help/change-the-stream-description)
+ to use for a new stream being created, in text/markdown format.
+
+ Clients should use the `max_stream_description_length` returned
+ by the [`POST /register`](/api/register-queue) endpoint to
+ determine the maximum stream description length.
+ required:
+ - name
+ example:
+ no-description:
+ value: {"name": "Verona"}
+ with-description:
+ value: {"name": "Verona", "description": "Italian city"}
+ example: [{"name": "Verona", "description": "Italian city"}]
+ principals:
+ $ref: "#/components/schemas/Principals"
+ authorization_errors_fatal:
+ description: |
+ A boolean specifying whether authorization errors (such as when the
+ requesting user is not authorized to access a private stream) should be
+ considered fatal or not. When `true`, an authorization error is reported
+ as such. When set to `false`, the response will be a 200 and any streams
+ where the request encountered an authorization error will be listed
+ in the `unauthorized` key.
+ type: boolean
+ default: true
+ example: false
+ announce:
+ description: |
+ If one of the streams specified did not exist previously and is thus created
+ by this call, this determines whether [notification bot](/help/configure-notification-bot)
+ will send an announcement about the new stream's creation.
+ type: boolean
+ default: false
+ example: true
+ invite_only:
+ description: |
+ As described above, this endpoint will create a new stream if passed
+ a stream name that doesn't already exist. This parameters and the ones
+ that follow are used to request an initial configuration of a created
+ stream; they are ignored for streams that already exist.
- Note that creating web-public streams requires the
- `WEB_PUBLIC_STREAMS_ENABLED` [server setting][server-settings]
- to be enabled on the Zulip server in question, the organization
- to have enabled the `enable_spectator_access` realm setting, and
- the current use to have permission under the organization's
- `create_web_public_stream_policy` realm setting.
+ This parameter determines whether any newly created streams will be
+ private streams.
+ type: boolean
+ default: false
+ example: true
+ is_web_public:
+ description: |
+ This parameter determines whether any newly created streams will be
+ web-public streams.
- [server-settings]: https://zulip.readthedocs.io/en/stable/production/settings.html
+ Note that creating web-public streams requires the
+ `WEB_PUBLIC_STREAMS_ENABLED` [server setting][server-settings]
+ to be enabled on the Zulip server in question, the organization
+ to have enabled the `enable_spectator_access` realm setting, and
+ the current use to have permission under the organization's
+ `create_web_public_stream_policy` realm setting.
- **Changes**: New in Zulip 5.0 (feature level 98).
- schema:
- type: boolean
- default: false
- example: true
- - name: is_default_stream
- in: query
- description: |
- This parameter determines whether any newly created streams will be
- added as [default streams][default-streams] for new users joining
- the organization.
+ [server-settings]: https://zulip.readthedocs.io/en/stable/production/settings.html
- [default-streams]: /help/set-default-streams-for-new-users
+ **Changes**: New in Zulip 5.0 (feature level 98).
+ type: boolean
+ default: false
+ example: true
+ is_default_stream:
+ description: |
+ This parameter determines whether any newly created streams will be
+ added as [default streams][default-streams] for new users joining
+ the organization.
- **Changes**: New in Zulip 8.0 (feature level 200). Previously, default stream status
- could only be changed using the [dedicated API endpoint](/api/add-default-stream).
- schema:
- type: boolean
- default: false
- example: true
- - $ref: "#/components/parameters/HistoryPublicToSubscribers"
- - $ref: "#/components/parameters/StreamPostPolicy"
- - $ref: "#/components/parameters/MessageRetentionDays"
- - $ref: "#/components/parameters/CanRemoveSubscribersGroupId"
+ [default-streams]: /help/set-default-streams-for-new-users
+
+ **Changes**: New in Zulip 8.0 (feature level 200). Previously, default stream status
+ could only be changed using the [dedicated API endpoint](/api/add-default-stream).
+ type: boolean
+ default: false
+ example: true
+ history_public_to_subscribers:
+ $ref: "#/components/schemas/HistoryPublicToSubscribers"
+ stream_post_policy:
+ $ref: "#/components/schemas/StreamPostPolicy"
+ message_retention_days:
+ $ref: "#/components/schemas/MessageRetentionDays"
+ can_remove_subscribers_group:
+ $ref: "#/components/schemas/CanRemoveSubscribersGroupId"
+ required:
+ - subscriptions
+ encoding:
+ subscriptions:
+ contentType: application/json
+ principals:
+ contentType: application/json
+ authorization_errors_fatal:
+ contentType: application/json
+ announce:
+ contentType: application/json
+ invite_only:
+ contentType: application/json
+ is_web_public:
+ contentType: application/json
+ is_default_stream:
+ contentType: application/json
+ history_public_to_subscribers:
+ contentType: application/json
+ stream_post_policy:
+ contentType: application/json
+ can_remove_subscribers_group:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -9222,49 +9346,50 @@ paths:
tags: ["streams"]
description: |
Update which streams you are subscribed to.
- parameters:
- - name: delete
- in: query
- description: |
- A list of stream names to unsubscribe from.
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example: ["Verona", "Denmark"]
- required: false
- - name: add
- in: query
- description: |
- A list of objects describing which streams to subscribe to, optionally
- including per-user subscription parameters (e.g. color) and if the
- stream is to be created, its description.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- additionalProperties: false
- properties:
- name:
- type: string
- color:
- type: string
- description:
- type: string
- example:
- [
- {"name": "Verona"},
- {
- "name": "Denmark",
- "color": "#e79ab5",
- "description": "A Scandinavian country",
- },
- ]
- required: false
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ delete:
+ description: |
+ A list of stream names to unsubscribe from.
+ type: array
+ items:
+ type: string
+ example: ["Verona", "Denmark"]
+ add:
+ description: |
+ A list of objects describing which streams to subscribe to, optionally
+ including per-user subscription parameters (e.g. color) and if the
+ stream is to be created, its description.
+ type: array
+ items:
+ type: object
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ color:
+ type: string
+ description:
+ type: string
+ example:
+ [
+ {"name": "Verona"},
+ {
+ "name": "Denmark",
+ "color": "#e79ab5",
+ "description": "A Scandinavian country",
+ },
+ ]
+ encoding:
+ delete:
+ contentType: application/json
+ add:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -9391,21 +9516,30 @@ paths:
- ""
description: |
You may specify the `principals` parameter like so:
- parameters:
- - name: subscriptions
- in: query
- description: |
- A list of stream names to unsubscribe from. This parameter is called
- `streams` in our Python API.
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example: ["Verona", "Denmark"]
- required: true
- - $ref: "#/components/parameters/Principals"
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ subscriptions:
+ description: |
+ A list of stream names to unsubscribe from. This parameter is called
+ `streams` in our Python API.
+ type: array
+ items:
+ type: string
+ example: ["Verona", "Denmark"]
+ principals:
+ $ref: "#/components/schemas/Principals"
+ required:
+ - subscriptions
+ encoding:
+ subscriptions:
+ contentType: application/json
+ principals:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -9472,56 +9606,56 @@ paths:
parameters:
enum:
- stream_id
- parameters:
- - name: stream_id
- in: query
- description: |
- The ID of the stream to access.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ stream_id:
+ description: |
+ The ID of the stream to access.
- Clients must provide either `stream` or `stream_id` as a parameter
- to this endpoint, but not both.
+ Clients must provide either `stream` or `stream_id` as a parameter
+ to this endpoint, but not both.
- **Changes**: New in Zulip 2.0.0.
- schema:
- type: integer
- example: 43
- required: false
- - name: stream
- in: query
- description: |
- The name of the stream to access.
+ **Changes**: New in Zulip 2.0.0.
+ type: integer
+ example: 43
+ stream:
+ description: |
+ The name of the stream to access.
- Clients must provide either `stream` or `stream_id` as a parameter
- to this endpoint, but not both. Clients should use `stream_id`
- instead of the `stream` parameter when possible.
- schema:
- type: string
- example: Denmark
- required: false
- - name: topic
- in: query
- description: |
- The topic to (un)mute. Note that the request will succeed regardless of
- whether any messages have been sent to the specified topic.
+ Clients must provide either `stream` or `stream_id` as a parameter
+ to this endpoint, but not both. Clients should use `stream_id`
+ instead of the `stream` parameter when possible.
+ type: string
+ example: Denmark
+ topic:
+ description: |
+ The topic to (un)mute. Note that the request will succeed regardless of
+ whether any messages have been sent to the specified topic.
- Clients should use the `max_topic_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum topic length.
- schema:
- type: string
- example: dinner
- required: true
- - name: op
- in: query
- description: |
- Whether to mute (`add`) or unmute (`remove`) the provided topic.
- schema:
- type: string
- enum:
- - add
- - remove
- example: add
- required: true
+ Clients should use the `max_topic_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum topic length.
+ type: string
+ example: dinner
+ op:
+ description: |
+ Whether to mute (`add`) or unmute (`remove`) the provided topic.
+ type: string
+ enum:
+ - add
+ - remove
+ example: add
+ required:
+ - topic
+ - op
+ encoding:
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -9541,21 +9675,24 @@ paths:
`realm_name` field.
New in Zulip 8.0 (feature level 217).
- parameters:
- - name: token
- in: query
- description: |
- The push token for the device to which to send the test notification.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ token:
+ description: |
+ The push token for the device to which to send the test notification.
- If this parameter is not submitted, the test notification will be sent
- to all of the user's devices registered on the server.
+ If this parameter is not submitted, the test notification will be sent
+ to all of the user's devices registered on the server.
- A mobile client should pass this parameter, to avoid triggering a test
- notification for other clients.
- schema:
- type: string
- example: "111222"
- required: false
+ A mobile client should pass this parameter, to avoid triggering a test
+ notification for other clients.
+ type: string
+ example: "111222"
responses:
"200":
description: Success.
@@ -9588,52 +9725,58 @@ paths:
**Changes**: New in Zulip 7.0 (feature level 170). Previously,
toggling whether a topic was muted or unmuted was managed by the
[PATCH /users/me/subscriptions/muted_topics](/api/mute-topic) endpoint.
- parameters:
- - name: stream_id
- in: query
- description: |
- The ID of the stream to access.
- schema:
- type: integer
- example: 1
- required: true
- - name: topic
- in: query
- description: |
- The topic for which the personal preferences needs to be updated.
- Note that the request will succeed regardless of whether
- any messages have been sent to the specified topic.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ stream_id:
+ description: |
+ The ID of the stream to access.
+ type: integer
+ example: 1
+ topic:
+ description: |
+ The topic for which the personal preferences needs to be updated.
+ Note that the request will succeed regardless of whether
+ any messages have been sent to the specified topic.
- Clients should use the `max_topic_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum topic length.
- schema:
- type: string
- example: dinner
- required: true
- - name: visibility_policy
- in: query
- description: |
- Controls which visibility policy to set.
+ Clients should use the `max_topic_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum topic length.
+ type: string
+ example: dinner
+ visibility_policy:
+ description: |
+ Controls which visibility policy to set.
- - 0 = None. Removes the visibility policy previously set for the topic.
- - 1 = Muted. [Mutes the topic](/help/mute-a-topic) in a stream.
- - 2 = Unmuted. [Unmutes the topic](/help/mute-a-topic) in a muted stream.
- - 3 = Followed. [Follows the topic](/help/follow-a-topic).
+ - 0 = None. Removes the visibility policy previously set for the topic.
+ - 1 = Muted. [Mutes the topic](/help/mute-a-topic) in a stream.
+ - 2 = Unmuted. [Unmutes the topic](/help/mute-a-topic) in a muted stream.
+ - 3 = Followed. [Follows the topic](/help/follow-a-topic).
- In an unmuted stream, a topic visibility policy of unmuted will have the
- same effect as the "None" visibility policy.
+ In an unmuted stream, a topic visibility policy of unmuted will have the
+ same effect as the "None" visibility policy.
- **Changes**: In Zulip 7.0 (feature level 219), added followed as
- a visibility policy option.
- schema:
- type: integer
- enum:
- - 0
- - 1
- - 2
- example: 1
- required: true
+ **Changes**: In Zulip 7.0 (feature level 219), added followed as
+ a visibility policy option.
+ type: integer
+ enum:
+ - 0
+ - 1
+ - 2
+ example: 1
+ required:
+ - stream_id
+ - topic
+ - visibility_policy
+ encoding:
+ stream_id:
+ contentType: application/json
+ visibility_policy:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -10113,20 +10256,26 @@ paths:
This endpoint is used to implement the dragging feature described in the
[custom profile fields documentation](/help/custom-profile-fields).
x-requires-administrator: true
- parameters:
- - name: order
- in: query
- description: |
- A list of the IDs of all the custom profile fields defined in this
- organization, in the desired new order.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ order:
+ description: |
+ A list of the IDs of all the custom profile fields defined in this
+ organization, in the desired new order.
+ type: array
+ items:
+ type: integer
+ example: [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
+ required:
+ - order
+ encoding:
+ order:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -10137,84 +10286,86 @@ paths:
description: |
[Create a custom profile field](/help/custom-profile-fields#add-a-custom-profile-field) in the user's organization.
x-requires-administrator: true
- parameters:
- - name: name
- in: query
- description: |
- The name of the custom profile field, which will appear both in
- user-facing settings UI for configuring custom profile fields and
- in UI displaying a user's profile.
- schema:
- type: string
- example: "Favorite programming language"
- - name: hint
- in: query
- description: |
- The help text to be displayed for the custom profile field in user-facing
- settings UI for configuring custom profile fields.
- schema:
- type: string
- example: "Your favorite programming language."
- - name: field_type
- in: query
- description: |
- The field type can be any of the supported custom profile field types. See the
- [custom profile fields documentation](/help/custom-profile-fields)
- for more details on what each type means.
-
- - **1**: Short text
- - **2**: Long text
- - **3**: List of options
- - **4**: Date picker
- - **5**: Link
- - **6**: Person picker
- - **7**: External account
- - **8**: Pronouns
-
- **Changes**: Field type `8` added in Zulip 6.0 (feature level 151).
- schema:
- type: integer
- example: 3
- required: true
- - name: field_data
- in: query
- description: |
- Field types 3 (List of options) and 7 (External account) support storing
- additional configuration for the field type in the `field_data` attribute.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ name:
+ description: |
+ The name of the custom profile field, which will appear both in
+ user-facing settings UI for configuring custom profile fields and
+ in UI displaying a user's profile.
+ type: string
+ example: "Favorite programming language"
+ hint:
+ description: |
+ The help text to be displayed for the custom profile field in user-facing
+ settings UI for configuring custom profile fields.
+ type: string
+ example: "Your favorite programming language."
+ field_type:
+ description: |
+ The field type can be any of the supported custom profile field types. See the
+ [custom profile fields documentation](/help/custom-profile-fields)
+ for more details on what each type means.
+
+ - **1**: Short text
+ - **2**: Long text
+ - **3**: List of options
+ - **4**: Date picker
+ - **5**: Link
+ - **6**: Person picker
+ - **7**: External account
+ - **8**: Pronouns
+
+ **Changes**: Field type `8` added in Zulip 6.0 (feature level 151).
+ type: integer
+ example: 3
+ field_data:
+ description: |
+ Field types 3 (List of options) and 7 (External account) support storing
+ additional configuration for the field type in the `field_data` attribute.
- For field type 3 (List of options), this attribute is a JSON dictionary
- defining the choices and the order they will be displayed in the
- dropdown UI for individual users to select an option.
+ For field type 3 (List of options), this attribute is a JSON dictionary
+ defining the choices and the order they will be displayed in the
+ dropdown UI for individual users to select an option.
- The interface for field type 7 is not yet stabilized.
- content:
- application/json:
- schema:
- type: object
- example:
- {
- "python": {"text": "Python", "order": "1"},
- "java": {"text": "Java", "order": "2"},
- }
- - name: display_in_profile_summary
- in: query
- description: |
- Whether clients should display this profile field in a summary section of a
- user's profile (or in a more easily accessible "small profile").
+ The interface for field type 7 is not yet stabilized.
+ type: object
+ example:
+ {
+ "python": {"text": "Python", "order": "1"},
+ "java": {"text": "Java", "order": "2"},
+ }
+ display_in_profile_summary:
+ description: |
+ Whether clients should display this profile field in a summary section of a
+ user's profile (or in a more easily accessible "small profile").
- At most 2 profile fields may have this property be true in a given
- organization. The "Long text" [profile field types][profile-field-types]
- profile field types cannot be selected to be displayed in profile summaries.
+ At most 2 profile fields may have this property be true in a given
+ organization. The "Long text" [profile field types][profile-field-types]
+ profile field types cannot be selected to be displayed in profile summaries.
- The "Person picker" profile field is also not supported, but that is likely to
- be temporary.
+ The "Person picker" profile field is also not supported, but that is likely to
+ be temporary.
- [profile-field-types]: /help/custom-profile-fields#profile-field-types
+ [profile-field-types]: /help/custom-profile-fields#profile-field-types
- **Changes**: New in Zulip 6.0 (feature level 146).
- schema:
- type: boolean
- example: true
+ **Changes**: New in Zulip 6.0 (feature level 146).
+ type: boolean
+ example: true
+ required:
+ - field_type
+ encoding:
+ field_type:
+ contentType: application/json
+ field_data:
+ contentType: application/json
+ display_in_profile_summary:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -10268,538 +10419,539 @@ paths:
enum:
- left_side_userlist
- emojiset
- parameters:
- - name: dense_mode
- in: query
- description: |
- This setting has no effect at present. It is reserved for use in controlling
- the default font size in Zulip.
- schema:
- type: boolean
- example: true
- - name: starred_message_counts
- in: query
- description: |
- Whether clients should display the [number of starred
- messages](/help/star-a-message#display-the-number-of-starred-messages).
- schema:
- type: boolean
- example: true
- - name: fluid_layout_width
- in: query
- description: |
- Whether to use the [maximum available screen width](/help/enable-full-width-display)
- for the web app's center panel (message feed, recent conversations) on wide screens.
- schema:
- type: boolean
- example: true
- - name: high_contrast_mode
- in: query
- description: |
- This setting is reserved for use to control variations in Zulip's design
- to help visually impaired users.
- schema:
- type: boolean
- example: true
- - name: web_mark_read_on_scroll_policy
- in: query
- description: |
- Whether or not to mark messages as read when the user scrolls through their
- feed.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ dense_mode:
+ description: |
+ This setting has no effect at present. It is reserved for use in controlling
+ the default font size in Zulip.
+ type: boolean
+ example: true
+ starred_message_counts:
+ description: |
+ Whether clients should display the [number of starred
+ messages](/help/star-a-message#display-the-number-of-starred-messages).
+ type: boolean
+ example: true
+ fluid_layout_width:
+ description: |
+ Whether to use the [maximum available screen width](/help/enable-full-width-display)
+ for the web app's center panel (message feed, recent conversations) on wide screens.
+ type: boolean
+ example: true
+ high_contrast_mode:
+ description: |
+ This setting is reserved for use to control variations in Zulip's design
+ to help visually impaired users.
+ type: boolean
+ example: true
+ web_mark_read_on_scroll_policy:
+ description: |
+ Whether or not to mark messages as read when the user scrolls through their
+ feed.
- - 1 - Always
- - 2 - Only in conversation views
- - 3 - Never
+ - 1 - Always
+ - 2 - Only in conversation views
+ - 3 - Never
- **Changes**: New in Zulip 7.0 (feature level 175). Previously, there was no
- way for the user to configure this behavior on the web, and the Zulip web and
- desktop apps behaved like the "Always" setting when marking messages as read.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: color_scheme
- in: query
- description: |
- Controls which [color theme](/help/dark-theme) to use.
+ **Changes**: New in Zulip 7.0 (feature level 175). Previously, there was no
+ way for the user to configure this behavior on the web, and the Zulip web and
+ desktop apps behaved like the "Always" setting when marking messages as read.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ color_scheme:
+ description: |
+ Controls which [color theme](/help/dark-theme) to use.
- - 1 - Automatic
- - 2 - Dark theme
- - 3 - Light theme
+ - 1 - Automatic
+ - 2 - Dark theme
+ - 3 - Light theme
- Automatic detection is implementing using the standard `prefers-color-scheme`
- media query.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: enable_drafts_synchronization
- in: query
- description: |
- A boolean parameter to control whether synchronizing drafts is enabled for
- the user. When synchronization is disabled, all drafts stored in the server
- will be automatically deleted from the server.
+ Automatic detection is implementing using the standard `prefers-color-scheme`
+ media query.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ enable_drafts_synchronization:
+ description: |
+ A boolean parameter to control whether synchronizing drafts is enabled for
+ the user. When synchronization is disabled, all drafts stored in the server
+ will be automatically deleted from the server.
- This does not do anything (like sending events) to delete local copies of
- drafts stored in clients.
- schema:
- type: boolean
- example: true
- - name: translate_emoticons
- in: query
- description: |
- Whether to [translate emoticons to emoji](/help/configure-emoticon-translations)
- in messages the user sends.
- schema:
- type: boolean
- example: true
- - name: display_emoji_reaction_users
- in: query
- description: |
- Whether to display the names of reacting users on a message.
+ This does not do anything (like sending events) to delete local copies of
+ drafts stored in clients.
+ type: boolean
+ example: true
+ translate_emoticons:
+ description: |
+ Whether to [translate emoticons to emoji](/help/configure-emoticon-translations)
+ in messages the user sends.
+ type: boolean
+ example: true
+ display_emoji_reaction_users:
+ description: |
+ Whether to display the names of reacting users on a message.
- When enabled, clients should display the names of reacting users, rather than
- a count, for messages with few total reactions. The ideal cutoff may depend on
- the space available for displaying reactions; the official web application
- displays names when 3 or fewer total reactions are present with this setting
- enabled.
+ When enabled, clients should display the names of reacting users, rather than
+ a count, for messages with few total reactions. The ideal cutoff may depend on
+ the space available for displaying reactions; the official web application
+ displays names when 3 or fewer total reactions are present with this setting
+ enabled.
- **Changes**: New in Zulip 6.0 (feature level 125).
- schema:
- type: boolean
- example: false
- - name: web_home_view
- in: query
- description: |
- The [home view](/help/configure-home-view) used when opening a new
- Zulip web app window or hitting the `Esc` keyboard shortcut repeatedly.
+ **Changes**: New in Zulip 6.0 (feature level 125).
+ type: boolean
+ example: false
+ web_home_view:
+ description: |
+ The [home view](/help/configure-home-view) used when opening a new
+ Zulip web app window or hitting the `Esc` keyboard shortcut repeatedly.
- - "recent_topics" - Recent conversations view
- - "inbox" - Inbox view
- - "all_messages" - All messages view
+ - "recent_topics" - Recent conversations view
+ - "inbox" - Inbox view
+ - "all_messages" - All messages view
- **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was
- called `default_view`, which was new in Zulip 4.0 (feature level 42).
- schema:
- type: string
- example: all_messages
- - name: web_escape_navigates_to_home_view
- in: query
- description: |
- Whether the escape key navigates to the
- [configured home view](/help/configure-home-view).
+ **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was
+ called `default_view`, which was new in Zulip 4.0 (feature level 42).
+ type: string
+ example: all_messages
+ web_escape_navigates_to_home_view:
+ description: |
+ Whether the escape key navigates to the
+ [configured home view](/help/configure-home-view).
- **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was called
- `escape_navigates_to_default_view`, which was new in Zulip 5.0 (feature level 107).
- schema:
- type: boolean
- example: true
- - name: left_side_userlist
- in: query
- description: |
- Whether the users list on left sidebar in narrow windows.
+ **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was called
+ `escape_navigates_to_default_view`, which was new in Zulip 5.0 (feature level 107).
+ type: boolean
+ example: true
+ left_side_userlist:
+ description: |
+ Whether the users list on left sidebar in narrow windows.
- This feature is not heavily used and is likely to be reworked.
- schema:
- type: boolean
- example: true
- - name: emojiset
- in: query
- description: |
- The user's configured [emoji set](/help/emoji-and-emoticons#use-emoticons),
- used to display emoji to the user everywhere they appear in the UI.
+ This feature is not heavily used and is likely to be reworked.
+ type: boolean
+ example: true
+ emojiset:
+ description: |
+ The user's configured [emoji set](/help/emoji-and-emoticons#use-emoticons),
+ used to display emoji to the user everywhere they appear in the UI.
- - "google" - Google
- - "twitter" - Twitter
- - "text" - Plain text
- - "google-blob" - Google blobs
- schema:
- type: string
- example: "google"
- - name: demote_inactive_streams
- in: query
- description: |
- Whether to [demote inactive streams](/help/manage-inactive-streams) in the left sidebar.
+ - "google" - Google
+ - "twitter" - Twitter
+ - "text" - Plain text
+ - "google-blob" - Google blobs
+ type: string
+ example: "google"
+ demote_inactive_streams:
+ description: |
+ Whether to [demote inactive streams](/help/manage-inactive-streams) in the left sidebar.
- - 1 - Automatic
- - 2 - Always
- - 3 - Never
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: user_list_style
- in: query
- description: |
- The style selected by the user for the right sidebar user list.
+ - 1 - Automatic
+ - 2 - Always
+ - 3 - Never
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ user_list_style:
+ description: |
+ The style selected by the user for the right sidebar user list.
- - 1 - Compact
- - 2 - With status
- - 3 - With avatar and status
+ - 1 - Compact
+ - 2 - With status
+ - 3 - With avatar and status
- **Changes**: New in Zulip 6.0 (feature level 141).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: web_stream_unreads_count_display_policy
- in: query
- description: |
- Configuration for which streams should be displayed with a numeric unread count in the left sidebar.
- Streams that do not have an unread count will have a simple dot indicator for whether there are any
- unread messages.
+ **Changes**: New in Zulip 6.0 (feature level 141).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ web_stream_unreads_count_display_policy:
+ description: |
+ Configuration for which streams should be displayed with a numeric unread count in the left sidebar.
+ Streams that do not have an unread count will have a simple dot indicator for whether there are any
+ unread messages.
- - 1 - All streams
- - 2 - Unmuted streams and topics
- - 3 - No streams
+ - 1 - All streams
+ - 2 - Unmuted streams and topics
+ - 3 - No streams
- **Changes**: New in Zulip 8.0 (feature level 210).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 2
- - name: enable_stream_desktop_notifications
- in: query
- description: |
- Enable visual desktop notifications for stream messages.
- schema:
- type: boolean
- example: true
- - name: enable_stream_email_notifications
- in: query
- description: |
- Enable email notifications for stream messages.
- schema:
- type: boolean
- example: true
- - name: enable_stream_push_notifications
- in: query
- description: |
- Enable mobile notifications for stream messages.
- schema:
- type: boolean
- example: true
- - name: enable_stream_audible_notifications
- in: query
- description: |
- Enable audible desktop notifications for stream messages.
- schema:
- type: boolean
- example: true
- - name: notification_sound
- in: query
- description: |
- Notification sound name.
- schema:
- type: string
- example: ding
- - name: enable_desktop_notifications
- in: query
- description: |
- Enable visual desktop notifications for direct messages and @-mentions.
- schema:
- type: boolean
- example: true
- - name: enable_sounds
- in: query
- description: |
- Enable audible desktop notifications for direct messages and
- @-mentions.
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_desktop_notifications
- in: query
- description: |
- Enable visual desktop notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 210).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 2
+ enable_stream_desktop_notifications:
+ description: |
+ Enable visual desktop notifications for stream messages.
+ type: boolean
+ example: true
+ enable_stream_email_notifications:
+ description: |
+ Enable email notifications for stream messages.
+ type: boolean
+ example: true
+ enable_stream_push_notifications:
+ description: |
+ Enable mobile notifications for stream messages.
+ type: boolean
+ example: true
+ enable_stream_audible_notifications:
+ description: |
+ Enable audible desktop notifications for stream messages.
+ type: boolean
+ example: true
+ notification_sound:
+ description: |
+ Notification sound name.
+ type: string
+ example: ding
+ enable_desktop_notifications:
+ description: |
+ Enable visual desktop notifications for direct messages and @-mentions.
+ type: boolean
+ example: true
+ enable_sounds:
+ description: |
+ Enable audible desktop notifications for direct messages and
+ @-mentions.
+ type: boolean
+ example: true
+ enable_followed_topic_desktop_notifications:
+ description: |
+ Enable visual desktop notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_email_notifications
- in: query
- description: |
- Enable email notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: true
+ enable_followed_topic_email_notifications:
+ description: |
+ Enable email notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_push_notifications
- in: query
- description: |
- Enable push notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: true
+ enable_followed_topic_push_notifications:
+ description: |
+ Enable push notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: false
- - name: enable_followed_topic_audible_notifications
- in: query
- description: |
- Enable audible desktop notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: false
+ enable_followed_topic_audible_notifications:
+ description: |
+ Enable audible desktop notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: false
- - name: email_notifications_batching_period_seconds
- in: query
- description: |
- The duration (in seconds) for which the server should wait to batch
- email notifications before sending them.
- schema:
- type: integer
- example: 120
- - name: enable_offline_email_notifications
- in: query
- description: |
- Enable email notifications for direct messages and @-mentions received
- when the user is offline.
- schema:
- type: boolean
- example: true
- - name: enable_offline_push_notifications
- in: query
- description: |
- Enable mobile notification for direct messages and @-mentions received
- when the user is offline.
- schema:
- type: boolean
- example: true
- - name: enable_online_push_notifications
- in: query
- description: |
- Enable mobile notification for direct messages and @-mentions received
- when the user is online.
- schema:
- type: boolean
- example: true
- - name: enable_digest_emails
- in: query
- description: |
- Enable digest emails when the user is away.
- schema:
- type: boolean
- example: true
- - name: message_content_in_email_notifications
- in: query
- description: |
- Include the message's content in email notifications for new messages.
- schema:
- type: boolean
- example: true
- - name: pm_content_in_desktop_notifications
- in: query
- description: |
- Include content of direct messages in desktop notifications.
- schema:
- type: boolean
- example: true
- - name: wildcard_mentions_notify
- in: query
- description: |
- Whether wildcard mentions (E.g. @**all**) should send notifications
- like a personal mention.
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_wildcard_mentions_notify
- in: query
- description: |
- Whether wildcard mentions (e.g., @**all**) in messages sent to followed topics
- should send notifications like a personal mention.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: false
+ email_notifications_batching_period_seconds:
+ description: |
+ The duration (in seconds) for which the server should wait to batch
+ email notifications before sending them.
+ type: integer
+ example: 120
+ enable_offline_email_notifications:
+ description: |
+ Enable email notifications for direct messages and @-mentions received
+ when the user is offline.
+ type: boolean
+ example: true
+ enable_offline_push_notifications:
+ description: |
+ Enable mobile notification for direct messages and @-mentions received
+ when the user is offline.
+ type: boolean
+ example: true
+ enable_online_push_notifications:
+ description: |
+ Enable mobile notification for direct messages and @-mentions received
+ when the user is online.
+ type: boolean
+ example: true
+ enable_digest_emails:
+ description: |
+ Enable digest emails when the user is away.
+ type: boolean
+ example: true
+ message_content_in_email_notifications:
+ description: |
+ Include the message's content in email notifications for new messages.
+ type: boolean
+ example: true
+ pm_content_in_desktop_notifications:
+ description: |
+ Include content of direct messages in desktop notifications.
+ type: boolean
+ example: true
+ wildcard_mentions_notify:
+ description: |
+ Whether wildcard mentions (E.g. @**all**) should send notifications
+ like a personal mention.
+ type: boolean
+ example: true
+ enable_followed_topic_wildcard_mentions_notify:
+ description: |
+ Whether wildcard mentions (e.g., @**all**) in messages sent to followed topics
+ should send notifications like a personal mention.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: true
- - name: desktop_icon_count_display
- in: query
- description: |
- Unread count badge (appears in desktop sidebar and browser tab)
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: true
+ desktop_icon_count_display:
+ description: |
+ Unread count badge (appears in desktop sidebar and browser tab)
- - 1 - All unread messages
- - 2 - DMs, mentions, and followed topics
- - 3 - DMs and mentions
- - 4 - None
+ - 1 - All unread messages
+ - 2 - DMs, mentions, and followed topics
+ - 3 - DMs and mentions
+ - 4 - None
- **Changes**: In Zulip 8.0 (feature level 227), added `DMs, mentions, and followed
- topics` option, renumbering the options to insert it in order.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- example: 1
- - name: realm_name_in_email_notifications_policy
- in: query
- description: |
- Whether to [include organization name in subject of message notification
- emails](/help/email-notifications#include-organization-name-in-subject-line).
+ **Changes**: In Zulip 8.0 (feature level 227), added `DMs, mentions, and followed
+ topics` option, renumbering the options to insert it in order.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ example: 1
+ realm_name_in_email_notifications_policy:
+ description: |
+ Whether to [include organization name in subject of message notification
+ emails](/help/email-notifications#include-organization-name-in-subject-line).
- - 1 - Automatic
- - 2 - Always
- - 3 - Never
+ - 1 - Automatic
+ - 2 - Always
+ - 3 - Never
- **Changes**: New in Zulip 7.0 (feature level 168), replacing the
- previous `realm_name_in_notifications` boolean;
- `true` corresponded to `Always`, and `false` to `Never`.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: automatically_follow_topics_policy
- in: query
- description: |
- Which [topics to follow automatically](/help/mute-a-topic).
+ **Changes**: New in Zulip 7.0 (feature level 168), replacing the
+ previous `realm_name_in_notifications` boolean;
+ `true` corresponded to `Always`, and `false` to `Never`.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ automatically_follow_topics_policy:
+ description: |
+ Which [topics to follow automatically](/help/mute-a-topic).
- - 1 - Topics the user participates in
- - 2 - Topics the user sends a message to
- - 3 - Topics the user starts
- - 4 - Never
+ - 1 - Topics the user participates in
+ - 2 - Topics the user sends a message to
+ - 3 - Topics the user starts
+ - 4 - Never
- **Changes**: New in Zulip 8.0 (feature level 214).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- example: 1
- - name: automatically_unmute_topics_in_muted_streams_policy
- in: query
- description: |
- Which [topics to unmute automatically in muted streams](/help/mute-a-topic).
+ **Changes**: New in Zulip 8.0 (feature level 214).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ example: 1
+ automatically_unmute_topics_in_muted_streams_policy:
+ description: |
+ Which [topics to unmute automatically in muted streams](/help/mute-a-topic).
- - 1 - Topics the user participates in
- - 2 - Topics the user sends a message to
- - 3 - Topics the user starts
- - 4 - Never
+ - 1 - Topics the user participates in
+ - 2 - Topics the user sends a message to
+ - 3 - Topics the user starts
+ - 4 - Never
- **Changes**: New in Zulip 8.0 (feature level 214).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- example: 1
- - name: automatically_follow_topics_where_mentioned
- in: query
- description: |
- Whether the server will automatically mark the user as following
- topics where the user is mentioned.
+ **Changes**: New in Zulip 8.0 (feature level 214).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ example: 1
+ automatically_follow_topics_where_mentioned:
+ description: |
+ Whether the server will automatically mark the user as following
+ topics where the user is mentioned.
- **Changes**: New in Zulip 8.0 (feature level 235).
- schema:
- type: boolean
- example: true
- - name: presence_enabled
- in: query
- description: |
- Display the presence status to other users when online.
- schema:
- type: boolean
- example: true
- - name: enter_sends
- in: query
- description: |
- Whether pressing Enter in the compose box sends a message
- (or saves a message edit).
- schema:
- type: boolean
- example: true
- - name: twenty_four_hour_time
- in: query
- description: |
- Whether time should be [displayed in 24-hour notation](/help/change-the-time-format).
+ **Changes**: New in Zulip 8.0 (feature level 235).
+ type: boolean
+ example: true
+ presence_enabled:
+ description: |
+ Display the presence status to other users when online.
+ type: boolean
+ example: true
+ enter_sends:
+ description: |
+ Whether pressing Enter in the compose box sends a message
+ (or saves a message edit).
+ type: boolean
+ example: true
+ twenty_four_hour_time:
+ description: |
+ Whether time should be [displayed in 24-hour notation](/help/change-the-time-format).
- **Changes**: New in Zulip 5.0 (feature level 99).
- Previously, this default was edited using the
- `default_twenty_four_hour_time` parameter to the `PATCH /realm` endpoint.
- schema:
- type: boolean
- example: true
- - name: send_private_typing_notifications
- in: query
- description: |
- Whether [typing notifications](/help/typing-notifications) be sent when composing
- direct messages.
+ **Changes**: New in Zulip 5.0 (feature level 99).
+ Previously, this default was edited using the
+ `default_twenty_four_hour_time` parameter to the `PATCH /realm` endpoint.
+ type: boolean
+ example: true
+ send_private_typing_notifications:
+ description: |
+ Whether [typing notifications](/help/typing-notifications) be sent when composing
+ direct messages.
- **Changes**: New in Zulip 5.0 (feature level 105).
- schema:
- type: boolean
- example: true
- - name: send_stream_typing_notifications
- in: query
- description: |
- Whether [typing notifications](/help/typing-notifications) be sent when composing
- stream messages.
+ **Changes**: New in Zulip 5.0 (feature level 105).
+ type: boolean
+ example: true
+ send_stream_typing_notifications:
+ description: |
+ Whether [typing notifications](/help/typing-notifications) be sent when composing
+ stream messages.
- **Changes**: New in Zulip 5.0 (feature level 105).
- schema:
- type: boolean
- example: true
- - name: send_read_receipts
- in: query
- description: |
- Whether other users are allowed to see whether you've
- read messages.
+ **Changes**: New in Zulip 5.0 (feature level 105).
+ type: boolean
+ example: true
+ send_read_receipts:
+ description: |
+ Whether other users are allowed to see whether you've
+ read messages.
- **Changes**: New in Zulip 5.0 (feature level 105).
- schema:
- type: boolean
- example: true
- - name: email_address_visibility
- in: query
- description: |
- The [policy][permission-level] for [which other users][help-email-visibility]
- in this organization can see the user's real email address.
+ **Changes**: New in Zulip 5.0 (feature level 105).
+ type: boolean
+ example: true
+ email_address_visibility:
+ description: |
+ The [policy][permission-level] for [which other users][help-email-visibility]
+ in this organization can see the user's real email address.
- - 1 = Everyone
- - 2 = Members only
- - 3 = Administrators only
- - 4 = Nobody
- - 5 = Moderators only
+ - 1 = Everyone
+ - 2 = Members only
+ - 3 = Administrators only
+ - 4 = Nobody
+ - 5 = Moderators only
- **Changes**: New in Zulip 7.0 (feature level 163), replacing the
- realm-level setting.
+ **Changes**: New in Zulip 7.0 (feature level 163), replacing the
+ realm-level setting.
- [permission-level]: /api/roles-and-permissions#permission-levels
- [help-email-visibility]: /help/configure-email-visibility
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- - 5
- example: 1
+ [permission-level]: /api/roles-and-permissions#permission-levels
+ [help-email-visibility]: /help/configure-email-visibility
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ example: 1
+ encoding:
+ dense_mode:
+ contentType: application/json
+ starred_message_counts:
+ contentType: application/json
+ fluid_layout_width:
+ contentType: application/json
+ high_contrast_mode:
+ contentType: application/json
+ web_mark_read_on_scroll_policy:
+ contentType: application/json
+ color_scheme:
+ contentType: application/json
+ enable_drafts_synchronization:
+ contentType: application/json
+ translate_emoticons:
+ contentType: application/json
+ display_emoji_reaction_users:
+ contentType: application/json
+ web_escape_navigates_to_home_view:
+ contentType: application/json
+ left_side_userlist:
+ contentType: application/json
+ demote_inactive_streams:
+ contentType: application/json
+ user_list_style:
+ contentType: application/json
+ web_stream_unreads_count_display_policy:
+ contentType: application/json
+ enable_stream_desktop_notifications:
+ contentType: application/json
+ enable_stream_email_notifications:
+ contentType: application/json
+ enable_stream_push_notifications:
+ contentType: application/json
+ enable_stream_audible_notifications:
+ contentType: application/json
+ enable_desktop_notifications:
+ contentType: application/json
+ enable_sounds:
+ contentType: application/json
+ enable_followed_topic_desktop_notifications:
+ contentType: application/json
+ enable_followed_topic_email_notifications:
+ contentType: application/json
+ enable_followed_topic_push_notifications:
+ contentType: application/json
+ enable_followed_topic_audible_notifications:
+ contentType: application/json
+ email_notifications_batching_period_seconds:
+ contentType: application/json
+ enable_offline_email_notifications:
+ contentType: application/json
+ enable_offline_push_notifications:
+ contentType: application/json
+ enable_online_push_notifications:
+ contentType: application/json
+ enable_digest_emails:
+ contentType: application/json
+ message_content_in_email_notifications:
+ contentType: application/json
+ pm_content_in_desktop_notifications:
+ contentType: application/json
+ wildcard_mentions_notify:
+ contentType: application/json
+ enable_followed_topic_wildcard_mentions_notify:
+ contentType: application/json
+ desktop_icon_count_display:
+ contentType: application/json
+ realm_name_in_email_notifications_policy:
+ contentType: application/json
+ automatically_follow_topics_policy:
+ contentType: application/json
+ automatically_unmute_topics_in_muted_streams_policy:
+ contentType: application/json
+ automatically_follow_topics_where_mentioned:
+ contentType: application/json
+ presence_enabled:
+ contentType: application/json
+ enter_sends:
+ contentType: application/json
+ twenty_four_hour_time:
+ contentType: application/json
+ send_private_typing_notifications:
+ contentType: application/json
+ send_stream_typing_notifications:
+ contentType: application/json
+ send_read_receipts:
+ contentType: application/json
+ email_address_visibility:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SuccessIgnoredParameters"
@@ -10820,94 +10972,100 @@ paths:
[`ignored_parameters_unsupported`][ignored-parameters] array instead.
[ignored-parameters]: /api/rest-error-handling#ignored-parameters
- parameters:
- - name: subscription_data
- in: query
- description: |
- A list of objects that describe the changes that should be applied in
- each subscription. Each object represents a subscription, and must have
- a `stream_id` key that identifies the stream, as well as the `property`
- being modified and its new `value`.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- additionalProperties: false
- properties:
- stream_id:
- type: integer
- description: |
- The unique ID of a stream.
- property:
- type: string
- enum:
- - color
- - is_muted
- - in_home_view
- - pin_to_top
- - desktop_notifications
- - audible_notifications
- - push_notifications
- - email_notifications
- - wildcard_mentions_notify
- description: |
- One of the stream properties described below:
-
- - `"color"`: The hex value of the user's display color for the stream.
-
- - `"is_muted"`: Whether the stream is [muted](/help/mute-a-stream).<br>
- **Changes**: As of Zulip 6.0 (feature level 139), updating either
- `"is_muted"` or `"in_home_view"` generates two [subscription update
- events](/api/get-events#subscription-update), one for each property,
- that are sent to clients. Prior to this feature level, updating either
- property only generated a subscription update event for
- `"in_home_view"`. <br>
- **Changes**: Prior to Zulip 2.1.0, this feature was represented
- by the more confusingly named `"in_home_view"` (with the
- opposite value: `in_home_view=!is_muted`); for
- backwards-compatibility, modern Zulip still accepts that property.
-
- - `"pin_to_top"`: Whether to pin the stream at the top of the stream list.
-
- - `"desktop_notifications"`: Whether to show desktop notifications
- for all messages sent to the stream.
-
- - `"audible_notifications"`: Whether to play a sound
- notification for all messages sent to the stream.
-
- - `"push_notifications"`: Whether to trigger a mobile push
- notification for all messages sent to the stream.
-
- - `"email_notifications"`: Whether to trigger an email
- notification for all messages sent to the stream.
-
- - `"wildcard_mentions_notify"`: Whether wildcard mentions trigger
- notifications as though they were personal mentions in this stream.
- value:
- oneOf:
- - type: boolean
- - type: string
- description: |
- The new value of the property being modified.
-
- If the property is `"color"`, then `value` is a string
- representing the hex value of the user's display
- color for the stream. For all other above properties,
- `value` is a boolean.
- required:
- - stream_id
- - property
- - value
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ subscription_data:
+ description: |
+ A list of objects that describe the changes that should be applied in
+ each subscription. Each object represents a subscription, and must have
+ a `stream_id` key that identifies the stream, as well as the `property`
+ being modified and its new `value`.
+ type: array
+ items:
+ type: object
+ additionalProperties: false
+ properties:
+ stream_id:
+ type: integer
+ description: |
+ The unique ID of a stream.
+ property:
+ type: string
+ enum:
+ - color
+ - is_muted
+ - in_home_view
+ - pin_to_top
+ - desktop_notifications
+ - audible_notifications
+ - push_notifications
+ - email_notifications
+ - wildcard_mentions_notify
+ description: |
+ One of the stream properties described below:
+
+ - `"color"`: The hex value of the user's display color for the stream.
+
+ - `"is_muted"`: Whether the stream is [muted](/help/mute-a-stream).<br>
+ **Changes**: As of Zulip 6.0 (feature level 139), updating either
+ `"is_muted"` or `"in_home_view"` generates two [subscription update
+ events](/api/get-events#subscription-update), one for each property,
+ that are sent to clients. Prior to this feature level, updating either
+ property only generated a subscription update event for
+ `"in_home_view"`. <br>
+ **Changes**: Prior to Zulip 2.1.0, this feature was represented
+ by the more confusingly named `"in_home_view"` (with the
+ opposite value: `in_home_view=!is_muted`); for
+ backwards-compatibility, modern Zulip still accepts that property.
+
+ - `"pin_to_top"`: Whether to pin the stream at the top of the stream list.
+
+ - `"desktop_notifications"`: Whether to show desktop notifications
+ for all messages sent to the stream.
+
+ - `"audible_notifications"`: Whether to play a sound
+ notification for all messages sent to the stream.
+
+ - `"push_notifications"`: Whether to trigger a mobile push
+ notification for all messages sent to the stream.
+
+ - `"email_notifications"`: Whether to trigger an email
+ notification for all messages sent to the stream.
+
+ - `"wildcard_mentions_notify"`: Whether wildcard mentions trigger
+ notifications as though they were personal mentions in this stream.
+ value:
+ oneOf:
+ - type: boolean
+ - type: string
+ description: |
+ The new value of the property being modified.
+
+ If the property is `"color"`, then `value` is a string
+ representing the hex value of the user's display
+ color for the stream. For all other above properties,
+ `value` is a boolean.
+ required:
+ - stream_id
+ - property
+ - value
+ example:
+ {"stream_id": 2, "property": "is_muted", "value": true}
example:
- {"stream_id": 2, "property": "is_muted", "value": true}
- example:
- [
- {"stream_id": 1, "property": "pin_to_top", "value": true},
- {"stream_id": 3, "property": "color", "value": "#f00f00"},
- ]
- required: true
+ [
+ {"stream_id": 1, "property": "pin_to_top", "value": true},
+ {"stream_id": 3, "property": "color", "value": "#f00f00"},
+ ]
+ required:
+ - subscription_data
+ encoding:
+ subscription_data:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SuccessIgnoredParameters"
@@ -11116,52 +11274,53 @@ paths:
fields](/help/custom-profile-fields).
parameters:
- $ref: "#/components/parameters/UserId"
- - name: full_name
- in: query
- description: |
- The user's full name.
-
- **Changes**: Removed unnecessary JSON-encoding of this parameter in
- Zulip 5.0 (feature level 106).
- schema:
- type: string
- example: NewName
- required: false
- - name: role
- in: query
- description: |
- New [role](/api/roles-and-permissions) for the user. Roles are encoded as:
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ full_name:
+ description: |
+ The user's full name.
- - Organization owner: 100
- - Organization administrator: 200
- - Organization moderator: 300
- - Member: 400
- - Guest: 600
+ **Changes**: Removed unnecessary JSON-encoding of this parameter in
+ Zulip 5.0 (feature level 106).
+ type: string
+ example: NewName
+ role:
+ description: |
+ New [role](/api/roles-and-permissions) for the user. Roles are encoded as:
- Only organization owners can add or remove the owner role.
+ - Organization owner: 100
+ - Organization administrator: 200
+ - Organization moderator: 300
+ - Member: 400
+ - Guest: 600
- The owner role cannot be removed from the only organization owner.
+ Only organization owners can add or remove the owner role.
- **Changes**: New in Zulip 3.0 (feature level 8), replacing the previous
- pair of `is_admin` and `is_guest` boolean parameters. Organization moderator
- role added in Zulip 4.0 (feature level 60).
- schema:
- type: integer
- example: 400
- required: false
- - name: profile_data
- in: query
- description: |
- A dictionary containing the to be updated custom profile field data for the user.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- example:
- [{"id": 4, "value": "0"}, {"id": 5, "value": "1909-04-05"}]
- required: false
+ The owner role cannot be removed from the only organization owner.
+
+ **Changes**: New in Zulip 3.0 (feature level 8), replacing the previous
+ pair of `is_admin` and `is_guest` boolean parameters. Organization moderator
+ role added in Zulip 4.0 (feature level 60).
+ type: integer
+ example: 400
+ profile_data:
+ description: |
+ A dictionary containing the to be updated custom profile field data for the user.
+ type: array
+ items:
+ type: object
+ example:
+ [{"id": 4, "value": "0"}, {"id": 5, "value": "1909-04-05"}]
+ encoding:
+ role:
+ contentType: application/json
+ profile_data:
+ contentType: application/json
responses:
"200":
@@ -11194,21 +11353,25 @@ paths:
given their user ID.
parameters:
- $ref: "#/components/parameters/UserId"
- - name: deactivation_notification_comment
- in: query
- description: |
- If not `null`, requests that the deactivated user receive
- a notification email about their account deactivation.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ deactivation_notification_comment:
+ description: |
+ If not `null`, requests that the deactivated user receive
+ a notification email about their account deactivation.
- If not `""`, encodes custom text written by the administrator
- to be included in the notification email.
+ If not `""`, encodes custom text written by the administrator
+ to be included in the notification email.
- **Changes**: New in Zulip 5.0 (feature level 135).
- schema:
- type: string
- example: |
- Farewell!
- required: false
+ **Changes**: New in Zulip 5.0 (feature level 135).
+ type: string
+ example: |
+ Farewell!
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -11311,20 +11474,26 @@ paths:
**Changes**: New in Zulip 8.0 (feature level 202). Before this feature level,
linkifiers were always processed in order by ID, which meant users would
need to delete and recreate them to reorder the list of linkifiers.
- parameters:
- - name: ordered_linkifier_ids
- in: query
- description: |
- A list of the IDs of all the linkifiers defined in this
- organization, in the desired new order.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [3, 2, 1, 5]
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ ordered_linkifier_ids:
+ description: |
+ A list of the IDs of all the linkifiers defined in this
+ organization, in the desired new order.
+ type: array
+ items:
+ type: integer
+ example: [3, 2, 1, 5]
+ required:
+ - ordered_linkifier_ids
+ encoding:
+ ordered_linkifier_ids:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -11337,9 +11506,20 @@ paths:
Configure [linkifiers](/help/add-a-custom-linkifier),
regular expression patterns that are automatically linkified when they
appear in messages and topics.
- parameters:
- - $ref: "#/components/parameters/LinkifierPattern"
- - $ref: "#/components/parameters/LinkifierURLTemplate"
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ pattern:
+ $ref: "#/components/schemas/LinkifierPattern"
+ url_template:
+ $ref: "#/components/schemas/LinkifierURLTemplate"
+ required:
+ - pattern
+ - url_template
responses:
"200":
description: Success.
@@ -11398,8 +11578,20 @@ paths:
type: integer
example: 5
required: true
- - $ref: "#/components/parameters/LinkifierPattern"
- - $ref: "#/components/parameters/LinkifierURLTemplate"
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ pattern:
+ $ref: "#/components/schemas/LinkifierPattern"
+ url_template:
+ $ref: "#/components/schemas/LinkifierURLTemplate"
+ required:
+ - pattern
+ - url_template
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -11413,41 +11605,42 @@ paths:
**Changes**: New in Zulip 4.0 (feature level 49). A parameter encoding bug was
fixed in Zulip 4.0 (feature level 57).
- parameters:
- - name: name
- in: query
- description: |
- The user-visible display name of the playground which can be
- used to pick the target playground, especially when multiple
- playground options exist for that programming language.
- schema:
- type: string
- example: Python playground
- required: true
- - name: pygments_language
- in: query
- description: |
- The name of the Pygments language lexer for that
- programming language.
- schema:
- type: string
- example: Python
- required: true
- - name: url_template
- in: query
- description: |
- The [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html)
- compliant URL template for the playground. The template should
- contain exactly one variable named `code`, which determines how the
- extracted code should be substituted in the playground URL.
-
- **Changes**: New in Zulip 8.0 (feature level 196). This replaced the
- `url_prefix` parameter, which was used to construct URLs by just
- concatenating `url_prefix` and `code`.
- schema:
- type: string
- example: https://python.example.com?code={code}
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ name:
+ description: |
+ The user-visible display name of the playground which can be
+ used to pick the target playground, especially when multiple
+ playground options exist for that programming language.
+ type: string
+ example: Python playground
+ pygments_language:
+ description: |
+ The name of the Pygments language lexer for that
+ programming language.
+ type: string
+ example: Python
+ url_template:
+ description: |
+ The [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html)
+ compliant URL template for the playground. The template should
+ contain exactly one variable named `code`, which determines how the
+ extracted code should be substituted in the playground URL.
+
+ **Changes**: New in Zulip 8.0 (feature level 196). This replaced the
+ `url_prefix` parameter, which was used to construct URLs by just
+ concatenating `url_prefix` and `code`.
+ type: string
+ example: https://python.example.com?code={code}
+ required:
+ - name
+ - pygments_language
+ - url_template
responses:
"200":
description: Success.
@@ -11559,175 +11752,187 @@ paths:
parameters:
enum:
- event_types
- parameters:
- - name: apply_markdown
- in: query
- description: |
- Set to `true` if you would like the content to be rendered in HTML
- format (otherwise the API will return the raw text that the user
- entered)
- schema:
- type: boolean
- default: false
- example: true
- - name: client_gravatar
- in: query
- description: |
- Whether the client supports computing gravatars URLs. If
- enabled, `avatar_url` will be included in the response only
- if there is a Zulip avatar, and will be `null` for users who
- are using gravatar as their avatar. This option
- significantly reduces the compressed size of user data,
- since gravatar URLs are long, random strings and thus do not
- compress well. The `client_gravatar` field is set to `true` if
- clients can compute their own gravatars.
-
- The default value is `true` for authenticated requests and
- `false` for [unauthenticated
- requests](/help/public-access-option). Passing `true` in
- an unauthenticated request is an error.
-
- **Changes**: Before Zulip 6.0 (feature level 149), this
- parameter was silently ignored and processed as though it
- were `false` in unauthenticated requests.
- schema:
- type: boolean
- example: false
- - name: include_subscribers
- in: query
- description: |
- Whether each returned stream object should include a `subscribers`
- field containing a list of the user IDs of its subscribers.
-
- (This may be significantly slower in organizations with
- thousands of users subscribed to many streams.)
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ apply_markdown:
+ description: |
+ Set to `true` if you would like the content to be rendered in HTML
+ format (otherwise the API will return the raw text that the user
+ entered)
+ type: boolean
+ default: false
+ example: true
+ client_gravatar:
+ description: |
+ Whether the client supports computing gravatars URLs. If
+ enabled, `avatar_url` will be included in the response only
+ if there is a Zulip avatar, and will be `null` for users who
+ are using gravatar as their avatar. This option
+ significantly reduces the compressed size of user data,
+ since gravatar URLs are long, random strings and thus do not
+ compress well. The `client_gravatar` field is set to `true` if
+ clients can compute their own gravatars.
+
+ The default value is `true` for authenticated requests and
+ `false` for [unauthenticated
+ requests](/help/public-access-option). Passing `true` in
+ an unauthenticated request is an error.
+
+ **Changes**: Before Zulip 6.0 (feature level 149), this
+ parameter was silently ignored and processed as though it
+ were `false` in unauthenticated requests.
+ type: boolean
+ example: false
+ include_subscribers:
+ description: |
+ Whether each returned stream object should include a `subscribers`
+ field containing a list of the user IDs of its subscribers.
- Passing `true` in an [unauthenticated
- request](/help/public-access-option) is an error.
+ (This may be significantly slower in organizations with
+ thousands of users subscribed to many streams.)
- **Changes**: Before Zulip 6.0 (feature level 149), this
- parameter was silently ignored and processed as though it
- were `false` in unauthenticated requests.
+ Passing `true` in an [unauthenticated
+ request](/help/public-access-option) is an error.
- New in Zulip 2.1.0.
- schema:
- type: boolean
- default: false
- example: true
- - name: slim_presence
- in: query
- description: |
- Setting this to `true` will make presence dictionaries be keyed by
- user ID instead of Zulip API email.
+ **Changes**: Before Zulip 6.0 (feature level 149), this
+ parameter was silently ignored and processed as though it
+ were `false` in unauthenticated requests.
- **Changes**: New in Zulip 3.0 (Unstable with no feature level yet).
- schema:
- type: boolean
- default: false
- example: true
- - $ref: "#/components/parameters/Event_types"
- - $ref: "#/components/parameters/AllPublicStreams"
- - name: client_capabilities
- in: query
- description: |
- Dictionary containing details on features the client supports that are
- relevant to the format of responses sent by the server.
-
- - `notification_settings_null`: Boolean for whether the
- client can handle the current API with `null` values for
- stream-level notification settings (which means the stream
- is not customized and should inherit the user's global
- notification settings for stream messages).
- <br />
- **Changes**: New in Zulip 2.1.0. In earlier Zulip releases,
- stream-level notification settings were simple booleans.
-
- - `bulk_message_deletion`: Boolean for whether the client's
- handler for the `delete_message` event type has been
- updated to process the new bulk format (with a
- `message_ids`, rather than a singleton `message_id`).
- Otherwise, the server will send `delete_message` events
- in a loop.
- <br />
- **Changes**: New in Zulip 3.0 (feature level 13). This
- capability is for backwards-compatibility; it will be
- required in a future server release.
-
- - `user_avatar_url_field_optional`: Boolean for whether the
- client required avatar URLs for all users, or supports
- using `GET /avatar/{user_id}` to access user avatars. If the
- client has this capability, the server may skip sending a
- `avatar_url` field in the `realm_user` at its sole discretion
- to optimize network performance. This is an important optimization
- in organizations with 10,000s of users.
- <br />
- **Changes**: New in Zulip 3.0 (feature level 18).
-
- - `stream_typing_notifications`: Boolean for whether the client
- supports stream typing notifications.
- <br />
- **Changes**: New in Zulip 4.0 (feature level 58). This capability is
- for backwards-compatibility; it will be required in a
- future server release.
-
- - `user_settings_object`: Boolean for whether the client supports the modern
- `user_settings` event type. If false, the server will additionally send the
- legacy `update_global_notifications` and `update_display_settings` event
- types.
- <br />
- **Changes**: New in Zulip 5.0 (feature level 89). This capability is for
- backwards-compatibility; it will be removed in a future server release.
- Because the feature level 89 API changes were merged together, clients can
- safely make a request with this client capability and also request all three
- event types (`user_settings`, `update_display_settings`,
- `update_global_notifications`), and get exactly one copy of settings data on
- any server version. Clients can then use the `zulip_feature_level` in the
- `/register` response or the presence/absence of a `user_settings` key to
- determine where to look for the data.
-
- - `linkifier_url_template`: Boolean for whether the client accepts
- [linkifiers][help-linkifiers] that use [RFC 6570][rfc6570] compliant
- URL templates for linkifying matches. If false or unset, then the
- `realm_linkifiers` array in the `/register` response will be empty
- if present, and no `realm_linkifiers` [events][events-linkifiers]
- will be sent to the client.
- <br />
- **Changes**: New in Zulip 7.0 (feature level 176). This capability
- is for backwards-compatibility.
-
- - `user_list_incomplete`: Boolean for whether the client supports not having an
- incomplete user database. If true, then the `realm_users` array in the `register`
- response will not include data for inaccessible users and clients of guest users will
- not receive `realm_user op:add` events for newly created users that are not accessible
- to the current user. **Changes**: New in Zulip 8.0 (feature level 232). This
- capability is for backwards-compatibility.
-
- [help-linkifiers]: /help/add-a-custom-linkifier
- [rfc6570]: https://www.rfc-editor.org/rfc/rfc6570.html
- [events-linkifiers]: /api/get-events#realm_linkifiers
- content:
- application/json:
- schema:
- type: object
- example: {"notification_settings_null": true}
- - name: fetch_event_types
- in: query
- description: |
- Same as the `event_types` parameter except that the values in
- `fetch_event_types` are used to fetch initial data. If
- `fetch_event_types` is not provided, `event_types` is used and if
- `event_types` is not provided, this parameter defaults to `null`.
+ New in Zulip 2.1.0.
+ type: boolean
+ default: false
+ example: true
+ slim_presence:
+ description: |
+ Setting this to `true` will make presence dictionaries be keyed by
+ user ID instead of Zulip API email.
- Event types not supported by the server are ignored, in order to simplify
- the implementation of client apps that support multiple server versions.
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example: ["message"]
- - $ref: "#/components/parameters/Narrow"
+ **Changes**: New in Zulip 3.0 (Unstable with no feature level yet).
+ type: boolean
+ default: false
+ example: true
+ event_types:
+ $ref: "#/components/schemas/Event_types"
+ all_public_streams:
+ $ref: "#/components/schemas/AllPublicStreams"
+ client_capabilities:
+ description: |
+ Dictionary containing details on features the client supports that are
+ relevant to the format of responses sent by the server.
+
+ - `notification_settings_null`: Boolean for whether the
+ client can handle the current API with `null` values for
+ stream-level notification settings (which means the stream
+ is not customized and should inherit the user's global
+ notification settings for stream messages).
+ <br />
+ **Changes**: New in Zulip 2.1.0. In earlier Zulip releases,
+ stream-level notification settings were simple booleans.
+
+ - `bulk_message_deletion`: Boolean for whether the client's
+ handler for the `delete_message` event type has been
+ updated to process the new bulk format (with a
+ `message_ids`, rather than a singleton `message_id`).
+ Otherwise, the server will send `delete_message` events
+ in a loop.
+ <br />
+ **Changes**: New in Zulip 3.0 (feature level 13). This
+ capability is for backwards-compatibility; it will be
+ required in a future server release.
+
+ - `user_avatar_url_field_optional`: Boolean for whether the
+ client required avatar URLs for all users, or supports
+ using `GET /avatar/{user_id}` to access user avatars. If the
+ client has this capability, the server may skip sending a
+ `avatar_url` field in the `realm_user` at its sole discretion
+ to optimize network performance. This is an important optimization
+ in organizations with 10,000s of users.
+ <br />
+ **Changes**: New in Zulip 3.0 (feature level 18).
+
+ - `stream_typing_notifications`: Boolean for whether the client
+ supports stream typing notifications.
+ <br />
+ **Changes**: New in Zulip 4.0 (feature level 58). This capability is
+ for backwards-compatibility; it will be required in a
+ future server release.
+
+ - `user_settings_object`: Boolean for whether the client supports the modern
+ `user_settings` event type. If false, the server will additionally send the
+ legacy `update_global_notifications` and `update_display_settings` event
+ types.
+ <br />
+ **Changes**: New in Zulip 5.0 (feature level 89). This capability is for
+ backwards-compatibility; it will be removed in a future server release.
+ Because the feature level 89 API changes were merged together, clients can
+ safely make a request with this client capability and also request all three
+ event types (`user_settings`, `update_display_settings`,
+ `update_global_notifications`), and get exactly one copy of settings data on
+ any server version. Clients can then use the `zulip_feature_level` in the
+ `/register` response or the presence/absence of a `user_settings` key to
+ determine where to look for the data.
+
+ - `linkifier_url_template`: Boolean for whether the client accepts
+ [linkifiers][help-linkifiers] that use [RFC 6570][rfc6570] compliant
+ URL templates for linkifying matches. If false or unset, then the
+ `realm_linkifiers` array in the `/register` response will be empty
+ if present, and no `realm_linkifiers` [events][events-linkifiers]
+ will be sent to the client.
+ <br />
+ **Changes**: New in Zulip 7.0 (feature level 176). This capability
+ is for backwards-compatibility.
+
+ - `user_list_incomplete`: Boolean for whether the client supports not having an
+ incomplete user database. If true, then the `realm_users` array in the `register`
+ response will not include data for inaccessible users and clients of guest users will
+ not receive `realm_user op:add` events for newly created users that are not accessible
+ to the current user. **Changes**: New in Zulip 8.0 (feature level 232). This
+ capability is for backwards-compatibility.
+
+ [help-linkifiers]: /help/add-a-custom-linkifier
+ [rfc6570]: https://www.rfc-editor.org/rfc/rfc6570.html
+ [events-linkifiers]: /api/get-events#realm_linkifiers
+ type: object
+ example: {"notification_settings_null": true}
+ fetch_event_types:
+ description: |
+ Same as the `event_types` parameter except that the values in
+ `fetch_event_types` are used to fetch initial data. If
+ `fetch_event_types` is not provided, `event_types` is used and if
+ `event_types` is not provided, this parameter defaults to `null`.
+
+ Event types not supported by the server are ignored, in order to simplify
+ the implementation of client apps that support multiple server versions.
+ type: array
+ items:
+ type: string
+ example: ["message"]
+ narrow:
+ $ref: "#/components/schemas/Narrow"
+ encoding:
+ apply_markdown:
+ contentType: application/json
+ client_gravatar:
+ contentType: application/json
+ include_subscribers:
+ contentType: application/json
+ slim_presence:
+ contentType: application/json
+ event_types:
+ contentType: application/json
+ all_public_streams:
+ contentType: application/json
+ client_capabilities:
+ contentType: application/json
+ fetch_event_types:
+ contentType: application/json
+ narrow:
+ contentType: application/json
responses:
"200":
description: Success.
@@ -15934,716 +16139,705 @@ paths:
enum:
- left_side_userlist
- emojiset
- parameters:
- - name: full_name
- in: query
- description: |
- A new display name for the user.
- schema:
- type: string
- example: NewName
- - name: email
- in: query
- description: |
- Asks the server to initiate a confirmation sequence to change the user's email
- address to the indicated value. The user will need to demonstrate control of the
- new email address by clicking a confirmation link sent to that address.
- schema:
- type: string
- - name: old_password
- in: query
- description: |
- The user's old Zulip password (or LDAP password, if LDAP authentication is in use).
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ full_name:
+ description: |
+ A new display name for the user.
+ type: string
+ example: NewName
+ email:
+ description: |
+ Asks the server to initiate a confirmation sequence to change the user's email
+ address to the indicated value. The user will need to demonstrate control of the
+ new email address by clicking a confirmation link sent to that address.
+ type: string
+ old_password:
+ description: |
+ The user's old Zulip password (or LDAP password, if LDAP authentication is in use).
- Required only when sending the `new_password` parameter.
- schema:
- type: string
- example: old12345
- - name: new_password
- in: query
- description: |
- The user's new Zulip password (or LDAP password, if LDAP authentication is in use).
+ Required only when sending the `new_password` parameter.
+ type: string
+ example: old12345
+ new_password:
+ description: |
+ The user's new Zulip password (or LDAP password, if LDAP authentication is in use).
- The `old_password` parameter must be included in the request.
- schema:
- type: string
- example: new12345
- - name: twenty_four_hour_time
- in: query
- description: |
- Whether time should be [displayed in 24-hour notation](/help/change-the-time-format).
+ The `old_password` parameter must be included in the request.
+ type: string
+ example: new12345
+ twenty_four_hour_time:
+ description: |
+ Whether time should be [displayed in 24-hour notation](/help/change-the-time-format).
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: dense_mode
- in: query
- description: |
- This setting has no effect at present. It is reserved for use in controlling
- the default font size in Zulip.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ dense_mode:
+ description: |
+ This setting has no effect at present. It is reserved for use in controlling
+ the default font size in Zulip.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: web_mark_read_on_scroll_policy
- in: query
- description: |
- Whether or not to mark messages as read when the user scrolls through their
- feed.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ web_mark_read_on_scroll_policy:
+ description: |
+ Whether or not to mark messages as read when the user scrolls through their
+ feed.
- - 1 - Always
- - 2 - Only in conversation views
- - 3 - Never
+ - 1 - Always
+ - 2 - Only in conversation views
+ - 3 - Never
- **Changes**: New in Zulip 7.0 (feature level 175). Previously, there was no
- way for the user to configure this behavior on the web, and the Zulip web and
- desktop apps behaved like the "Always" setting when marking messages as read.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: starred_message_counts
- in: query
- description: |
- Whether clients should display the [number of starred
- messages](/help/star-a-message#display-the-number-of-starred-messages).
+ **Changes**: New in Zulip 7.0 (feature level 175). Previously, there was no
+ way for the user to configure this behavior on the web, and the Zulip web and
+ desktop apps behaved like the "Always" setting when marking messages as read.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ starred_message_counts:
+ description: |
+ Whether clients should display the [number of starred
+ messages](/help/star-a-message#display-the-number-of-starred-messages).
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: fluid_layout_width
- in: query
- description: |
- Whether to use the [maximum available screen width](/help/enable-full-width-display)
- for the web app's center panel (message feed, recent conversations) on wide screens.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ fluid_layout_width:
+ description: |
+ Whether to use the [maximum available screen width](/help/enable-full-width-display)
+ for the web app's center panel (message feed, recent conversations) on wide screens.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: high_contrast_mode
- in: query
- description: |
- This setting is reserved for use to control variations in Zulip's design
- to help visually impaired users.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ high_contrast_mode:
+ description: |
+ This setting is reserved for use to control variations in Zulip's design
+ to help visually impaired users.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: color_scheme
- in: query
- description: |
- Controls which [color theme](/help/dark-theme) to use.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ color_scheme:
+ description: |
+ Controls which [color theme](/help/dark-theme) to use.
- - 1 - Automatic
- - 2 - Dark theme
- - 3 - Light theme
+ - 1 - Automatic
+ - 2 - Dark theme
+ - 3 - Light theme
- Automatic detection is implementing using the standard `prefers-color-scheme`
- media query.
+ Automatic detection is implementing using the standard `prefers-color-scheme`
+ media query.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: enable_drafts_synchronization
- in: query
- description: |
- A boolean parameter to control whether synchronizing drafts is enabled for
- the user. When synchronization is disabled, all drafts stored in the server
- will be automatically deleted from the server.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ enable_drafts_synchronization:
+ description: |
+ A boolean parameter to control whether synchronizing drafts is enabled for
+ the user. When synchronization is disabled, all drafts stored in the server
+ will be automatically deleted from the server.
- This does not do anything (like sending events) to delete local copies of
- drafts stored in clients.
+ This does not do anything (like sending events) to delete local copies of
+ drafts stored in clients.
- **Changes**: New in Zulip 5.0 (feature level 87).
- schema:
- type: boolean
- example: true
- - name: translate_emoticons
- in: query
- description: |
- Whether to [translate emoticons to emoji](/help/configure-emoticon-translations)
- in messages the user sends.
+ **Changes**: New in Zulip 5.0 (feature level 87).
+ type: boolean
+ example: true
+ translate_emoticons:
+ description: |
+ Whether to [translate emoticons to emoji](/help/configure-emoticon-translations)
+ in messages the user sends.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: display_emoji_reaction_users
- in: query
- description: |
- Whether to display the names of reacting users on a message.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ display_emoji_reaction_users:
+ description: |
+ Whether to display the names of reacting users on a message.
- When enabled, clients should display the names of reacting users, rather than
- a count, for messages with few total reactions. The ideal cutoff may depend on
- the space available for displaying reactions; the official web application
- displays names when 3 or fewer total reactions are present with this setting
- enabled.
+ When enabled, clients should display the names of reacting users, rather than
+ a count, for messages with few total reactions. The ideal cutoff may depend on
+ the space available for displaying reactions; the official web application
+ displays names when 3 or fewer total reactions are present with this setting
+ enabled.
- **Changes**: New in Zulip 6.0 (feature level 125).
- schema:
- type: boolean
- example: false
- - name: default_language
- in: query
- description: |
- What [default language](/help/change-your-language) to use for the account.
+ **Changes**: New in Zulip 6.0 (feature level 125).
+ type: boolean
+ example: false
+ default_language:
+ description: |
+ What [default language](/help/change-your-language) to use for the account.
- This controls both the Zulip UI as well as email notifications sent to the user.
+ This controls both the Zulip UI as well as email notifications sent to the user.
- The value needs to be a standard language code that the Zulip server has
- translation data for; for example, `"en"` for English or `"de"` for German.
+ The value needs to be a standard language code that the Zulip server has
+ translation data for; for example, `"en"` for English or `"de"` for German.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
- Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 63).
- schema:
- type: string
- example: en
- - name: web_home_view
- in: query
- description: |
- The [home view](/help/configure-home-view) used when opening a new
- Zulip web app window or hitting the `Esc` keyboard shortcut repeatedly.
+ Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 63).
+ type: string
+ example: en
+ web_home_view:
+ description: |
+ The [home view](/help/configure-home-view) used when opening a new
+ Zulip web app window or hitting the `Esc` keyboard shortcut repeatedly.
- - "recent_topics" - Recent conversations view
- - "inbox" - Inbox view
- - "all_messages" - All messages view
+ - "recent_topics" - Recent conversations view
+ - "inbox" - Inbox view
+ - "all_messages" - All messages view
- **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was
- called `default_view`, which was new in Zulip 4.0 (feature level 42).
+ **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was
+ called `default_view`, which was new in Zulip 4.0 (feature level 42).
- Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
+ Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
- Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
- schema:
- type: string
- example: all_messages
- - name: web_escape_navigates_to_home_view
- in: query
- description: |
- Whether the escape key navigates to the
- [configured home view](/help/configure-home-view).
+ Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
+ type: string
+ example: all_messages
+ web_escape_navigates_to_home_view:
+ description: |
+ Whether the escape key navigates to the
+ [configured home view](/help/configure-home-view).
- **Changes**: New in Zulip 8.0 (feature level 219). Previously, this
- was called `escape_navigates_to_default_view`, which was new in Zulip
- 5.0 (feature level 107).
- schema:
- type: boolean
- example: true
- - name: left_side_userlist
- in: query
- description: |
- Whether the users list on left sidebar in narrow windows.
+ **Changes**: New in Zulip 8.0 (feature level 219). Previously, this
+ was called `escape_navigates_to_default_view`, which was new in Zulip
+ 5.0 (feature level 107).
+ type: boolean
+ example: true
+ left_side_userlist:
+ description: |
+ Whether the users list on left sidebar in narrow windows.
- This feature is not heavily used and is likely to be reworked.
+ This feature is not heavily used and is likely to be reworked.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: boolean
- example: true
- - name: emojiset
- in: query
- description: |
- The user's configured [emoji set](/help/emoji-and-emoticons#use-emoticons),
- used to display emoji to the user everywhere they appear in the UI.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: boolean
+ example: true
+ emojiset:
+ description: |
+ The user's configured [emoji set](/help/emoji-and-emoticons#use-emoticons),
+ used to display emoji to the user everywhere they appear in the UI.
- - "google" - Google modern
- - "google-blob" - Google classic
- - "twitter" - Twitter
- - "text" - Plain text
+ - "google" - Google modern
+ - "google-blob" - Google classic
+ - "twitter" - Twitter
+ - "text" - Plain text
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
- Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
- schema:
- type: string
- example: "google"
- - name: demote_inactive_streams
- in: query
- description: |
- Whether to [demote inactive streams](/help/manage-inactive-streams) in the left sidebar.
+ Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
+ type: string
+ example: "google"
+ demote_inactive_streams:
+ description: |
+ Whether to [demote inactive streams](/help/manage-inactive-streams) in the left sidebar.
- - 1 - Automatic
- - 2 - Always
- - 3 - Never
+ - 1 - Automatic
+ - 2 - Always
+ - 3 - Never
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: user_list_style
- in: query
- description: |
- The style selected by the user for the right sidebar user list.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ user_list_style:
+ description: |
+ The style selected by the user for the right sidebar user list.
- - 1 - Compact
- - 2 - With status
- - 3 - With avatar and status
+ - 1 - Compact
+ - 2 - With status
+ - 3 - With avatar and status
- **Changes**: New in Zulip 6.0 (feature level 141).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: web_stream_unreads_count_display_policy
- in: query
- description: |
- Configuration for which streams should be displayed with a numeric unread count in the left sidebar.
- Streams that do not have an unread count will have a simple dot indicator for whether there are any
- unread messages.
+ **Changes**: New in Zulip 6.0 (feature level 141).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ web_stream_unreads_count_display_policy:
+ description: |
+ Configuration for which streams should be displayed with a numeric unread count in the left sidebar.
+ Streams that do not have an unread count will have a simple dot indicator for whether there are any
+ unread messages.
- - 1 - All streams
- - 2 - Unmuted streams and topics
- - 3 - No streams
+ - 1 - All streams
+ - 2 - Unmuted streams and topics
+ - 3 - No streams
- **Changes**: New in Zulip 8.0 (feature level 210).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 2
- - name: timezone
- in: query
- description: |
- The IANA identifier of the user's [configured time zone](/help/change-your-timezone).
+ **Changes**: New in Zulip 8.0 (feature level 210).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 2
+ timezone:
+ description: |
+ The IANA identifier of the user's [configured time zone](/help/change-your-timezone).
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/display` endpoint.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/display` endpoint.
- Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
- schema:
- type: string
- example: "Asia/Kolkata"
- - name: enable_stream_desktop_notifications
- in: query
- description: |
- Enable visual desktop notifications for stream messages.
+ Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
+ type: string
+ example: "Asia/Kolkata"
+ enable_stream_desktop_notifications:
+ description: |
+ Enable visual desktop notifications for stream messages.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_stream_email_notifications
- in: query
- description: |
- Enable email notifications for stream messages.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_stream_email_notifications:
+ description: |
+ Enable email notifications for stream messages.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_stream_push_notifications
- in: query
- description: |
- Enable mobile notifications for stream messages.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_stream_push_notifications:
+ description: |
+ Enable mobile notifications for stream messages.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_stream_audible_notifications
- in: query
- description: |
- Enable audible desktop notifications for stream messages.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_stream_audible_notifications:
+ description: |
+ Enable audible desktop notifications for stream messages.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: notification_sound
- in: query
- description: |
- Notification sound name.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ notification_sound:
+ description: |
+ Notification sound name.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
- Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 63).
- schema:
- type: string
- example: ding
- - name: enable_desktop_notifications
- in: query
- description: |
- Enable visual desktop notifications for direct messages and @-mentions.
+ Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 63).
+ type: string
+ example: ding
+ enable_desktop_notifications:
+ description: |
+ Enable visual desktop notifications for direct messages and @-mentions.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_sounds
- in: query
- description: |
- Enable audible desktop notifications for direct messages and
- @-mentions.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_sounds:
+ description: |
+ Enable audible desktop notifications for direct messages and
+ @-mentions.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: email_notifications_batching_period_seconds
- in: query
- description: |
- The duration (in seconds) for which the server should wait to batch
- email notifications before sending them.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ email_notifications_batching_period_seconds:
+ description: |
+ The duration (in seconds) for which the server should wait to batch
+ email notifications before sending them.
- **Changes**: New in Zulip 5.0 (feature level 82)
- schema:
- type: integer
- example: 120
- - name: enable_offline_email_notifications
- in: query
- description: |
- Enable email notifications for direct messages and @-mentions received
- when the user is offline.
+ **Changes**: New in Zulip 5.0 (feature level 82)
+ type: integer
+ example: 120
+ enable_offline_email_notifications:
+ description: |
+ Enable email notifications for direct messages and @-mentions received
+ when the user is offline.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_offline_push_notifications
- in: query
- description: |
- Enable mobile notification for direct messages and @-mentions received
- when the user is offline.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_offline_push_notifications:
+ description: |
+ Enable mobile notification for direct messages and @-mentions received
+ when the user is offline.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_online_push_notifications
- in: query
- description: |
- Enable mobile notification for direct messages and @-mentions received
- when the user is online.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_online_push_notifications:
+ description: |
+ Enable mobile notification for direct messages and @-mentions received
+ when the user is online.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_desktop_notifications
- in: query
- description: |
- Enable visual desktop notifications for messages sent to followed topics.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_followed_topic_desktop_notifications:
+ description: |
+ Enable visual desktop notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_email_notifications
- in: query
- description: |
- Enable email notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: true
+ enable_followed_topic_email_notifications:
+ description: |
+ Enable email notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_push_notifications
- in: query
- description: |
- Enable push notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: true
+ enable_followed_topic_push_notifications:
+ description: |
+ Enable push notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: false
- - name: enable_followed_topic_audible_notifications
- in: query
- description: |
- Enable audible desktop notifications for messages sent to followed topics.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: false
+ enable_followed_topic_audible_notifications:
+ description: |
+ Enable audible desktop notifications for messages sent to followed topics.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: false
- - name: enable_digest_emails
- in: query
- description: |
- Enable digest emails when the user is away.
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: false
+ enable_digest_emails:
+ description: |
+ Enable digest emails when the user is away.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_marketing_emails
- in: query
- description: |
- Enable marketing emails. Has no function outside Zulip Cloud.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_marketing_emails:
+ description: |
+ Enable marketing emails. Has no function outside Zulip Cloud.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_login_emails
- in: query
- description: |
- Enable email notifications for new logins to account.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_login_emails:
+ description: |
+ Enable email notifications for new logins to account.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: message_content_in_email_notifications
- in: query
- description: |
- Include the message's content in email notifications for new messages.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ message_content_in_email_notifications:
+ description: |
+ Include the message's content in email notifications for new messages.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: pm_content_in_desktop_notifications
- in: query
- description: |
- Include content of direct messages in desktop notifications.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ pm_content_in_desktop_notifications:
+ description: |
+ Include content of direct messages in desktop notifications.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: wildcard_mentions_notify
- in: query
- description: |
- Whether wildcard mentions (E.g. @**all**) should send notifications
- like a personal mention.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ wildcard_mentions_notify:
+ description: |
+ Whether wildcard mentions (E.g. @**all**) should send notifications
+ like a personal mention.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enable_followed_topic_wildcard_mentions_notify
- in: query
- description: |
- Whether wildcard mentions (e.g., @**all**) in messages sent to followed topics
- should send notifications like a personal mention.
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enable_followed_topic_wildcard_mentions_notify:
+ description: |
+ Whether wildcard mentions (e.g., @**all**) in messages sent to followed topics
+ should send notifications like a personal mention.
- **Changes**: New in Zulip 8.0 (feature level 189).
- schema:
- type: boolean
- example: true
- - name: desktop_icon_count_display
- in: query
- description: |
- Unread count badge (appears in desktop sidebar and browser tab)
+ **Changes**: New in Zulip 8.0 (feature level 189).
+ type: boolean
+ example: true
+ desktop_icon_count_display:
+ description: |
+ Unread count badge (appears in desktop sidebar and browser tab)
- - 1 - All unread messages
- - 2 - DMs, mentions, and followed topics
- - 3 - DMs and mentions
- - 4 - None
+ - 1 - All unread messages
+ - 2 - DMs, mentions, and followed topics
+ - 3 - DMs and mentions
+ - 4 - None
- **Changes**: In Zulip 8.0 (feature level 227), added `DMs, mentions, and followed
- topics` option, renumbering the options to insert it in order.
+ **Changes**: In Zulip 8.0 (feature level 227), added `DMs, mentions, and followed
+ topics` option, renumbering the options to insert it in order.
- Before Zulip 5.0 (feature level 80), this setting was managed by the
- `PATCH /settings/notifications` endpoint.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- example: 1
- - name: realm_name_in_email_notifications_policy
- in: query
- description: |
- Whether to [include organization name in subject of message notification
- emails](/help/email-notifications#include-organization-name-in-subject-line).
+ Before Zulip 5.0 (feature level 80), this setting was managed by the
+ `PATCH /settings/notifications` endpoint.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ example: 1
+ realm_name_in_email_notifications_policy:
+ description: |
+ Whether to [include organization name in subject of message notification
+ emails](/help/email-notifications#include-organization-name-in-subject-line).
- - 1 - Automatic
- - 2 - Always
- - 3 - Never
+ - 1 - Automatic
+ - 2 - Always
+ - 3 - Never
- **Changes**: New in Zulip 7.0 (feature level 168), replacing the
- previous `realm_name_in_notifications` boolean;
- `true` corresponded to `Always`, and `false` to `Never`.
+ **Changes**: New in Zulip 7.0 (feature level 168), replacing the
+ previous `realm_name_in_notifications` boolean;
+ `true` corresponded to `Always`, and `false` to `Never`.
- Before Zulip 5.0 (feature level 80), the previous `realm_name_in_notifications`
- setting was managed by the `PATCH /settings/notifications` endpoint.
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- example: 1
- - name: automatically_follow_topics_policy
- in: query
- description: |
- Which [topics to follow automatically](/help/mute-a-topic).
+ Before Zulip 5.0 (feature level 80), the previous `realm_name_in_notifications`
+ setting was managed by the `PATCH /settings/notifications` endpoint.
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ example: 1
+ automatically_follow_topics_policy:
+ description: |
+ Which [topics to follow automatically](/help/mute-a-topic).
- - 1 - Topics the user participates in
- - 2 - Topics the user sends a message to
- - 3 - Topics the user starts
- - 4 - Never
+ - 1 - Topics the user participates in
+ - 2 - Topics the user sends a message to
+ - 3 - Topics the user starts
+ - 4 - Never
- **Changes**: New in Zulip 8.0 (feature level 214).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- example: 1
- - name: automatically_unmute_topics_in_muted_streams_policy
- in: query
- description: |
- Which [topics to unmute automatically in muted streams](/help/mute-a-topic).
+ **Changes**: New in Zulip 8.0 (feature level 214).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ example: 1
+ automatically_unmute_topics_in_muted_streams_policy:
+ description: |
+ Which [topics to unmute automatically in muted streams](/help/mute-a-topic).
- - 1 - Topics the user participates in
- - 2 - Topics the user sends a message to
- - 3 - Topics the user starts
- - 4 - Never
+ - 1 - Topics the user participates in
+ - 2 - Topics the user sends a message to
+ - 3 - Topics the user starts
+ - 4 - Never
- **Changes**: New in Zulip 8.0 (feature level 214).
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- example: 1
- - name: automatically_follow_topics_where_mentioned
- in: query
- description: |
- Whether the server will automatically mark the user as following
- topics where the user is mentioned.
+ **Changes**: New in Zulip 8.0 (feature level 214).
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ example: 1
+ automatically_follow_topics_where_mentioned:
+ description: |
+ Whether the server will automatically mark the user as following
+ topics where the user is mentioned.
- **Changes**: New in Zulip 8.0 (feature level 235).
- schema:
- type: boolean
- example: true
- - name: presence_enabled
- in: query
- description: |
- Display the presence status to other users when online.
+ **Changes**: New in Zulip 8.0 (feature level 235).
+ type: boolean
+ example: true
+ presence_enabled:
+ description: |
+ Display the presence status to other users when online.
- **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
- the `PATCH /settings/notifications` endpoint.
- schema:
- type: boolean
- example: true
- - name: enter_sends
- in: query
- description: |
- Whether pressing Enter in the compose box sends a message
- (or saves a message edit).
+ **Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
+ the `PATCH /settings/notifications` endpoint.
+ type: boolean
+ example: true
+ enter_sends:
+ description: |
+ Whether pressing Enter in the compose box sends a message
+ (or saves a message edit).
- **Changes**: Before Zulip 5.0 (feature level 81), this setting was managed by
- the `POST /users/me/enter-sends` endpoint, with the same parameter format.
- schema:
- type: boolean
- example: true
- - name: send_private_typing_notifications
- in: query
- description: |
- Whether [typing notifications](/help/typing-notifications) be sent when composing
- direct messages.
+ **Changes**: Before Zulip 5.0 (feature level 81), this setting was managed by
+ the `POST /users/me/enter-sends` endpoint, with the same parameter format.
+ type: boolean
+ example: true
+ send_private_typing_notifications:
+ description: |
+ Whether [typing notifications](/help/typing-notifications) be sent when composing
+ direct messages.
- **Changes**: New in Zulip 5.0 (feature level 105).
- schema:
- type: boolean
- example: true
- - name: send_stream_typing_notifications
- in: query
- description: |
- Whether [typing notifications](/help/typing-notifications) be sent when composing
- stream messages.
+ **Changes**: New in Zulip 5.0 (feature level 105).
+ type: boolean
+ example: true
+ send_stream_typing_notifications:
+ description: |
+ Whether [typing notifications](/help/typing-notifications) be sent when composing
+ stream messages.
- **Changes**: New in Zulip 5.0 (feature level 105).
- schema:
- type: boolean
- example: true
- - name: send_read_receipts
- in: query
- description: |
- Whether other users are allowed to see whether you've
- read messages.
+ **Changes**: New in Zulip 5.0 (feature level 105).
+ type: boolean
+ example: true
+ send_read_receipts:
+ description: |
+ Whether other users are allowed to see whether you've
+ read messages.
- **Changes**: New in Zulip 5.0 (feature level 105).
- schema:
- type: boolean
- example: true
- - name: email_address_visibility
- in: query
- description: |
- The [policy][permission-level] this user has selected for [which other
- users][help-email-visibility] in this organization can see their real
- email address.
+ **Changes**: New in Zulip 5.0 (feature level 105).
+ type: boolean
+ example: true
+ email_address_visibility:
+ description: |
+ The [policy][permission-level] this user has selected for [which other
+ users][help-email-visibility] in this organization can see their real
+ email address.
- - 1 = Everyone
- - 2 = Members only
- - 3 = Administrators only
- - 4 = Nobody
- - 5 = Moderators only
+ - 1 = Everyone
+ - 2 = Members only
+ - 3 = Administrators only
+ - 4 = Nobody
+ - 5 = Moderators only
- **Changes**: New in Zulip 7.0 (feature level 163), replacing the
- realm-level setting.
+ **Changes**: New in Zulip 7.0 (feature level 163), replacing the
+ realm-level setting.
- [permission-level]: /api/roles-and-permissions#permission-levels
- [help-email-visibility]: /help/configure-email-visibility
- schema:
- type: integer
- enum:
- - 1
- - 2
- - 3
- - 4
- - 5
- example: 1
+ [permission-level]: /api/roles-and-permissions#permission-levels
+ [help-email-visibility]: /help/configure-email-visibility
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ example: 1
+ encoding:
+ twenty_four_hour_time:
+ contentType: application/json
+ dense_mode:
+ contentType: application/json
+ web_mark_read_on_scroll_policy:
+ contentType: application/json
+ starred_message_counts:
+ contentType: application/json
+ fluid_layout_width:
+ contentType: application/json
+ high_contrast_mode:
+ contentType: application/json
+ color_scheme:
+ contentType: application/json
+ enable_drafts_synchronization:
+ contentType: application/json
+ translate_emoticons:
+ contentType: application/json
+ display_emoji_reaction_users:
+ contentType: application/json
+ web_escape_navigates_to_home_view:
+ contentType: application/json
+ left_side_userlist:
+ contentType: application/json
+ demote_inactive_streams:
+ contentType: application/json
+ user_list_style:
+ contentType: application/json
+ web_stream_unreads_count_display_policy:
+ contentType: application/json
+ enable_stream_desktop_notifications:
+ contentType: application/json
+ enable_stream_email_notifications:
+ contentType: application/json
+ enable_stream_push_notifications:
+ contentType: application/json
+ enable_stream_audible_notifications:
+ contentType: application/json
+ enable_desktop_notifications:
+ contentType: application/json
+ enable_sounds:
+ contentType: application/json
+ email_notifications_batching_period_seconds:
+ contentType: application/json
+ enable_offline_email_notifications:
+ contentType: application/json
+ enable_offline_push_notifications:
+ contentType: application/json
+ enable_online_push_notifications:
+ contentType: application/json
+ enable_followed_topic_desktop_notifications:
+ contentType: application/json
+ enable_followed_topic_email_notifications:
+ contentType: application/json
+ enable_followed_topic_push_notifications:
+ contentType: application/json
+ enable_followed_topic_audible_notifications:
+ contentType: application/json
+ enable_digest_emails:
+ contentType: application/json
+ enable_marketing_emails:
+ contentType: application/json
+ enable_login_emails:
+ contentType: application/json
+ message_content_in_email_notifications:
+ contentType: application/json
+ pm_content_in_desktop_notifications:
+ contentType: application/json
+ wildcard_mentions_notify:
+ contentType: application/json
+ enable_followed_topic_wildcard_mentions_notify:
+ contentType: application/json
+ desktop_icon_count_display:
+ contentType: application/json
+ realm_name_in_email_notifications_policy:
+ contentType: application/json
+ automatically_follow_topics_policy:
+ contentType: application/json
+ automatically_unmute_topics_in_muted_streams_policy:
+ contentType: application/json
+ automatically_follow_topics_where_mentioned:
+ contentType: application/json
+ presence_enabled:
+ contentType: application/json
+ enter_sends:
+ contentType: application/json
+ send_private_typing_notifications:
+ contentType: application/json
+ send_stream_typing_notifications:
+ contentType: application/json
+ send_read_receipts:
+ contentType: application/json
+ email_address_visibility:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SuccessIgnoredParameters"
@@ -17000,114 +17194,117 @@ paths:
- is_private
parameters:
- $ref: "#/components/parameters/StreamIdInPath"
- - name: description
- in: query
- description: |
- The new [description](/help/change-the-stream-description) for
- the stream, in text/markdown format.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ description:
+ description: |
+ The new [description](/help/change-the-stream-description) for
+ the stream, in text/markdown format.
- Clients should use the `max_stream_description_length` returned
- by the [`POST /register`](/api/register-queue) endpoint to
- determine the maximum stream description length.
+ Clients should use the `max_stream_description_length` returned
+ by the [`POST /register`](/api/register-queue) endpoint to
+ determine the maximum stream description length.
- **Changes**: Removed unnecessary JSON-encoding of this parameter in
- Zulip 4.0 (feature level 64).
- schema:
- type: string
- example: "Discuss Italian history and travel destinations."
- required: false
- allowEmptyValue: true
- - name: new_name
- in: query
- description: |
- The new name for the stream.
+ **Changes**: Removed unnecessary JSON-encoding of this parameter in
+ Zulip 4.0 (feature level 64).
+ type: string
+ example: "Discuss Italian history and travel destinations."
+ new_name:
+ description: |
+ The new name for the stream.
- Clients should use the `max_stream_name_length` returned by the
- [`POST /register`](/api/register-queue) endpoint to determine
- the maximum stream name length.
+ Clients should use the `max_stream_name_length` returned by the
+ [`POST /register`](/api/register-queue) endpoint to determine
+ the maximum stream name length.
- **Changes**: Removed unnecessary JSON-encoding of this parameter in
- Zulip 4.0 (feature level 64).
- schema:
- type: string
- example: Italy
- required: false
- - name: is_private
- in: query
- description: |
- Change whether the stream is a private stream.
- schema:
- type: boolean
- example: true
- required: false
- - name: is_announcement_only
- in: query
- deprecated: true
- description: |
- Whether the stream is limited to announcements.
+ **Changes**: Removed unnecessary JSON-encoding of this parameter in
+ Zulip 4.0 (feature level 64).
+ type: string
+ example: Italy
+ is_private:
+ description: |
+ Change whether the stream is a private stream.
+ type: boolean
+ example: true
+ is_announcement_only:
+ deprecated: true
+ description: |
+ Whether the stream is limited to announcements.
- **Changes**: Deprecated in Zulip 3.0 (feature level 1). Clients
- should use `stream_post_policy` instead.
- schema:
- type: boolean
- example: true
- required: false
- - name: is_web_public
- in: query
- description: |
- Change whether the stream is a web-public stream.
+ **Changes**: Deprecated in Zulip 3.0 (feature level 1). Clients
+ should use `stream_post_policy` instead.
+ type: boolean
+ example: true
+ is_web_public:
+ description: |
+ Change whether the stream is a web-public stream.
- Note that creating web-public streams requires the
- `WEB_PUBLIC_STREAMS_ENABLED` [server setting][server-settings]
- to be enabled on the Zulip server in question, the organization
- to have enabled the `enable_spectator_access` realm setting, and
- the current use to have permission under the organization's
- `create_web_public_stream_policy` realm setting.
+ Note that creating web-public streams requires the
+ `WEB_PUBLIC_STREAMS_ENABLED` [server setting][server-settings]
+ to be enabled on the Zulip server in question, the organization
+ to have enabled the `enable_spectator_access` realm setting, and
+ the current use to have permission under the organization's
+ `create_web_public_stream_policy` realm setting.
- [server-settings]: https://zulip.readthedocs.io/en/stable/production/settings.html
+ [server-settings]: https://zulip.readthedocs.io/en/stable/production/settings.html
- **Changes**: New in Zulip 5.0 (feature level 98).
- schema:
- type: boolean
- example: true
- required: false
- - name: history_public_to_subscribers
- in: query
- description: |
- Whether the stream's message history should be available to
- newly subscribed members, or users can only access messages
- they actually received while subscribed to the stream.
+ **Changes**: New in Zulip 5.0 (feature level 98).
+ type: boolean
+ example: true
+ history_public_to_subscribers:
+ description: |
+ Whether the stream's message history should be available to
+ newly subscribed members, or users can only access messages
+ they actually received while subscribed to the stream.
- Corresponds to the [shared history](/help/stream-permissions)
- option in documentation.
+ Corresponds to the [shared history](/help/stream-permissions)
+ option in documentation.
- It's an error for this parameter to be false for a public or
- web-public stream and when is_private is false.
+ It's an error for this parameter to be false for a public or
+ web-public stream and when is_private is false.
- **Changes**: Before Zulip 6.0 (feature level 136), `history_public_to_subscribers`
- was silently ignored unless the request also contained either `is_private` or
- `is_web_public`.
- schema:
- type: boolean
- example: false
- required: false
- - name: is_default_stream
- in: query
- description: |
- Add or remove the stream as a [default stream][default-stream]
- for new users joining the organization.
+ **Changes**: Before Zulip 6.0 (feature level 136), `history_public_to_subscribers`
+ was silently ignored unless the request also contained either `is_private` or
+ `is_web_public`.
+ type: boolean
+ example: false
+ is_default_stream:
+ description: |
+ Add or remove the stream as a [default stream][default-stream]
+ for new users joining the organization.
- [default-stream]: /help/set-default-streams-for-new-users
+ [default-stream]: /help/set-default-streams-for-new-users
- **Changes**: New in Zulip 8.0 (feature level 200). Previously, default stream status
- could only be changed using the [dedicated API endpoint](/api/add-default-stream).
- schema:
- type: boolean
- example: false
- required: false
- - $ref: "#/components/parameters/StreamPostPolicy"
- - $ref: "#/components/parameters/MessageRetentionDays"
- - $ref: "#/components/parameters/CanRemoveSubscribersGroupId"
+ **Changes**: New in Zulip 8.0 (feature level 200). Previously, default stream status
+ could only be changed using the [dedicated API endpoint](/api/add-default-stream).
+ type: boolean
+ example: false
+ stream_post_policy:
+ $ref: "#/components/schemas/StreamPostPolicy"
+ message_retention_days:
+ $ref: "#/components/schemas/MessageRetentionDays"
+ can_remove_subscribers_group:
+ $ref: "#/components/schemas/CanRemoveSubscribersGroupId"
+ encoding:
+ is_private:
+ contentType: application/json
+ is_announcement_only:
+ contentType: application/json
+ is_web_public:
+ contentType: application/json
+ history_public_to_subscribers:
+ contentType: application/json
+ is_default_stream:
+ contentType: application/json
+ stream_post_policy:
+ contentType: application/json
+ can_remove_subscribers_group:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -17215,14 +17412,20 @@ paths:
x-requires-administrator: true
parameters:
- $ref: "#/components/parameters/StreamIdInPath"
- - name: topic_name
- in: query
- description: |
- The name of the topic to delete.
- schema:
- type: string
- example: new coffee machine
- required: true
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ topic_name:
+ description: |
+ The name of the topic to delete.
+ type: string
+ example: new coffee machine
+ required:
+ - topic_name
responses:
"200":
description: Success.
@@ -17328,89 +17531,89 @@ paths:
parameters:
enum:
- topic
- parameters:
- - name: type
- in: query
- description: |
- Type of the message being composed.
-
- **Changes**: In Zulip 8.0 (feature level 215), stopped supporting
- `"private"` as a valid value for this parameter.
-
- In Zulip 7.0 (feature level 174), `"direct"` was added
- as the preferred way to indicate a direct message is being composed,
- becoming the default value for this parameter and deprecating the
- original `"private"`.
-
- New in Zulip 4.0 (feature level 58). Previously, typing notifications
- were only for direct messages.
- schema:
- type: string
- enum:
- - direct
- - stream
- default: direct
- example: direct
- - name: op
- in: query
- description: |
- Whether the user has started (`"start"`) or stopped (`"stop"`) typing.
- schema:
- type: string
- enum:
- - start
- - stop
- example: start
- required: true
- - name: to
- in: query
- description: |
- User IDs of the recipients of the message being typed. Required for the
- `"direct"` type. Ignored in the case of `"stream"` type. Send a JSON-encoded
- list of user IDs. (Use a list even if there is only one recipient.)
-
- **Changes**: In Zulip 8.0 (feature level 215), stopped using this parameter
- for the `"stream"` type. Previously, in the case of the `"stream"` type, it
- accepted a single-element list containing the ID of the stream. A new parameter,
- `stream_id`, is now used for this.
-
- Support for typing notifications for stream messages
- is new in Zulip 4.0 (feature level 58). Previously, typing
- notifications were only for direct messages.
-
- Before Zulip 2.0.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).
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- minLength: 1
- example: [9, 10]
- - name: stream_id
- in: query
- description: |
- ID of the stream in which the message is being typed. Required for the `"stream"`
- type. Ignored in the case of `"direct"` type.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ type:
+ description: |
+ Type of the message being composed.
- **Changes**: New in Zulip 8.0 (feature level 215). Previously, a single-element
- list containing the ID of the stream was passed in `to` parameter.
- schema:
- type: integer
- example: 7
- - name: topic
- in: query
- description: |
- Topic to which message is being typed. Required for the `"stream"` type.
- Ignored in the case of `"direct"` type.
+ **Changes**: In Zulip 8.0 (feature level 215), stopped supporting
+ `"private"` as a valid value for this parameter.
- **Changes**: New in Zulip 4.0 (feature level 58). Previously, typing
- notifications were only for direct messages.
- schema:
- type: string
- example: typing notifications
+ In Zulip 7.0 (feature level 174), `"direct"` was added
+ as the preferred way to indicate a direct message is being composed,
+ becoming the default value for this parameter and deprecating the
+ original `"private"`.
+
+ New in Zulip 4.0 (feature level 58). Previously, typing notifications
+ were only for direct messages.
+ type: string
+ enum:
+ - direct
+ - stream
+ default: direct
+ example: direct
+ op:
+ description: |
+ Whether the user has started (`"start"`) or stopped (`"stop"`) typing.
+ type: string
+ enum:
+ - start
+ - stop
+ example: start
+ to:
+ description: |
+ User IDs of the recipients of the message being typed. Required for the
+ `"direct"` type. Ignored in the case of `"stream"` type. Send a JSON-encoded
+ list of user IDs. (Use a list even if there is only one recipient.)
+
+ **Changes**: In Zulip 8.0 (feature level 215), stopped using this parameter
+ for the `"stream"` type. Previously, in the case of the `"stream"` type, it
+ accepted a single-element list containing the ID of the stream. A new parameter,
+ `stream_id`, is now used for this.
+
+ Support for typing notifications for stream messages
+ is new in Zulip 4.0 (feature level 58). Previously, typing
+ notifications were only for direct messages.
+
+ Before Zulip 2.0.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).
+ type: array
+ items:
+ type: integer
+ minLength: 1
+ example: [9, 10]
+ stream_id:
+ description: |
+ ID of the stream in which the message is being typed. Required for the `"stream"`
+ type. Ignored in the case of `"direct"` type.
+
+ **Changes**: New in Zulip 8.0 (feature level 215). Previously, a single-element
+ list containing the ID of the stream was passed in `to` parameter.
+ type: integer
+ example: 7
+ topic:
+ description: |
+ Topic to which message is being typed. Required for the `"stream"` type.
+ Ignored in the case of `"direct"` type.
+
+ **Changes**: New in Zulip 4.0 (feature level 58). Previously, typing
+ notifications were only for direct messages.
+ type: string
+ example: typing notifications
+ required:
+ - op
+ encoding:
+ to:
+ contentType: application/json
+ stream_id:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -17436,54 +17639,55 @@ paths:
tags: ["users"]
description: |
Create a new [user group](/help/user-groups).
- parameters:
- - name: name
- in: query
- description: |
- The name of the user group.
- schema:
- type: string
- example: marketing
- required: true
- - name: description
- in: query
- description: |
- The description of the user group.
- schema:
- type: string
- example: The marketing team.
- required: true
- - name: members
- in: query
- description: |
- An array containing the user IDs of the initial members for the
- new user group.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [1, 2, 3, 4]
- required: true
- - name: can_mention_group
- in: query
- description: |
- ID of the user group whose members are allowed to mention the new
- user group.
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ name:
+ description: |
+ The name of the user group.
+ type: string
+ example: marketing
+ description:
+ description: |
+ The description of the user group.
+ type: string
+ example: The marketing team.
+ members:
+ description: |
+ An array containing the user IDs of the initial members for the
+ new user group.
+ type: array
+ items:
+ type: integer
+ example: [1, 2, 3, 4]
+ can_mention_group:
+ description: |
+ ID of the user group whose members are allowed to mention the new
+ user group.
- This setting cannot be set to `"role:internet"` and `"role:owners"`
- system groups.
+ This setting cannot be set to `"role:internet"` and `"role:owners"`
+ system groups.
- **Changes**: Before Zulip 8.0 (feature level 198),
- the `can_mention_group` setting was named `can_mention_group_id`.
+ **Changes**: Before Zulip 8.0 (feature level 198),
+ the `can_mention_group` setting was named `can_mention_group_id`.
- New in Zulip 8.0 (feature level 191). Previously, groups
- could be mentioned if and only if they were not system groups.
- schema:
- type: integer
- example: 11
- required: false
+ New in Zulip 8.0 (feature level 191). Previously, groups
+ could be mentioned if and only if they were not system groups.
+ type: integer
+ example: 11
+ required:
+ - name
+ - description
+ - members
+ encoding:
+ members:
+ contentType: application/json
+ can_mention_group:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -17517,30 +17721,32 @@ paths:
- delete
parameters:
- $ref: "#/components/parameters/UserGroupId"
- - name: delete
- in: query
- description: |
- The list of user IDs to be removed from the user group.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [10]
- required: false
- - name: add
- in: query
- description: |
- The list of user IDs to be added to the user group.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [12, 13]
- required: false
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ delete:
+ description: |
+ The list of user IDs to be removed from the user group.
+ type: array
+ items:
+ type: integer
+ example: [10]
+ add:
+ description: |
+ The list of user IDs to be added to the user group.
+ type: array
+ items:
+ type: integer
+ example: [12, 13]
+ encoding:
+ delete:
+ contentType: application/json
+ add:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -17585,44 +17791,47 @@ paths:
Update the name or description of a [user group](/help/user-groups).
parameters:
- $ref: "#/components/parameters/UserGroupId"
- - name: name
- in: query
- description: |
- The new name of the group.
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ name:
+ description: |
+ The new name of the group.
- **Changes**: Before Zulip 7.0 (feature level 165), this was
- a required field.
- schema:
- type: string
- example: marketing team
- - name: description
- in: query
- description: |
- The new description of the group.
+ **Changes**: Before Zulip 7.0 (feature level 165), this was
+ a required field.
+ type: string
+ example: marketing team
+ description:
+ description: |
+ The new description of the group.
- **Changes**: Before Zulip 7.0 (feature level 165), this was
- a required field.
- schema:
- type: string
- example: The marketing team.
- - name: can_mention_group
- in: query
- description: |
- ID of the new user group whose members are allowed to mention the
- group.
+ **Changes**: Before Zulip 7.0 (feature level 165), this was
+ a required field.
+ type: string
+ example: The marketing team.
+ can_mention_group:
+ description: |
+ ID of the new user group whose members are allowed to mention the
+ group.
- This setting cannot be set to `"role:internet"` and `"role:owners"`
- system groups.
+ This setting cannot be set to `"role:internet"` and `"role:owners"`
+ system groups.
- **Changes**: Before Zulip 8.0 (feature level 198),
- the `can_mention_group` setting was named `can_mention_group_id`.
+ **Changes**: Before Zulip 8.0 (feature level 198),
+ the `can_mention_group` setting was named `can_mention_group_id`.
- New in Zulip 8.0 (feature level 191). Previously, groups
- could be mentioned if and only if they were not system groups.
- schema:
- type: integer
- example: 12
- required: false
+ New in Zulip 8.0 (feature level 191). Previously, groups
+ could be mentioned if and only if they were not system groups.
+ type: integer
+ example: 12
+ encoding:
+ can_mention_group:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -17802,30 +18011,32 @@ paths:
- delete
parameters:
- $ref: "#/components/parameters/UserGroupId"
- - name: delete
- in: query
- description: |
- The list of user group IDs to be removed from the user group.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [10]
- required: false
- - name: add
- in: query
- description: |
- The list of user group IDs to be added to the user group.
- content:
- application/json:
- schema:
- type: array
- items:
- type: integer
- example: [9, 10]
- required: false
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ delete:
+ description: |
+ The list of user group IDs to be removed from the user group.
+ type: array
+ items:
+ type: integer
+ example: [10]
+ add:
+ description: |
+ The list of user group IDs to be added to the user group.
+ type: array
+ items:
+ type: integer
+ example: [9, 10]
+ encoding:
+ delete:
+ contentType: application/json
+ add:
+ contentType: application/json
responses:
"200":
$ref: "#/components/responses/SimpleSuccess"
@@ -17913,10 +18124,26 @@ paths:
tags: ["real_time_events"]
description: |
(Ignored)
- parameters:
- - $ref: "#/components/parameters/Event_types"
- - $ref: "#/components/parameters/Narrow"
- - $ref: "#/components/parameters/AllPublicStreams"
+ requestBody:
+ required: false
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ event_types:
+ $ref: "#/components/schemas/Event_types"
+ narrow:
+ $ref: "#/components/schemas/Narrow"
+ all_public_streams:
+ $ref: "#/components/schemas/AllPublicStreams"
+ encoding:
+ event_types:
+ contentType: application/json
+ narrow:
+ contentType: application/json
+ all_public_streams:
+ contentType: application/json
security:
- basicAuth: []
responses:
@@ -20366,32 +20593,7 @@ components:
A typical failed JSON response for when the push device token is not recognized
by the push notification bouncer:
-
- ###################
- # Shared responses
- ###################
- responses:
- SimpleSuccess:
- description: Success.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/JsonSuccess"
- SuccessIgnoredParameters:
- description: Success.
- content:
- application/json:
- schema:
- allOf:
- - $ref: "#/components/schemas/IgnoredParametersSuccess"
-
- ####################
- # Shared parameters
- ####################
- parameters:
Event_types:
- name: event_types
- in: query
description: |
A JSON-encoded array indicating which types of events you're interested
in. Values that you might find useful include:
@@ -20409,17 +20611,11 @@ components:
Event types not supported by the server are ignored, in order to simplify
the implementation of client apps that support multiple server versions.
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example: ["message"]
- required: false
+ type: array
+ items:
+ type: string
+ example: ["message"]
Narrow:
- name: narrow
- in: query
description: |
A JSON-encoded array of arrays of length 2 indicating the
[narrow filter(s)](/api/construct-narrow) for which you'd
@@ -20450,95 +20646,35 @@ components:
Defaults to `[]`.
- **Changes**: In Zulip 7.0 (feature level 177), narrows gained support
- for three new filters related to direct messages: `is:dm`, `dm` and
- `dm-including`; replacing and deprecating `is:private`, `pm-with` and
- `group-pm-with` respectively.
- content:
- application/json:
- schema:
- type: array
- items:
- type: array
- items:
- type: string
- default: []
- example: [["stream", "Denmark"]]
- required: false
- AllPublicStreams:
- name: all_public_streams
- in: query
- description: |
- Whether you would like to request message events from all public
- streams. Useful for workflow bots that you'd like to see all new messages
- sent to public streams. (You can also subscribe the user to private streams).
- schema:
- type: boolean
- default: false
- example: true
- UserGroupId:
- name: user_group_id
- in: path
- description: |
- The ID of the target user group.
- schema:
- type: integer
- example: 33
- required: true
- QueueId:
- name: queue_id
- in: query
- description: |
- The ID of an event queue that was previously registered via
- `POST /api/v1/register` (see [Register a queue](/api/register-queue)).
- schema:
- type: string
- example: fb67bf8a-c031-47cc-84cf-ed80accacda8
- required: true
- StreamIdInPath:
- name: stream_id
- in: path
- description: |
- The ID of the stream to access.
- schema:
- type: integer
- example: 1
- required: true
- ClientGravatar:
- name: client_gravatar
- in: query
- description: |
- Whether the client supports computing gravatars URLs. If
- enabled, `avatar_url` will be included in the response only
- if there is a Zulip avatar, and will be `null` for users who
- are using gravatar as their avatar. This option
- significantly reduces the compressed size of user data,
- since gravatar URLs are long, random strings and thus do not
- compress well. The `client_gravatar` field is set to `true` if
- clients can compute their own gravatars.
-
- **Changes**: The default value of this parameter was `false`
- prior to Zulip 5.0 (feature level 92).
- schema:
- type: boolean
- default: true
- example: false
+ **Changes**: In Zulip 7.0 (feature level 177), narrows gained support
+ for three new filters related to direct messages: `is:dm`, `dm` and
+ `dm-including`; replacing and deprecating `is:private`, `pm-with` and
+ `group-pm-with` respectively.
+ type: array
+ items:
+ type: array
+ items:
+ type: string
+ default: []
+ example: [["stream", "Denmark"]]
+ AllPublicStreams:
+ description: |
+ Whether you would like to request message events from all public
+ streams. Useful for workflow bots that you'd like to see all new messages
+ sent to public streams. (You can also subscribe the user to private streams).
+ type: boolean
+ default: false
+ example: true
RequiredContent:
- name: content
- in: query
description: |
The content of the message.
Clients should use the `max_message_length` returned by the
[`POST /register`](/api/register-queue) endpoint to determine
the maximum message size.
- schema:
- type: string
+ type: string
example: Hello
- required: true
OptionalContent:
- name: content
- in: query
description: |
The updated content of the target message.
@@ -20549,42 +20685,9 @@ components:
Note that a message's content and stream cannot be changed at the
same time, so sending both `content` and `stream_id` parameters will
throw an error.
- schema:
- type: string
+ type: string
example: Hello
- MessageId:
- name: message_id
- in: path
- description: |
- The target message's ID.
- schema:
- type: integer
- example: 43
- required: true
- UserId:
- name: user_id
- in: path
- description: |
- The target user's ID.
- schema:
- type: integer
- example: 12
- required: true
- MutedUserId:
- name: muted_user_id
- in: path
- description: |
- The ID of the user to mute/unmute.
-
- **Changes**: Before Zulip 8.0 (feature level 188), bot users could not
- be muted/unmuted, and specifying a bot user's ID returned an error response.
- schema:
- type: integer
- example: 10
- required: true
StreamPostPolicy:
- name: stream_post_policy
- in: query
description: |
[Policy][permission-level] for which users can post messages to the stream.
@@ -20598,14 +20701,10 @@ components:
[permission-level]: /api/roles-and-permissions#permission-levels
[calc-full-member]: /api/roles-and-permissions#determining-if-a-user-is-a-full-member
- schema:
- type: integer
- default: 1
+ type: integer
+ default: 1
example: 2
- required: false
HistoryPublicToSubscribers:
- name: history_public_to_subscribers
- in: query
description: |
Whether the stream's message history should be available to
newly subscribed members, or users can only access messages
@@ -20613,42 +20712,9 @@ components:
Corresponds to the [shared history](/help/stream-permissions)
option in documentation.
- schema:
- type: boolean
+ type: boolean
example: false
- required: false
-
- IncludeSubscribers:
- name: include_subscribers
- in: query
- description: |
- Whether each returned stream object should include a `subscribers`
- field containing a list of the user IDs of its subscribers.
-
- (This may be significantly slower in organizations with
- thousands of users subscribed to many streams.)
-
- **Changes**: New in Zulip 2.1.0.
- schema:
- type: boolean
- default: false
- example: true
- IncludeCustomProfileFields:
- name: include_custom_profile_fields
- in: query
- description: |
- Whether the client wants [custom profile field](/help/custom-profile-fields)
- data to be included in the response.
-
- **Changes**: New in Zulip 2.1.0. Previous versions do no offer these
- data via the API.
- schema:
- type: boolean
- default: false
- example: true
Principals:
- name: principals
- in: query
description: |
A list of user IDs (preferred) or Zulip API email
addresses of the users to be subscribed to or unsubscribed
@@ -20656,20 +20722,15 @@ components:
not provided, then the requesting user/bot is subscribed.
**Changes**: The integer format is new in Zulip 3.0 (feature level 9).
- content:
- application/json:
- schema:
- oneOf:
- - type: array
- items:
- type: string
- - type: array
- items:
- type: integer
- example: ["[email protected]"]
+ oneOf:
+ - type: array
+ items:
+ type: string
+ - type: array
+ items:
+ type: integer
+ example: ["[email protected]"]
ReactionType:
- name: reaction_type
- in: query
description: |
A string indicating the type of emoji. Each emoji `reaction_type`
has an independent namespace for values of `emoji_code`.
@@ -20693,13 +20754,9 @@ components:
optional for [custom emoji](/help/custom-emoji);
previously, this endpoint assumed `unicode_emoji` if this
parameter was not specified.
- schema:
- type: string
+ type: string
example: "unicode_emoji"
- required: false
EmojiCode:
- name: emoji_code
- in: query
description: |
A unique identifier, defining the specific emoji codepoint requested,
within the namespace of the `reaction_type`.
@@ -20715,13 +20772,9 @@ components:
`emoji_code` in the data for the original reaction allows the
Zulip server to correctly interpret your upvote as an upvote
rather than a reaction with a "different" emoji.
- schema:
- type: string
+ type: string
example: "1f419"
- required: false
MessageRetentionDays:
- name: message_retention_days
- in: query
description: |
Number of days that messages sent to this stream will be stored
before being automatically deleted by the [message retention
@@ -20736,15 +20789,11 @@ components:
`"unlimited"`.
New in Zulip 3.0 (feature level 17).
- schema:
- oneOf:
- - type: string
- - type: integer
+ oneOf:
+ - type: string
+ - type: integer
example: "20"
- required: false
CanRemoveSubscribersGroupId:
- name: can_remove_subscribers_group
- in: query
description: |
ID of the [user group](/api/get-user-groups) whose members are
allowed to unsubscribe others from the stream. Note that a user
@@ -20761,24 +20810,16 @@ components:
was named `can_remove_subscribers_group_id`.
New in Zulip 7.0 (feature level 161).
- schema:
- type: integer
+ type: integer
example: 20
- required: false
LinkifierPattern:
- name: pattern
- in: query
description: |
The [Python regular
expression](https://docs.python.org/3/howto/regex.html) that should
trigger the linkifier.
- schema:
- type: string
+ type: string
example: "#(?P<id>[0-9]+)"
- required: true
LinkifierURLTemplate:
- name: url_template
- in: query
description: |
The [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html)
compliant URL template used for the link.
@@ -20788,10 +20829,136 @@ components:
**Changes**: New in Zulip 7.0 (feature level 176). This replaced
the `url_format_string` parameter, which was a format string in which
named groups' content could be inserted with `%(name_of_group)s`.
+ type: string
+ example: https://github.com/zulip/zulip/issues/{id}
+
+ ###################
+ # Shared responses
+ ###################
+ responses:
+ SimpleSuccess:
+ description: Success.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JsonSuccess"
+ SuccessIgnoredParameters:
+ description: Success.
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: "#/components/schemas/IgnoredParametersSuccess"
+
+ ####################
+ # Shared parameters
+ ####################
+ parameters:
+ UserGroupId:
+ name: user_group_id
+ in: path
+ description: |
+ The ID of the target user group.
+ schema:
+ type: integer
+ example: 33
+ required: true
+ QueueId:
+ name: queue_id
+ in: query
+ description: |
+ The ID of an event queue that was previously registered via
+ `POST /api/v1/register` (see [Register a queue](/api/register-queue)).
schema:
type: string
- example: https://github.com/zulip/zulip/issues/{id}
+ example: fb67bf8a-c031-47cc-84cf-ed80accacda8
+ required: true
+ StreamIdInPath:
+ name: stream_id
+ in: path
+ description: |
+ The ID of the stream to access.
+ schema:
+ type: integer
+ example: 1
+ required: true
+ ClientGravatar:
+ name: client_gravatar
+ in: query
+ description: |
+ Whether the client supports computing gravatars URLs. If
+ enabled, `avatar_url` will be included in the response only
+ if there is a Zulip avatar, and will be `null` for users who
+ are using gravatar as their avatar. This option
+ significantly reduces the compressed size of user data,
+ since gravatar URLs are long, random strings and thus do not
+ compress well. The `client_gravatar` field is set to `true` if
+ clients can compute their own gravatars.
+
+ **Changes**: The default value of this parameter was `false`
+ prior to Zulip 5.0 (feature level 92).
+ schema:
+ type: boolean
+ default: true
+ example: false
+ MessageId:
+ name: message_id
+ in: path
+ description: |
+ The target message's ID.
+ schema:
+ type: integer
+ example: 43
+ required: true
+ UserId:
+ name: user_id
+ in: path
+ description: |
+ The target user's ID.
+ schema:
+ type: integer
+ example: 12
+ required: true
+ MutedUserId:
+ name: muted_user_id
+ in: path
+ description: |
+ The ID of the user to mute/unmute.
+
+ **Changes**: Before Zulip 8.0 (feature level 188), bot users could not
+ be muted/unmuted, and specifying a bot user's ID returned an error response.
+ schema:
+ type: integer
+ example: 10
required: true
+ IncludeSubscribers:
+ name: include_subscribers
+ in: query
+ description: |
+ Whether each returned stream object should include a `subscribers`
+ field containing a list of the user IDs of its subscribers.
+
+ (This may be significantly slower in organizations with
+ thousands of users subscribed to many streams.)
+
+ **Changes**: New in Zulip 2.1.0.
+ schema:
+ type: boolean
+ default: false
+ example: true
+ IncludeCustomProfileFields:
+ name: include_custom_profile_fields
+ in: query
+ description: |
+ Whether the client wants [custom profile field](/help/custom-profile-fields)
+ data to be included in the response.
+
+ **Changes**: New in Zulip 2.1.0. Previous versions do no offer these
+ data via the API.
+ schema:
+ type: boolean
+ default: false
+ example: true
DirectMemberOnly:
name: direct_member_only
in: query