> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/queries/users/my-list.md).

# Users

Use the `users` query to obtain a list of all registered users on your account. In addition, search for a specific user or a profile user by sending the `userId` or `profileId` as an argument.

### User Role

* `users`: list the created user.

### Available Arguments

<table data-header-hidden><thead><tr><th width="174.83392593877375" align="center">Argument name</th><th width="150" align="center">Required?</th><th width="150" align="center">Type</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center"><strong>Argument Name</strong></td><td align="center"><strong>Required?</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><code>userUUIDs</code></td><td align="center">No</td><td align="center">String</td><td align="center">User database ID</td></tr><tr><td align="center"><code>profileUUIDs</code></td><td align="center">No</td><td align="center">String</td><td align="center">User profile database ID</td></tr><tr><td align="center"><code>filters.createdAt.start</code></td><td align="center">No</td><td align="center">Date</td><td align="center">Allows to filter users by <code>createdAt</code> field, both <code>start</code> and <code>end</code> fields are mandatory when using this filter. (example below)</td></tr><tr><td align="center"><code>filters.createdAt.end</code></td><td align="center">No</td><td align="center">Date</td><td align="center">Allows to filter users by <code>createdAt</code> field, both <code>start</code> and <code>end</code> fields are mandatory when using this filter. (example below)</td></tr></tbody></table>

### Available Fields

<table data-header-hidden><thead><tr><th>Field</th><th width="159.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>name</code></td><td>String</td><td>Users name</td></tr><tr><td><code>email</code> </td><td>String</td><td>Users email</td></tr><tr><td><code>phone</code></td><td>String</td><td>users phone number</td></tr><tr><td><code>databaseId</code></td><td>Sting</td><td>User's ID</td></tr></tbody></table>

## Examples

### Get the list of all users

{% tabs %}
{% tab title="Mutation" %}

```
{
  users {
    edges {
      node {
        name
        phone
        email
        databaseId
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "users": {
      "edges": [
        {
          "node": {
            "name": "UserA",
            "phone": "1111-1111-1111",
            "email": "userA@suggestic.com"
            "databaseId": "920fd231-A1e5-75e5-9399-d2983302aabc"
          }
        },
        {
          "node": {
            "name": "UserB",
            "phone": "2222-2222-2222",
            "email": "userB@suggestic.com"
            "databaseId": "920fd231-B1a6-75a5-1111-a2111102aabc"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Get list of users created under desired date range

{% tabs %}
{% tab title="Mutation" %}

```
{
  users (filters:{createdAt:{start:"2024-01-10" end:"2024-02-10"} }) {
    edges {
      node {
        name
        phone
        email
        databaseId
        createdAt
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```
{
  "data": {
    "users": {
      "edges": [
        {
          "node": {
            "name": "UserA",
            "phone": "1111-1111-1111",
            "email": "userA@suggestic.com",
            "createdAt": "2024-01-11T18:14:44.777689+00:00",
            "databaseId": "920fd231-A1e5-75e5-9399-d2983302aabc"
          }
        },
        {
          "node": {
            "name": "UserB",
            "phone": "2222-2222-2222",
            "email": "userB@suggestic.com",
            "createdAt": "2024-02-01T18:14:44.777689+00:00"
            "databaseId": "920fd231-B1a6-75a5-1111-a2111102aabc"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Search for a user by ID

{% tabs %}
{% tab title="Request" %}

```graphql
{
  users (userUUIDs: "9bdc5da1-ae2d-4a61-90f7-7dd8ee59663a"){
    edges {
      node {
        id
        databaseId
        name
        email
        isActive
        profileId
        updatedAt
        
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "users": {
      "edges": [
        {
          "node": {
            "id": "VXNlcjpWWE5sY2pvNVltUmpOV1JoTVMxaFpUSmtMVFJoTmpFdE9UQm1OeTAzWkdRNFpXVTFPVFkyTTJFPQ==",
            "databaseId": "9bdc5da1-ae2d-4a61-90f7-7dd8ee59663a",
            "name": "UserB",
            "email": "userB@gmail.com",
            "isActive": true,
            "profileId": "8e78335a-0ead-4326-b6cb-ae702f763233",
            "updatedAt": "2021-12-10T15:53:52.037840+00:00"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Search for a user by profile ID

{% tabs %}
{% tab title="Request" %}

```graphql
{
  users(profileUUIDs: "217adfda-c08e-494c-bc25-f08e41c54767") {
    edges {
      node {
        id
        databaseId
        name
        email
        isActive
        profileId
        updatedAt
      }
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "users": {
      "edges": [
        {
          "node": {
            "id": "VXNlcjpWWE5sY2pwaE1UVm1OelEwT1MwNE56UXlMVFJtT1RrdE9ESXhaaTB3TkRGbU16VmhNVFZpTWpFPQ==",
            "databaseId": "a15f7449-8742-4f99-821f-041f35a15b21",
            "name": "Suggestic Lifenome Relay",
            "email": "7184f572ffc9@suggestic-relay.lifenome.com",
            "isActive": true,
            "profileId": "217adfda-c08e-494c-bc25-f08e41c54767",
            "updatedAt": "2021-12-02T12:38:45.846489+00:00"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
