UsersUpdate User

Update User

Partially updates a user's data for the authenticated company. Only the fields included in the request body are updated; omitted fields remain unchanged.

Rules:

  • name and roleId can only be updated for active users.
  • The user's email cannot be changed.
  • Users with the MAIN profile cannot be updated.
  • The last administrator (RESPONSIBLE) of the account cannot be demoted.
  • Returns 404 if the user does not belong to the authenticated company.
curl -X PATCH "https://api-sandbox.contasimples.com/users/v1/users/550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "John Smith",
  "roleId": "8a3f1b2c-4e5d-6f7a-8b9c-0d1e2f3a4b5c"
}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "joao.silva@empresa.com.br",
  "name": "John Smith",
  "phone": "11999999999",
  "role": {
    "id": "8a3f1b2c-4e5d-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "Accountant"
  },
  "active": true
}
PATCH
/users/v1/users/{userId}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}

Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}
path
userIdstring
Required

User ID (UUID v4) — use the id field value returned by GET /users/v1/users (e.g., 550e8400-e29b-41d4-a716-446655440000).

Format: uuid
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring

User's full name.

Min length: 1
roleIdstring

Profile ID to assign to the user — use GET /users/v1/roles to get available IDs.

Format: uuid
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}

Path Parameters

userIdstring
Required

User ID (UUID v4) — use the id field value returned by GET /users/v1/users (e.g., 550e8400-e29b-41d4-a716-446655440000).

Body

application/json
namestring

User's full name.

roleIdstring

Profile ID to assign to the user — use GET /users/v1/roles to get available IDs.

Responses

idstring
Required

User ID.

emailstring
Required

User email.

namestring
Required

User’s name.

phonestring

User phone number.

roleobject
Required

Access profile assigned to the user in the company.

activeboolean
Required

Whether the user is active.