Skip to main content

Users Management - User Update

Endpoint

/i/users/update

Overview

Updates an existing dashboard user.

Authentication

  • API Key (parameter): api_key=YOUR_API_KEY
  • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
  • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Global admin required.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
argsJSON String (Object)YesUpdate payload.

args Object Structure

FieldTypeRequiredDescription
user_idStringYesTarget dashboard user id.
full_nameStringNoUpdated full name.
usernameStringNoUpdated username (trimmed).
passwordStringNoNew password (validated and hashed).
emailStringNoUpdated email (trimmed + lowercased).
langStringNoLanguage code.
global_adminBooleanNoUpdated global admin flag.
lockedBooleanNoUpdated lock state.
permissionObjectNoUpdated permission object.
send_notificationBooleanNoSends notification when password is changed.
subscribe_newsletterBooleanNoNewsletter subscription flag.
admin_ofArrayNoBackward-compatible app-admin shorthand.
user_ofArrayNoBackward-compatible app-user shorthand.
member_imageStringNoSet to delete to clear image reference.

Configuration Impact

SettingDefaultAffectsUser-visible impact
security.password_minServer configPassword validationEnforces minimum password length.
security.password_numberServer configPassword validationRequires number characters when enabled.
security.password_charServer configPassword validationRequires uppercase characters when enabled.
security.password_symbolServer configPassword validationRequires symbol characters when enabled.

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringUpdate status message.

Error Responses

Status Code: 400 Bad Request

{
"result": [
"Validation error details"
]
}

Status Code: 500 Internal Server Error

{
"result": "Error updating user. Please check api logs."
}

Status Code: 500 Internal Server Error

{
"result": "Error updating user"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Standard updateValid payloadUpdates member fields and optional permissions.Wrapped success message.
Password updateargs.password providedHashes password; may reset target sessions and optionally send notification.Wrapped success message.
Update failureDB/update failureStops update flow.Wrapped error message.

Impact on Other Data

  • Removes password reset records for the user if email changes.
  • Removes active sessions/auth tokens when password is changed by another user.

Audit & System Logs

ActionTrigger
user_updatedSuccessful user update (when System Logs module is enabled).

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersPrimary user storage.Reads existing user, updates target user, reads updated user.
countly.password_resetReset/invite lifecycle.Removes reset records when email changes.
countly.sessions_Session lifecycle.Removes user sessions when password changed by another user.
countly.auth_tokensToken lifecycle.Removes logged-in auth tokens when password changed by another user.

Examples

Example 1: Update email

/i/users/update?api_key=YOUR_API_KEY&args={"user_id":"67b3055b87d9f49e2f5f3201","email":"new@example.com"}

Example 2: Update password and notify

/i/users/update?api_key=YOUR_API_KEY&args={"user_id":"67b3055b87d9f49e2f5f3201","password":"NewStrongPass123!","send_notification":true}

Limitations

  • Global-admin-only endpoint.
  • args.user_id is mandatory.

Last Updated

2026-02-17