Skip to content

Update Current User ​

You can partially update a user's profile by sending only the fields you want to change. Nested objects are merged the same way — send only the attributes you want to change. Fields that an endpoint does not list are ignored.

HTTP Request ​

Each role has its own endpoint; calling the endpoint of the other role answers 403 Forbidden.

RoleEndpoint
ClientPATCH /api/v1/me/client
ExpertPATCH /api/v1/me/expert

Common Fields ​

Accepted by both endpoints. All others remain unchanged if omitted.

ParameterDescription
email string, optionalUser's email address (max 255 chars, unique). Validated strictly, including a DNS/MX lookup of the domain. Changing it requires currentPassword and resets the email verification — see Side Effects.
phone string, optionalUnique phone number in international format with country code (e.g., +421901234567). See Phone Numbers.
password string, optionalNew password (8–72 characters, including letters and numbers). Requires currentPassword and passwordConfirmation.
passwordConfirmation stringRequired together with password; must match it.
currentPassword stringThe user's current password. Required whenever the request contains password, changes email, or — on the expert endpoint — changes bankAccount.iban. When sent it is always checked, even if not required.
billingAddress object, BillingAddress, optionalBilling address. The first write must contain all of line1, line2, city, postalCode and country; later writes may send only the attributes to change. See Address.
newsletterSubscribed boolean, optionalIf omitted, subscription status remains unchanged. true subscribes; false cancels the subscription.

Update Client Profile ​

PATCH /api/v1/me/client additionally accepts:

ParameterDescription
firstName string, optionalFirst name (max 255 chars; letters, combining marks, spaces and ' ’ . , - only).
lastName string, optionalLast name. Same rules as firstName.
shippingAddress object, ShippingAddress, optionalShipping address incl. optional firstName/lastName (same rules as the client's name). Same first-write rule as billingAddress.
company object, Company, optionalCompany details. Only the attributes sent are changed; businessId, taxId and vatId may each be set to null to clear them (max 255 chars each).

Update Expert Profile ​

PATCH /api/v1/me/expert additionally accepts:

ParameterDescription
company object, Company, optionalCompany details. Only the attributes sent are changed; businessId and vatId may be set to null to clear them, taxId cannot (max 255 chars each).
bankAccount object, BankAccount, optionalBank details. iban must be a Slovak IBAN; changing it requires currentPassword. Re-sending the current IBAN — in any spacing or letter case — is not a change. See Bank Account.
regions array, optionalArray of distinct region codes where the expert provides services. Min 1, max 8 regions. See Regions.
testimonyAlerts boolean, optionalfalse stops the e-mail alerts about new testimonies in the expert's regions, true turns them back on. If omitted, the setting remains unchanged.

An expert's firstName, lastName and registrationNumber cannot be changed through the API.

Example Request ​

PATCH /api/v1/me/client

json
{
  "firstName": "Pavol",
  "company": {
    "vatId": null
  },
  "password": "NewSecurePass123",
  "passwordConfirmation": "NewSecurePass123",
  "currentPassword": "SecurePass123"
}

Response ​

200 OK

Returns the updated User Object wrapped in a data key.

Side Effects ​

  • Password change — every other token of the user is revoked; only the token used for this request keeps working, other devices get 401 Unauthorized on their next request. Re-submitting the current password is not a change.
  • Email change — emailVerified becomes false, a verification email is sent to the new address and a notice email to the previous one. The current token stays valid, but the endpoints that require a verified email (creating testimonies, creating offers, checkout, accepting offers, completing, cancelling and downloading testimonies, downloading invoices) respond with 403 Forbidden until the new address is verified — see Verify Email and Resend Verification Email. Re-submitting the current email changes nothing.
  • Bank account change (experts) — a notice email showing the last four IBAN characters is sent to the expert's previous email address.

Authentication ​

Requires authentication via Bearer token. Email verification is not required.

401 Unauthorized

json
{
  "message": "Unauthenticated."
}

Error Handling ​

Wrong Role ​

403 Forbidden — a client called PATCH /api/v1/me/expert, or an expert called PATCH /api/v1/me/client.

json
{
  "message": "This action is unauthorized."
}

Validation Errors ​

422 Unprocessable Content

json
{
  "message": "Pole Aktuálne heslo je povinné.",
  "errors": {
    "currentPassword": [
      "Pole Aktuálne heslo je povinné."
    ]
  }
}

Returned when validation fails for any field. Common issues:

  • password, a new email or (experts) a new bankAccount.iban sent without currentPassword, or currentPassword is wrong (Heslo je nesprávne.)
  • password sent without passwordConfirmation, or the two do not match
  • Email already in use, or its domain does not accept mail
  • Phone number already registered
  • Password doesn't meet requirements
  • First write of an address missing one of line1, line2, city, postalCode, country
  • IBAN must be a valid Slovak (SK) IBAN

Rate Limit ​

429 Too Many Requests — more than 120 requests per minute for this user.