Popular Help Content

No popular content.

Purpose: Create CommCare(mobile-worker) user.

Authentication: For more information, please review CommCare's API Authentication Documentation.

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

Method: POST

Input Parameters: * means required

Name 

Description 

Example


username* 

User name of user

jdoe

password* 

User password 

qwer1234 

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. The first one will be set to the default number

(see examples) 

groups 

List of all group ids belonging to the user 

(see examples) 

user_data 

Any additional custom data associated with the user 

(see examples) 

language

User language

en

Output Parameters:

Name


 

Description 

Example 

user_id 

User UUID 

3c5a623af057e23a32ae4000cf291339 



Sample input:

JSON Format
{
   "username": "jdoe",
   "password": "qwer1234",
   "first_name": "John",
   "last_name": "Doe",
   "default_phone_number": "+50253311399",
   "email": "jdoe@example.org",
   "language": "en",
   "phone_numbers": [
      "+50253311399",
      "50253314588"
   ],
   "groups": [
      "9a0accdba29e01a61ea099394737c4fb",
      "b4ccdba29e01a61ea099394737c4fbf7" 
   ],
   "user_data": {
      "chw_id": "13/43/DFA"
   }
} 




  • No labels

1 Comment

  1. Anonymous

    If it contain one more column with the option mandatory and optional then it will be very helpful for users...

    Name 

    Description 

    Example


    username* 

    User name of user, including domain 

     jdoe 

    password 

    User password 

    qwer1234 

    first_name 

    First name of user 

    John 

    last_name 

    Last name of user 

    Doe 

    default_phone_number 

    Primary phone number of user 

    +50253311399 

    email 

    Email address of user 

    john.doe@example.org 

    phone_numbers 

    List of all phone numbers of the user 

    (see examples) 

    groups 

    List of all group ids belonging to the user 

    (see examples) 

    user_data 

    Any additional custom data associated with the user 

    (see examples) 

    language

    User language

    en