# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.leaderos.net/auth/register.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
