# PUT /api/auth/profile

Canonical URL: https://developers.iagenify.com/ar/api/auth/profile/
Language: ar

`PUT https://api.iagenify.com/api/auth/profile`

حدّث حقول الملف الشخصي المقدَّمة للحساب المُصادَق عليه. تبقى الحقول المحذوفة من الطلب بلا تغيير.

Status: Bearer أو مفتاح API · JSON · يعدّل الحساب

## طلب HTTP {#http}

```bash
curl https://api.iagenify.com/api/auth/profile \
  -X PUT \
  -H "Authorization: Bearer $IAGENIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prenom":"Ada","nom":"Lovelace","ville":"London"}'
```

## JavaScript {#javascript}

```javascript
const response = await fetch("https://api.iagenify.com/api/auth/profile", {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "prenom": "Ada",
  "nom": "Lovelace",
  "ville": "London"
}),
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);
```

## Python {#python}

```python
import os, requests

response = requests.request(
    "PUT",
    "https://api.iagenify.com/api/auth/profile",
    headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
    json={
  "prenom": "Ada",
  "nom": "Lovelace",
  "ville": "London"
},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```

## نص الطلب {#body}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `nom` | string |  | اسم العائلة. |
| `prenom` | string |  | الاسم الأول. |
| `genre` | string |  | قيمة جنس الملف الشخصي. |
| `tel` | string |  | رقم الهاتف. |
| `adresse` | string |  | العنوان البريدي. |
| `ville` | string |  | المدينة. |

## استجابة ناجحة {#response}

```javascript
{ ok: true, user: { id: "…", prenom: "Ada", nom: "Lovelace" } }
```

> **أرسل التغييرات المقصودة فقط**
>
> تتجاهل نقطة النهاية هذه القيم الفارغة. لا ترسل ملفاً شخصياً مخزناً كاملاً عندما تعدّل حقلاً واحداً فقط.

> **كلمات المرور ليست عملية API عامة**
>
> استخدم إعدادات الحساب المسجّل دخوله لتغيير كلمة المرور. تمرير `password` هنا يعيد `403 password_change_private`.
