Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose: Edit CommCare(mobile-worker) user.

URL: https://www.commcarehq.org/a/[domain]/api/[version]/user/[id] 

Method: PUT

Input Parameters: 

Name 

Description 

Example 

first_name 

First name of user 

John 

last_name 

Last name of user 

Doe 

email 

Email address of user 

john.doe@example.org 

phone_numbers 

List of all phone numbers of the user 

(see examples) 

This will replace existing phone numbers for user.

groups 

List of all group ids belonging to the user 

(see examples) 

This will replace existing groups for the user.

user_data 

Any additional custom data associated with the user 

(see examples) 

This will replace existing custom data for the user.

language

User language

en

passwordNew password for userfake-password-123

Sample input:

Code Block
languagejavascript
titleJSON Input
{
   "first_name": "John",
   "last_name": "Doe",
   "email": "jdoe@example.org",
   "language": "en",
   "password": "new password",
   "phone_numbers": [
      "+50253311399",
      "50253314588"
   ],
   "groups": [
      "9a0accdba29e01a61ea099394737c4fb",
      "b4ccdba29e01a61ea099394737c4fbf7"
   ],
   "user_data": {
      "chw_id": "13/43/DFA"
   }
}

...