Reorder custom profile fields
This endpoint is only available to organization administrators.
Reorder the custom profile fields in the user's organization.
PATCH https://zulip.martinbrook.id.au/api/v1/realm/profile_fields
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.
order = [8, 7, 6, 5, 4, 3, 2, 1]
request = {"order": json.dumps(order)}
result = client.call_endpoint(url="/realm/profile_fields", method="PATCH", request=request)
print(result)
curl -sSX PATCH https://zulip.martinbrook.id.au/api/v1/realm/profile_fields \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode 'order=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]'
Parameters
order (integer)[] required
Example: [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
A typical successful JSON response may look like:
{
"msg": "",
"result": "success"
}