> 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-update.md).

# Kullanıcı Güncelleme

Aşağıdaki alanda bir kullanıcı için güncelleyebileceğiniz tüm parametrelerin listesini görebilirsiniz:

| Parametre      | Tip    | Zorunlu | Açıklama                               |
| -------------- | ------ | ------- | -------------------------------------- |
| name           | string | Evet    |                                        |
| surname        | string | Evet    |                                        |
| email          | string | Evet    |                                        |
| username       | string | Evet    |                                        |
| login\_allowed | string | Hayır   |                                        |
| role           | string | Hayır   | <p>a=Admin<br>u=User<br>e=Öğretmen</p> |

**Tüm parametrelerden sonra aşağıdaki şekilde parametre olarak USER\_ID vererek kullanıcı güncelleme işlemi yapabilirsiniz:**

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

```bash
curl --location --request PUT 'https://<DOMAIN>/xapi/user/<USER_ID>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "John1",
    "surname": "Doe1",
    "username": "johndoe1",
    "email": "john@doe.com1",
    "role": "u"
}'
```

{% 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 kullanıcı güncelleme işlemi yapabilirsiniz:

```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>"
)

#Update user 
user = client.users.update_user("<USER_ID>",{
                "name": "john1",
                "surname": "Doe1",
                "username": "johndoe1",
                "email": "john@doe.com1"
          })
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": "john1",
    "surname": "Doe1",
    "username": "johndoe1",
    "email": "john@doe.com1",
    "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
}
```
