> For the complete documentation index, see [llms.txt](https://developer.perculus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.perculus.com/perculus-api/services/kullanici-yonetimi/user-create.md).

# Kullanıcı Oluşturma

Aşağıdaki listede bir kullanıcı oluştururken ekleyebileceğiniz tüm parametrelerin listesini görebilirsiniz:

<table><thead><tr><th width="165">Parametre</th><th width="106">Tip</th><th>Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>name</td><td>string</td><td>Evet</td><td></td></tr><tr><td>surname</td><td>string</td><td>Evet</td><td></td></tr><tr><td>email</td><td>string</td><td>Evet</td><td></td></tr><tr><td>username</td><td>string</td><td>Evet</td><td></td></tr><tr><td>role</td><td>string</td><td>Hayır</td><td>a=Admin<br>u=User<br>e=Öğretmen</td></tr></tbody></table>

**Tüm parametrelerden sonra aşağıdaki şekilde örnek bir kullanıcı oluşturabilirsiniz:**

{% tabs %}
{% tab title="CURL" %}

<pre class="language-bash"><code class="lang-bash"><strong>curl --location 'https://&#x3C;DOMAIN>/xapi/user' \
</strong>--header 'Authorization: Bearer &#x3C;ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "John",
    "surname": "Doe",
    "username": "johndoe",
    "email": "john@doe.com",
    "role": "u"
}'
</code></pre>

{% endtab %}

{% tab title="Python" %}
İlk olarak Python SDK'sı yüklenmelidir:

```bash
pip install perculus-sdk
```

SDK'nın yüklendiğinden emin olunduktan sonra aşağıdaki şekilde yeni kullanıcı oluşturabilirsiniz:

```python
from perculus_sdk.client import APIClient

# API client
client = APIClient()

# Set your domain (if you haven't set it before)
client.set_domain("<DOMAIN>")

# Set your credentials(if you haven't set it before)
client.set_credentials(
    access_key="<EMAIL>",
    secret_key="<PASSWORD>",
    account_id="<ACCOUNT_ID>"
)

#Create user 
user = client.users.create_user({
                "name": "<USER_NAME>",
                "surname": "<USER_SURNAME>",
                "username": "<USERNAME>",
                "email": "<USER_EMAIL>"
          })
print(user)
```

{% endtab %}

{% tab title="C#" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="NodeJS" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="Go" %}

```
// ASAP :)
```

{% endtab %}
{% endtabs %}

İstek sonrasında aşağıdaki örnek response modelini görebilirsiniz:

```json
{
    "user_id": "<USER_ID>",
    "name": "john",
    "surname": "Doe",
    "username": "johndoe",
    "email": "john@doe.com",
    "role": "u",
    "mobile": "",
    "login_allowed": true,
    "status": 1,
    "lang": "tr-TR",
    "timezone": null,
    "expires_at": null,
    "creation_date": "2024-08-01T00:45:03.8888474+00:00",
    "updating_date": null
}
```

{% hint style="info" %}
Kullanıcı ile ilgili güncelleme/silme işlemleri yapabilmek için response olarak gelen veri içerisinde USER\_ID verisini güvenli bir şekilde saklamanız gerekmektedir.
{% endhint %}
