> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emailbison.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Users

If a user (associated with an email account) has not registered yet for any of your workspaces on your EmailBison instance, you can programmatically register that email account using the API.

If they have already registered, and you want to give them access to other workspaces using the API, visit the [Inviting and Accepting Members](/workspaces/inviting-and-accepting-members) page.

### Creating a User

Send a `POST` request to the [following endpoint](https://dedi.emailbison.com/api/reference#tag/workspaces-v11/post/api/workspaces/v1.1/users).

```bash theme={null}
/api/workspaces/v1.1/users
```

This request takes a [JSON body](/get-started/quickstart/notes-and-terminology#body-parameters) with the following 4 fields.

<ParamField body="name" type="string" required>
  A name for the user.
</ParamField>

<ParamField body="password" type="string" required>
  A password for the user.
</ParamField>

<ParamField body="email" type="string" required>
  The email address of the user.
</ParamField>

<ParamField body="role" type="string" required>
  A role for the user. One of `admin`, `editor`, `client`.
</ParamField>

An example of a request creating a user:

<CodeGroup>
  ```bash curl theme={null}
  curl https://dedi.emailbison.com/api/workspaces/v1.1/users \
    --request POST \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
    --data '{
    "name": "John Doe",
    "password": "securepasswordlol",
    "email": "example@example.com",
    "role": "admin"
  }'
  ```

  ```JavaScript JavaScript theme={null}
  fetch('https://dedi.emailbison.com/api/workspaces/v1.1/users', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer YOUR_SECRET_TOKEN'
    },
    body: JSON.stringify({
      name: 'John Doe',
      password: 'securepasswordlol',
      email: 'example@example.com',
      role: 'admin'
    })
  })
  ```

  ```Python Python theme={null}
  import requests

  url = "https://dedi.emailbison.com/api/workspaces/v1.1/users"

  payload = {
      "name": "John Doe",
      "password": "securepasswordlol",
      "email": "example@example.com",
      "role": "admin"
  }
  headers = {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_SECRET_TOKEN"
  }

  response = requests.post(url, json=payload, headers=headers)
  ```
</CodeGroup>
