طلب HTTP
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
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
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()نص الطلب
nomstringاسم العائلة.
prenomstringالاسم الأول.
genrestringقيمة جنس الملف الشخصي.
telstringرقم الهاتف.
adressestringالعنوان البريدي.
villestringالمدينة.
استجابة ناجحة
{ ok: true, user: { id: "…", prenom: "Ada", nom: "Lovelace" } }أرسل التغييرات المقصودة فقط
تتجاهل نقطة النهاية هذه القيم الفارغة. لا ترسل ملفاً شخصياً مخزناً كاملاً عندما تعدّل حقلاً واحداً فقط.
كلمات المرور ليست عملية API عامة
استخدم إعدادات الحساب المسجّل دخوله لتغيير كلمة المرور. تمرير <code>password</code> هنا يعيد <code>403 password_change_private</code>.