<commit_before>---
category: User
path: '/-/api/user/create'
title: 'Create User'
type: 'POST'

---

This method allows API consumers to create new users for their Koding teams.

### Authentication

* The headers must include a **valid authentication token**.
```Authentication: Bearer {TOKEN}```


### Parameters

* **email** (_required_)
  * should be a valid email address, must not be used before.

* **username** (_required when there is no suggestedUsername_)
  * should be between 4-25 characters, can contain lowercase alphanumerics and dashes

* **suggestedUsername** (_required when there is no username_)
  * should be between 4-15 characters, can contain lowercase alphanumerics and dashes

* **firstName** (_optional_)

* **lastName** (_optional_)

### Response

**If succeeds**, returns the username of the newly created user.
```{
  data : {
    username : 'username'
  }<commit_msg>update user create docs<commit_after>---
category: User
path: '/-/api/user/create'
title: 'Create User'
type: 'POST'

---

This method allows API consumers to create new users for their Koding teams.

### Authentication

* The headers must include a **valid authentication token**.
```Authentication: Bearer {TOKEN}```


### Parameters

* **email** (_required_)
  * should be a valid email address, must not be used before.

* **username** (_required when there is no suggestedUsername_)
  * should be between 4-25 characters, can contain lowercase alphanumerics and dashes

* **suggestedUsername** (_required when there is no username_)
  * should be between 4-15 characters, can contain lowercase alphanumerics and dashes
  * a new username will be generated by appending a random suffix to suggestedUsername value
    if no username is given or username is unavailable

* **firstName** (_optional_)

* **lastName** (_optional_)

### Response

**If succeeds**, returns the username of the newly created user.
```{
  data : {
    username : 'username'
  }
{'fraction_non_alphanumeric': 0.1120777891504606, 'fraction_numerical': 0.006141248720573183, 'mean_word_length': 4.400552486187845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7464335', 'n_tokens_mistral': 548, 'n_tokens_neox': 526, 'n_words': 232}