auth

User registration

Changed on

Register a new user in Keycloak

post/api/auth/register

Request

  • Base URL: https://api.corabea.it (the document declares no server; this is the origin it was published from)
  • URL: https://api.corabea.it/api/auth/register
  • Auth: none declared

Request body

emailstring required

User email address

passwordstring required

User password (min 8 characters)

first_namestring required

User first name

last_namestring required

User last name

phonestring required

User phone number

birth_datestring required

User date of birth (YYYY-MM-DD format, required)

countrystring nullable

User country (optional)

reason_for_registrationstring required

Reason for registration

commercial_communications_consentboolean

Consent to receive commercial and promotional communications

email_verifiedboolean

Whether the email should be marked as verified. Defaults to False so that users must verify their email before accessing the app.

triage_anonymous_idstring uuid nullable

Install id of the app the initial questionnaire was answered on before signing up; with triage_submission_id the submission is linked to the new account right away, even when the email still has to be verified.

triage_submission_idstring uuid nullable

The submission to link, as returned by POST /api/triage/submissions; without it nothing is linked.

Example request

{
  "birth_date": "1990-01-01",
  "commercial_communications_consent": true,
  "email": "user@example.com",
  "email_verified": false,
  "enabled": true,
  "first_name": "John",
  "last_name": "Doe",
  "password": "SecurePass123!",
  "phone": "+39 333 1234567",
  "reason_for_registration": "WANT_TO_START_JOURNEY",
  "role": "patient"
}

Response

Successful Response

user_idstring required

Created user ID

emailstring required

User email

access_tokenstring required

JWT access token

refresh_tokenstring required

Refresh token

expires_ininteger required

Access token expiration time in seconds

refresh_expires_ininteger required

Refresh token expiration time in seconds

token_typestring

Token type

titlestring

Response title

messagestring

Response message

triage_claimedboolean

Whether the triage submission sent with the sign-up was linked to the new account

Example response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "email": "user@example.com",
  "expires_in": 300,
  "message": "Utente registrato con successo",
  "refresh_expires_in": 1800,
  "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "user_id": "123e4567-e89b-12d3-a456-426614174000"
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status