diff --git a/templates/zerver/api/create-user.md b/templates/zerver/api/create-user.md index 4839480d28..97b58365fa 100644 --- a/templates/zerver/api/create-user.md +++ b/templates/zerver/api/create-user.md @@ -1,8 +1,8 @@ # Create a user -Create a new user in a realm. +{!api-admin-only.md!} -**Note**: The requesting user must be an administrator. +Create a new user account via the API. `POST {{ api_url }}/v1/users` diff --git a/templates/zerver/api/get-user-groups.md b/templates/zerver/api/get-user-groups.md index 1925c6fb79..3723b6f6be 100644 --- a/templates/zerver/api/get-user-groups.md +++ b/templates/zerver/api/get-user-groups.md @@ -1,9 +1,8 @@ # Get user groups -Fetches all of the user groups in the organization. +{!api-members-only.md!} -**Note**: Only organization members or admins can contact this -endpoint; bots and guests cannot contact this endpoint. +Fetches all of the user groups in the organization. `GET {{ api_url }}/v1/user_groups` diff --git a/templates/zerver/help/include/api-admin-only.md b/templates/zerver/help/include/api-admin-only.md new file mode 100644 index 0000000000..8d390e74cf --- /dev/null +++ b/templates/zerver/help/include/api-admin-only.md @@ -0,0 +1,2 @@ +!!! warn "" + This endpoint is only available to organization administrators. diff --git a/templates/zerver/help/include/api-members-only.md b/templates/zerver/help/include/api-members-only.md new file mode 100644 index 0000000000..268dab474a --- /dev/null +++ b/templates/zerver/help/include/api-members-only.md @@ -0,0 +1,3 @@ +!!! warn "" + This endpoint is only available to Members and Administrators; + bots and guests cannot use this endpoint.