This endpoint is only available to organization administrators.
POST https://zulip.wikimedia.de/api/v1/users
Create a new user account via the API.
Note: This endpoint is limited to organization administrators
who additionally have the can_create_users permission for the Zulip
organization. Zulip Cloud users can request the can_create_users
permission for a bot by contacting Zulip Cloud support
with an explanation for why it is needed. Self-hosted installations
can toggle can_create_users on an account using the manage.py
change_user_rolemanagement command.
Changes: Before Zulip 4.0 (feature level 36), this endpoint was
available to all organization administrators.
Usage examples
Python
JavaScript
curl
#!/usr/bin/env pythonimportzulip# The user for this zuliprc file must be an organization administratorclient=zulip.Client(config_file="~/zuliprc-admin")# Create a userrequest={"email":"newbie@zulip.com","password":"temp","full_name":"New User",}result=client.create_user(request)print(result)
More examples and documentation can be found here.
constzulipInit=require("zulip-js");// The user for this zuliprc file must be an organization administrator.constconfig={zuliprc:"zuliprc-admin"};(async()=>{constclient=awaitzulipInit(config);constparams={email:"notnewbie@zulip.com",password:"temp",full_name:"New User",};console.log(awaitclient.users.create(params));})();
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","user_id":25}
A typical JSON response for when another user with the same
email address already exists in the realm:
{"code":"BAD_REQUEST","msg":"Email 'newbie@zulip.com' already in use","result":"error"}