> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anivahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Zaktualizuj profil

> Zaktualizuj istniejący profil pacjenta

Zaktualizuj jedno lub więcej pól istniejącego profilu pacjenta. Wystarczy uwzględnić pola, które chcesz zmienić — wszystkie parametry treści żądania są opcjonalne.

Wymaga zakresu `create_user`.

## Żądanie

### Parametry ścieżki

**id** `string` *required*

Unikalny identyfikator (UUID) profilu do aktualizacji.

### Parametry treści

**email** `string`

Nowy adres e-mail dla profilu.

**password** `string`

Nowe hasło. Musi mieć od 8 do 128 znaków.

**first\_name** `string`

Nowe imię. Musi składać się ze znaków łacińskich i mieć od 1 do 100 znaków.

**last\_name** `string`

Nowe nazwisko. Musi składać się ze znaków łacińskich i mieć od 1 do 100 znaków.

**phone** `string`

Nowy numer telefonu w formacie E.164 (np. `+14155552671`).

**sex** `integer`

Nowa wartość płci biologicznej zgodnie z ISO/IEC 5218 (`1` = mężczyzna, `2` = kobieta). Wartość `0` (nieznana) zwraca `400`.

**date\_of\_birth** `string`

Nowa data urodzenia w formacie `YYYY-MM-DD`. Musi być w przeszłości i nie wcześniej niż w 1900 roku. Wynikający z niej
wiek musi mieścić się w przedziale od 16 do 100 lat.

**height** `number`

Nowy wzrost w centymetrach.

**weight** `number`

Nowa waga w kilogramach.

**language** `string`

Nowy preferowany język: `en`, `bg`, `ca`, `cs`, `da`, `de`, `el`, `es`, `et`, `fi`, `fr`, `ga`, `hr`, `hu`, `is`, `it`, `lb`, `lt`, `lv`, `mt`, `nl`, `no`, `pl`, `pt`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `tr` lub `uk`.

**transactional\_emails\_enabled** `boolean`

Określa, czy ten profil ma otrzymywać e-maile transakcyjne (automatyczne) — potwierdzenia
wizyt, powiadomienia o gotowych wynikach itp. Niezależne od zgody marketingowej. Pomiń, aby zachować
bieżącą wartość.

## Odpowiedź

W przypadku powodzenia API zwraca `200 OK` wraz z pełnym zaktualizowanym profilem.

**id** `string` *required*

Unikalny identyfikator profilu (UUID).

**handle** `string`

Handle lub nazwa użytkownika profilu. Może mieć wartość `null`.

**first\_name** `string`

Imię. Może mieć wartość `null`.

**last\_name** `string`

Nazwisko. Może mieć wartość `null`.

**email** `string`

Adres e-mail. Może mieć wartość `null`.

**phone** `string`

Numer telefonu w formacie E.164. Może mieć wartość `null`.

**sex** `integer`

Płeć biologiczna wg ISO/IEC 5218 (`0` = nieznana, `1` = męska, `2` = żeńska). Może mieć wartość `null`.

**date\_of\_birth** `string`

Data urodzenia w formacie `YYYY-MM-DD`. Może mieć wartość `null`.

**height** `number`

Wzrost w centymetrach. Może mieć wartość `null`.

**weight** `number`

Masa ciała w kilogramach. Może mieć wartość `null`.

**language** `string`

Preferowany język, jeden z 32 powyższych kodów.

**transactional\_emails\_enabled** `boolean`

Czy ten profil otrzymuje e-maile transakcyjne (automatyczne). `null`, jeśli nigdy nie ustawiono.

**created\_at** `string`

Znacznik czasu ISO 8601 utworzenia profilu.

**updated\_at** `string`

Znacznik czasu ISO 8601 ostatniej aktualizacji. Może mieć wartość `null`.

## Odpowiedzi z błędami

| Status | Opis |
| - | - |
| `400` | Błąd walidacji — co najmniej jedno pole nie przeszło walidacji. |
| `403` | Brak dostępu — twój klucz API nie ma uprawnień do tej operacji lub profil znajduje się poza twoim kontekstem dostępu. |
| `404` | Nie znaleziono profilu. |
| `500` | Wewnętrzny błąd serwera. |

```bash cURL theme={null}
curl --request PATCH \
  --url https://anivahealth.com/api/v1/profiles/a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "phone": "+4917612345678",
    "language": "en"
  }'
```

```json 200 theme={null}
{
  "id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
  "handle": null,
  "first_name": "Maria",
  "last_name": "Schmidt",
  "email": "maria.schmidt@example.com",
  "phone": "+4917612345678",
  "sex": 2,
  "date_of_birth": "1985-03-22",
  "height": 168,
  "weight": 65,
  "language": "en",
  "transactional_emails_enabled": true,
  "created_at": "2026-04-01T09:14:32Z",
  "updated_at": "2026-04-01T14:22:11Z"
}
```

```json 400 theme={null}
{
  "error": "phone: Phone must be in E.164 format (e.g., +14155552671)"
}
```

```json 404 theme={null}
{
  "error": "Profile not found"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.