Reorder custom profile fields
This endpoint is only available to organization administrators.
PATCH https://co.toya.net.pl/api/v1/realm/profile_fields
Reorder the custom profile fields in the user's organization.
Custom profile fields are displayed in Zulip UI widgets in order; this
endpoint allows administrative settings UI to change the field ordering.
This endpoint is used to implement the dragging feature described in the
custom profile fields documentation.
Usage examples
#!/usr/bin/env python
import zulip
# The user for this zuliprc file must be an organization administrator
client = zulip.Client(config_file="~/zuliprc-admin")
# Reorder the custom profile fields in the user's organization.
request = {"order": json.dumps(reordered_profile_fields)}
result = client.call_endpoint(url="/realm/profile_fields", method="PATCH", request=request)
print(result)
curl -sSX PATCH https://co.toya.net.pl/api/v1/realm/profile_fields \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode 'order=[11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]'
Parameters
order (integer)[] required
Example: [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
A list of the IDs of all the custom profile fields defined in this
organization, in the desired new order.
Response
Example response(s)
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported
array.
A typical successful JSON response may look like:
{
"msg": "",
"result": "success"
}