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: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user_name": "<string>",
  "role": "admin",
  "status": "active",
  "metadata": {}
}'
{
  "created_at": "2025-01-01T00:00:00Z",
  "email": "alice@example.com",
  "internal_id": "int_x1y2z3",
  "metadata": {
    "department": "ML"
  },
  "organization_id": "org_demo123",
  "role": "member",
  "status": "active",
  "updated_at": "2025-01-01T00:00:00Z",
  "user_id": "usr_a1b2c3d4e5f6g7h",
  "user_name": "Alice Smith"
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your API key. Format: 'Bearer your_api_key'. To get an API key, create an account at mixpeek.com/start and generate a key in your account settings.

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.

Examples:

"Bearer sk_live_abc123def456"

"Bearer sk_test_xyz789"

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. High-level organization role applied to users.

Roles define the baseline permissions a user has within an organization:

  • ADMIN: Full administrative access including user management, billing, and organization settings. Can create/modify/delete all resources.
  • MEMBER: Standard user access. Can create and manage their own resources (namespaces, collections, clusters) but cannot manage other users or organization-level settings.
  • VIEWER: Read-only access. Can view resources and execute retrievers but cannot create, modify, or delete any resources.
Available options:
admin,
member,
viewer
status
enum<string> | null

Lifecycle status update (active, suspended, pending). Lifecycle state of an organization user.

Status values control whether a user can authenticate and access resources:

  • ACTIVE: User is fully operational and can authenticate with their API keys.
  • SUSPENDED: User access is temporarily disabled. API keys will not work but account data is preserved. Can be reactivated by an admin.
  • PENDING: User invitation has been created but not yet accepted. User cannot authenticate until they complete the onboarding flow.
Available options:
active,
suspended,
pending
metadata
object | null

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>

Organization role controlling UI access levels.

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

Lifecycle status of the account.

Available options:
active,
suspended,
pending
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.