Create User

POST {{URL}}/v1/users

The admin account is the only account that can create and delete users . We recommend using the admin account only for this purpose. You should create user accounts and use them to manage your WhatsApp Business API Clients.

To create an account for a user within your business who can access the WhatsApp Business API, send the username and password to the WhatsApp Business API Client using the /users endpoint. It validates the username and password and then creates a new account if one does not already exist for that username . The password is processed with a one-way hash and stored in a data volume. Both username and password are required parameters.

Request Parameters

Name Description
username
Required .

Must be a minimum of 4 characters and a maximum of 32 characters. Establish a template for username, such as first initial and last name, to avoid creating multiple accounts for the same person.
password
Required .

Must be a minimum of 8 characters and a maximum of 64 characters.
Authorization
Required .

Authentication token for the administrator who is running the request. For more information, see the Login and Authentication — Tokens documentation.

Common Errors

You may encounter the following errors when creating a new user:

HTTP Status Code Reason
400
  • Password is too short (less than 8 characters) or too long (greater than 64 characters).
  • Username is too short (fewer than 4 characters) or too long (greater than 32 characters)

Submit the request again with an appropriate length username/password .
403 You are not using the admin account to create the user account.
500 Unable to create the account, possibly because it already exists.

If there are other errors in the response, refer to the following sources for more information: Error Codes and HTTP Status Codes .

Request Body

{"username"=>"<User Username>", "password"=>"<User Password>"}

HEADERS

| Key | Datatype | Required | Description | | Content-Type | string | | | | Authorization | string | | |

RESPONSES

status: Created

{"users":[{"username":"username"}],"meta":{"api_status":"stable","version":"v2.45.1"}}