# PUT /api/auth/profile

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

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

Actualizza i campi di profili forneciti per il conto autenticat. I campi omiti da petizione non cambiano.

Status: Bearer ou chave de API · JSON · altera a conta

## Requisição 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()
```

## Corpo da requisição {#body}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `nom` | string |  | Nome di parentesco. |
| `prenom` | string |  | Nome. |
| `genre` | string |  | Perfil valore di genere. |
| `tel` | string |  | Number telefonic. |
| `adresse` | string |  | - Addresse postal. |
| `ville` | string |  | Citù. |

## Resposta bem-sucedida {#response}

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

> **Inviare solo i cambiamenti intenzionali**
>
> I valori vuoti sono ignorati da questo endpoint. Non inviare un profile cached intero quando un solo campo è stato editato.

> **I mots de passe non sono un pubblico API operazion**
>
> Usare i parametris del conto logn-in per cambiare un mot de passe. Fornitura `password` aquí restitue `403 password_change_private`.
