You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Purpose: Create CommCare(mobile-worker) user.

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

Method: POST

Input Parameters:

Name 

Description 

Example

 

username* 

User name of user, including domain 

jdoe@example.commcarehq.org or 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

Output Parameters:

Name


 

Description 

Example 

user_id 

User UUID 

3c5a623af057e23a32ae4000cf291339 


   

 

Sample input:

JSON Format
{
       username: "jdoe@example.commcarehq.org",
   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