---
title: "User by id"
method: GET
path: "/api/users/by-id/{user_id}"
tags: ["users"]
---

# User by id

`GET /api/users/by-id/{user_id}`

Returns a user payload by user id.

## Path parameters

- `user_id` string, uuid, required

## Response `200`

Successful Response

- UserProfileResponse — User profile response model with complete user information.
  - `id` string, required — User ID
  - `email` string, required — User email
  - `first_name` string, nullable — User first name
  - `last_name` string, nullable — User last name
  - `place_of_birth` string, nullable — User place of birth
  - `phone` string, nullable — User phone number
  - `tax_code` string, nullable — User tax code (codice fiscale)
  - `date_of_birth` string, nullable — User date of birth (YYYY-MM-DD)
  - `country_of_residence` string, nullable — User country of residence
  - `city` string, nullable — User city
  - `province` string, nullable — User province
  - `postal_code` string, nullable — User postal code
  - `home_address` string, nullable — User home address
  - `gender` string, nullable — User gender
  - `how_did_you_hear_about_us` string, nullable — How did you hear about us
  - `registration_reason` string, nullable — Reason for registration (enum key, e.g. WANT_TO_START_JOURNEY)
  - `commercial_communications_consent` boolean — Consent to receive commercial and promotional communications
  - `social_provider` string, nullable — Social provider used for login or null if email/password
  - `has_profile_photo` boolean — Whether user has a profile photo uploaded. Use /api/storage/profile-photo/{user_id} to retrieve it.
  - `roles` string[] — User roles
  - `general_practitioner` GeneralPractitioner — General practitioner data model.
    - `id` string, nullable — General practitioner UUID
    - `first_name` string — First name
    - `last_name` string — Last name
    - `email` string, nullable — Email
    - `phone` string, nullable — Phone number
  - `third_party_contacts` ThirdPartyContactV2[] — Patient's third-party contacts (v2). Set only when the user is a patient; empty list otherwise.
    - `id` string, nullable — Third-party contact UUID
    - `enabled` boolean — Whether the third-party contact is enabled
    - `first_name` string, required — First name
    - `last_name` string, required — Last name
    - `relationship` string, required — Role or kinship degree
    - `phone` string, nullable — Mobile phone number (optional)
    - `email` string, nullable — Email
  - `third_party_contact` ThirdPartyContact — Single third-party contact model (v1 single-contact API).
    - `id` string, nullable — Third-party contact UUID
    - `enabled` boolean — Whether third-party contact is enabled
    - `first_name` string, required — First name
    - `last_name` string, required — Last name
    - `relationship` string, required — Role or kinship degree
    - `phone` string, nullable — Mobile phone number (optional)
    - `email` string, nullable — Email
  - `third_party_consent` boolean — Whether the patient accepted the third-party contacts treatment consent. Gates adding/editing third-party contacts.
  - `tax_deduction_consent` boolean, nullable — Whether the patient accepted the tax data transmission needed for the deduction. Null when never answered: the app asks before the first payment.
  - `first_login` boolean, nullable — Whether this is the user's first login
  - `notes` string, nullable — Internal notes
  - `deletion_requested_at` string, nullable — Deletion request timestamp ISO
  - `created_at` string, nullable — Creation timestamp ISO
  - `updated_at` string, nullable — Last update timestamp ISO
  - `patient_id` string, nullable — Related patient id
  - `operator_id` string, nullable — Related operator id
  - `social_registration` boolean, nullable — Whether user registered via social provider

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/corabea/apis/corabea-api.md) · [All operations](https://skmtc.dev/corabea/apis/corabea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corabea/corabea-api/revisions/13c1bce1bdc4/schema)
