Authentifizierung

PUT /api/auth/profile

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

Aktualisierung der Profilfelder für das authentifizierte Konto. Aus der Anfrage weggelassene Felder bleiben unverändert.

Bearer oder API-SchlüsselJSONändert das Konto

HTTP-Anfrage

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()

Anfragetext

nomstring

Familienname.

prenomstring

Vorname.

genrestring

Profil Geschlechtswert.

telstring

Telefonnummer.

adressestring

Postanschrift.

villestring

Stadt.

Erfolgreiche Antwort

{ ok: true, user: { id: "…", prenom: "Ada", nom: "Lovelace" } }
Nur absichtliche Änderungen senden

Leere Werte werden von diesem Endpunkt ignoriert. Senden Sie kein ganzes gecachetes Profil, wenn nur ein Feld bearbeitet wurde.

Passwörter sind keine öffentliche API Operation

Verwenden Sie die Anmelde-Kontoeinstellungen, um ein Passwort zu ändern. Geben Sie <code>password</code> hier <code>403 password_change_private</code> zurück.