> For the complete documentation index, see [llms.txt](https://developer.leaderos.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.leaderos.net/auth/register.md).

# Register

<mark style="color:green;">`POST`</mark> `https://yourwebsite.com/api/auth/register`

#### Request Body

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| username<mark style="color:red;">\*</mark>  | string |             |
| password<mark style="color:red;">\*</mark>  | string |             |
| email<mark style="color:red;">\*</mark>     | string |             |
| ip<mark style="color:red;">\*</mark>        | string |             |
| useragent<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200: Successful" %}

```json
{
    "status": true,
    "data": {
        "token": "202cb962ac59075b964b07152d234b70"
    }
}
```

{% endtab %}

{% tab title="400:  Username exist" %}

```json
{
    "status": false,
    "error": "USERNAME_ALREADY_EXIST",
    "message": "Username already exists!"
}
```

{% endtab %}

{% tab title="400: Email exist" %}

```json
{
    "status": false,
    "error": "EMAIL_ALREADY_EXIST",
    "message": "Email already exists!"
}
```

{% endtab %}

{% tab title="400: Register limit" %}

```json
{
    "status": false,
    "error": "REGISTER_LIMIT",
    "message": "You have reached the limit of registrations!"
}
```

{% endtab %}

{% tab title="400: Invalid username" %}

```json
{
    "status": false,
    "error": "INVALID_USERNAME",
    "message": "Invalid username!"
}
```

{% endtab %}
{% endtabs %}
