Popular Help Content

No popular content.

Purpose: get a list of users, or a single user. The list of users may be presented to the end user as a simple list of user names, where each name includes a hyperlink to access a list of cases owned by the user.

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

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

Permissions Required: Edit Mobile Workers & Edit Access API's

Authentication and Usage: All URL endpoints should be utilized as part of a cURL authentication command. For more information, please review CommCare's API Authentication Documentation.

Input parameters:

formatdata format
Supported: json (default), xml
groupGroup UUID (optional)group=ac9d34ff59cf6388e4f5804b12276d8a
archivedList archived users instead of active onesarchived=true
extrasAdds extra data fields (this can slow down the API) for recent user activityextras=true

Output values:

idUser UUID3c5a623af057e23a32ae4000cf291339
usernameUser name of user, including domainjdoe@example.commcarehq.org
first_nameFirst name of userJohn
last_nameLast name of userDoe
default_phone_numberPrimary phone number of user+50253311399
emailEmail address of user john.doe@example.org
phone_numbersList of all phone numbers of the user(see examples)
groupsList of all group ids belonging to the user(see examples)
user_dataAny additional custom data associated with the user(see examples)If the property begins with a number, it will not be returned when using XML

Sample usage:


Sample output:



    meta: {
        limit: 2,
        next: null,
        offset: 0,
        previous: null,
        total_count: 29
    objects: [{
        type: "user",
        id: "3c5a623af057e23a32ae4000cf291339",
        username: "jdoe@example.commcarehq.org",
        first_name: "John",
        last_name: "Doe",
        default_phone_number: "+50253311399",
        email: "jdoe@example.org",
        phone_numbers: [
        groups: [
        user_data: {
            "chw_id": "13/43/DFA"
    }, {
        type: "user",
        id: "3c5a623af057e23a32ae4000cf2943248",
        username: "jsmith@example.commcarehq.org",
        first_name: "Jane",
        last_name: "Smith",
        default_phone_number: "+50253311388",
        email: "jsmith@example.org",
        phone_numbers: [
        groups: [],
        user_data: {
            "village": "Patna",
            "husband_name": "Bob Smith"



	<objects type="list">
		<object id="3c5a623af057e23a32ae4000cf291339">
			<phone_numbers type="list">
			<groups type="list">
			<user_data type="hash">
		<object id="3c5a623af057e23a32ae4000cf2943248">
			<phone_numbers type="list">
			<groups type="list"/>
			<user_data type="hash">
				<husband_name>Bob Smith</husband_name>
	<meta type="hash">
		<next type="null"/>
		<total_count type="integer">29</total_count>
		<previous type="null"/>
		<limit type="integer">2</limit>
		<offset type="integer">0</offset>
  • No labels