> For the complete documentation index, see [llms.txt](https://developers.disciple.tools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.disciple.tools/theme-core/api-other/users.md).

# Users

## Get My User Info

`Get` <https://example.com/wp-json/dt/v1/user/my>

### Parameters

### Returns

```php
[
    "ID": 1,
    "user_email": "user@example.com",
    "display_name": "BOB JOE",
    "locale": "fr_FR",
    "locations": {
      "location_grid": [{
        "id": 100306693,
        "label": "Poland"
      }],
      "location_grid_meta": [{
        "grid_id": "100306693",
        "grid_meta_id": "66",
        "label": "Poland",
        "lat": "52.124609907545",
        "level": "admin0",
        "lng": "19.30063630556",
        "post_id": "1",
        "post_type": "users",
        "postmeta_id_location_grid": "573",
        "source": "user"
      }]
    },
    "apps": [
      {
        "description": "An update summary of assigned contacts.",
        "label": "User Contact Updates",
        "link": "http://...."
      }
    ],
    "notifications": {
      "email_preference": {
        "daily": false,
        "hourly": false,
        "realtime": true
      },
      "follow_all": false,
      "notify_types": [
        {
          "channels": [
            {
              "enabled": true,
              "key": "email",
              "label": "Email"
            },
            {
              "enabled": true,
              "key": "web",
              "label": "Web"
            },
            {
              "enabled": false,
              "key": "push_notifications",
              "label": "Push Notifications"
            }
          ],
          "key": "new_assigned",
          "label": "Newly Assigned Contact"
        }
      ]
    },
    "preferences": {
      "languages": [
        {
          "key": "fr",
          "label": "French"
        },
        {
          "key": "es",
          "label": "Spanish"
        }
      ],
      "locations": {
        "location_grid": [{
          "id": 100306693,
          "label": "Poland"
        }],
        "location_grid_meta": [{
          "grid_id": "100306693",
          "grid_meta_id": "66",
          "label": "Poland",
          "lat": "52.124609907545",
          "level": "admin0",
          "lng": "19.30063630556",
          "post_id": "1",
          "post_type": "users",
          "postmeta_id_location_grid": "573",
          "source": "user"
        }]
      },
      "people_groups": [
        {
          "ID": "13",
          "post_title": "Arab Egyptian"
        },
        {
          "ID": "20",
          "post_title": "Algerian, Arabic-speaking"
        }
      ],
      "workload": {
        "color": "#4caf50",
        "id": "active",
        "label": "Accepting new contacts"
      }
    },
    "profile": {
      "ID": 1,
      "address": [],
      "bio": "This has been my journey so far....",
      "display_name": "admin",
      "email": [
        {
          "label": "admin@dtdev.local",
          "value": "admin@dtdev.local"
        }
      ],
      "gender": "male",
      "language": "English (United States)",
      "locale": "en_US",
      "name": "Administrator",
      "nickname": "admin",
      "other": [],
      "phone": [],
      "roles": {
        "administrator": "Administrator"
      },
      "social": [],
      "username": "admin"
    },
    "unavailability": [
      {
        "id": 1,
        "start_date": "2022-06-13",
        "end_date": "2022-06-17"
      },
      {
        "id": 2,
        "start_date": "2022-06-20",
        "end_date": "2022-06-24"
      }
    ]
]
```

## Update My User Details

`POST` <https://example.com/wp-json/dt/v1/user/update>

### Parameters

* **locale** (string) optional. The new user locale

### Returns

`true` on success. WP\_ERROR if not

## List Users

`Get` <https://example.com/wp-json/dt/v1/users/get_users>

### Parameters

* **s** (string) optional. Search user display names
* **get\_all** (string) optional. Return all the users. Default false. "1" for true

### Returns

```php
[
    "ID": 1,
    "name": "BOB JOE",
    "avatar": "http://2.gravatar.com/avatar/x?s=16&d=mm&r=g"
]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.disciple.tools/theme-core/api-other/users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
