# Update User Updates the current account user's profile. The email (and login) cannot be changed here. user.email / user.login may be sent only with the current value; a different value rejects the whole request with 422. Email changes go through POST /api/v3/users/{id}/email_change. user.name is saved as first_name. To change the password, send actual_password (current password), password and password_confirmation. Endpoint: PUT /api/v3/users/{id} Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Path parameters: - `id` (string, required) User id. Must be the caller's own id. ## Request fields (application/json): - `user` (object, required) Required. An empty body (no user root and no top-level user field) returns 500; top-level user fields (e.g. first_name, phone) are wrapped into user automatically. To change the password, send actual_password (current password), password and password_confirmation. - `user.name` (string) Saved as first_name (it overrides first_name when both are sent). No enforced character limit (text column). Example: "Jean Dias" - `user.first_name` (string) Same field as name. Example: "Jean" - `user.phone_country_id` (integer) Id of the phone calling code (see Phone Calling Codes). Example: 1 - `user.email` (string) Cannot be changed through this endpoint. Optional; if sent it must equal the user's current email (case-insensitive), otherwise the whole request is rejected with 422 "Email changes must be requested through POST /users/:id/email_change." The same applies to login. To change the email use POST /api/v3/users/{id}/email_change. Example: "john.doe@invoicexpress.com" - `user.phone` (string) No enforced character limit (text column). Example: "987654321" - `user.accepted_marketing` (boolean) Example: true - `user.actual_password` (string) Current password. Required to change the password (see above). Example: "123456" - `user.password` (string) Example: "yoDWznBeH5j$JP98" - `user.password_confirmation` (string) Example: "yoDWznBeH5j$JP98" ## Response 200 fields (application/json): - `user` (object) - `user.id` (integer) Example: 1 - `user.name` (string) No enforced character limit (text column). Example: "Jean Dias" - `user.email` (string) Example: "john.doe@invoicexpress.com" - `user.phone` (string) No enforced character limit (text column). Example: "987654321" - `user.phone_country_id` (integer) Example: 1 - `user.accepted_marketing` (boolean) Example: true ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 403 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string) ## Response 404 fields (application/json): - `errors` (array) Example: [{"error":"Resource not found"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Example: [{"error":"Email changes must be requested through POST /users/:id/email_change."}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string)