Skip to main content
PATCH
/
v1
/
organizations
/
users
/
{user_email}
Update User
curl --request PATCH \
  --url https://api.mixpeek.com/v1/organizations/users/{user_email} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_name": "<string>",
  "role": "admin",
  "status": "active",
  "metadata": {}
}
'
{
  "internal_id": "<string>",
  "organization_id": "<string>",
  "email": "[email protected]",
  "user_name": "<string>",
  "user_id": "<string>",
  "role": "member",
  "status": "active",
  "metadata": {},
  "namespace_permissions": [
    {
      "namespace_id": "<string>",
      "role": "member",
      "operations": [
        "read_data"
      ],
      "granted_at": "2023-11-07T05:31:56Z",
      "granted_by": "usr_a1b2c3d4e5f6g7"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "last_login": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Path Parameters

user_email
string
required

Body

application/json

Partial update payload for a user.

user_name
string | null

Updated display name.

Required string length: 2 - 100
role
enum<string> | null

Updated organization role.

Available options:
admin,
member,
viewer
status
enum<string> | null

Lifecycle status update (active, suspended, pending).

Available options:
active,
suspended,
pending
metadata
Metadata · object

Replaces metadata with the provided dictionary when set.

Response

Successful Response

Canonical user document persisted in MongoDB.

internal_id
string
required

Organization internal identifier used for scoping queries.

organization_id
string
required

Organization public identifier for reference in APIs.

email
string<email>
required

Unique email address for the user.

user_name
string
required

Display name shown in UI and logs.

user_id
string

Immutable public identifier for the user.

role
enum<string>
default:member

Organization role controlling UI access levels.

Available options:
admin,
member,
viewer
status
enum<string>
default:active

Lifecycle status of the account.

Available options:
active,
suspended,
pending
metadata
Metadata · object

Arbitrary metadata stored alongside the user record.

namespace_permissions
NamespacePermissions · object[]

Namespace-level roles applied across all of the user's keys.

created_at
string<date-time>

UTC timestamp when the user was created.

updated_at
string<date-time>

UTC timestamp of the latest update to the user.

last_login
string<date-time> | null

UTC timestamp of the last successful login.