Skip to main content
PATCH
/
v1
/
users
/
{userId}
Update user information
curl --request PATCH \
  --url https://api-sandbox.rinne.com.br/core/v1/users/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "first_name": "John",
  "last_name": "Doe",
  "roles": [
    "admin",
    "user"
  ],
  "metadata": {
    "department": "Engineering",
    "level": "Senior"
  }
}'
{
  "id": "user123",
  "identifiers": [
    {
      "id": "id1",
      "type": "email",
      "value": "user@company.com",
      "verified": true,
      "created_at": "2024-01-01T00:00:00.000Z",
      "verified_at": "2024-01-01T01:00:00.000Z"
    }
  ],
  "primary_identifier": {
    "id": "id1",
    "type": "email",
    "value": "user@company.com",
    "verified": true,
    "created_at": "2024-01-01T00:00:00.000Z",
    "verified_at": "2024-01-01T01:00:00.000Z"
  },
  "roles": [
    {
      "id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
      "name": "admin",
      "permissions": [
        "user.create",
        "user.read",
        "role.create"
      ],
      "description": "Administrator role with full access",
      "company_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
      "organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2794",
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-01-01T00:00:00.000Z"
    }
  ],
  "first_name": "John",
  "last_name": "Doe",
  "auth_methods": [
    "password"
  ],
  "suspended_at": "2024-01-01T00:00:00.000Z",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

JWT token for user authentication

Path Parameters

userId
string
required

User ID to update

Body

application/json
first_name
string

User's first name

Example:

"John"

last_name
string

User's last name

Example:

"Doe"

roles
string[]

Array of role names in the current company context. Providing this field replaces all existing roles; pass [] to remove all roles; omit to keep roles unchanged.

Example:
["admin", "user"]
metadata
object

Additional user metadata

Example:
{
"department": "Engineering",
"level": "Senior"
}

Response

User updated successfully

id
string
required

User ID

Example:

"user123"

identifiers
object[]
required

User identifiers (email/phone)

primary_identifier
object
required
auth_methods
enum<string>[]
required

Available authentication methods

Example:
["password"]
created_at
string<date-time>
required

User creation timestamp

Example:

"2024-01-01T00:00:00.000Z"

updated_at
string<date-time>
required

User last update timestamp

Example:

"2024-01-01T00:00:00.000Z"

roles
object[]

User roles

first_name
string

User first name

Example:

"John"

last_name
string

User last name

Example:

"Doe"

suspended_at
string<date-time>

User suspension timestamp

Example:

"2024-01-01T00:00:00.000Z"

metadata
object

Additional user metadata