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.
| Role | Endpoint |
|---|---|
| Client | PATCH /api/v1/me/client |
| Expert | PATCH /api/v1/me/expert |
Common Fields
Accepted by both endpoints. All others remain unchanged if omitted.
| Parameter | Description |
|---|---|
email string, optional | User'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, optional | Unique phone number in international format with country code (e.g., +421901234567). See Phone Numbers. |
password string, optional | New password (8–72 characters, including letters and numbers). Requires currentPassword and passwordConfirmation. |
passwordConfirmation string | Required together with password; must match it. |
currentPassword string | The 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, optional | Billing 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, optional | If omitted, subscription status remains unchanged. true subscribes; false cancels the subscription. |
Update Client Profile
PATCH /api/v1/me/client additionally accepts:
| Parameter | Description |
|---|---|
firstName string, optional | First name (max 255 chars; letters, combining marks, spaces and ' ’ . , - only). |
lastName string, optional | Last name. Same rules as firstName. |
shippingAddress object, ShippingAddress, optional | Shipping address incl. optional firstName/lastName (same rules as the client's name). Same first-write rule as billingAddress. |
company object, Company, optional | Company 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:
| Parameter | Description |
|---|---|
company object, Company, optional | Company 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, optional | Bank 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, optional | Array of distinct region codes where the expert provides services. Min 1, max 8 regions. See Regions. |
testimonyAlerts boolean, optional | false 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
{
"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 Unauthorizedon their next request. Re-submitting the current password is not a change. - Email change —
emailVerifiedbecomesfalse, 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 with403 Forbiddenuntil 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
{
"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.
{
"message": "This action is unauthorized."
}Validation Errors
422 Unprocessable Content
{
"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 newemailor (experts) a newbankAccount.ibansent withoutcurrentPassword, orcurrentPasswordis wrong (Heslo je nesprávne.)passwordsent withoutpasswordConfirmation, 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.