# Get users

```
GET 
/users
```

Retrieve a list of your organization's Copilot API Users, ordered by creation time.

## Request[​](#request "Direct link to Request")

### Query Parameters

* **cursor**
  <!-- -->
  string

  The cursor you received in the next\_cursor field to fetch the next page.

  **limit**
  <!-- -->
  integer

  **Possible values:** `>= 1` and `<= 100`

  The amount of objects to retrieve, between 1 and 100.

  **Example:<!-- -->&#x20;**`10`

  **order**
  <!-- -->
  string

  **Possible values:** \[`ASC`, `DESC`]

  This flag is used to get results sorted in ascending or descending order.

  **Default value:<!-- -->&#x20;**`ASC`

  **Example:<!-- -->&#x20;**`DESC`

  **activated**
  <!-- -->
  boolean

  Optional filter for activated/deactivated users.

## Responses[​](#responses "Direct link to Responses")

* 200

A paginated list of Users.

* application/json

- Schema
- Example (from schema)

**Schema**

* ******data**object\[]required

  Array \[

* **id**uuidrequired

  A unique identifier.

  **Example:<!-- -->&#x20;**`98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6`

  **activated**booleanrequired

  Always true unless you explicitly [deactivate](/core-api/reference/2024-04-22/server/deactivate-copilot-user.md) the user.

  **external\_id**stringnullable

  A unique identifier for the user from another system which is given to Nabla.

  **Possible values:** `<= 256 characters`

  ******metadata**objectnullable

  **property name\***&#x73;tring

  **Possible values:** `<= 500 characters`

  **created\_at**date-timerequired

  The creation date of this object, in ISO 8601 format.

  **Example:<!-- -->&#x20;**`2022-03-10T19:16:23.456Z`

  **email**emailnullablerequireddeprecated

  This is a deprecated feature, you should not have use-cases where you create Nabla email-based accounts for your API users. Please [reach out](https://www.nabla.com/copilot-contact/) if anything.

  **roles**role (string)\[]requireddeprecated

  This is a deprecated feature, you should not have use-cases where you create users with roles other than practitioner from the API. Please [reach out](https://www.nabla.com/copilot-contact/) if anything.

  **Possible values:** \[`ADMINISTRATOR`, `PRACTITIONER`]

  ]

  **has\_more**booleanrequired

  **Example:<!-- -->&#x20;**`true`

  **next\_cursor**next\_cursor (string)nullable

  An opaque cursor to fetch the next page of the collection.

```
{

  "data": [

    {

      "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",

      "activated": true,

      "external_id": "string",

      "metadata": {},

      "created_at": "2022-03-10T19:16:23.456Z"

    }

  ],

  "has_more": true,

  "next_cursor": "string"

}
```

## Operation spec

```json
{
  "method": "get",
  "path": "/users",
  "operationId": "get-copilot-users",
  "parameters": [
    {
      "name": "cursor",
      "description": "The cursor you received in the next_cursor field to fetch the next page.",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "limit",
      "description": "The amount of objects to retrieve, between 1 and 100.",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "example": 10
      }
    },
    {
      "name": "order",
      "description": "This flag is used to get results sorted in ascending or descending order.",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ],
        "example": "DESC",
        "default": "ASC"
      }
    },
    {
      "name": "activated",
      "description": "Optional filter for activated/deactivated users.",
      "in": "query",
      "required": false,
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "A paginated list of Users.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "The user object.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier.",
                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                      "title": "uuid"
                    },
                    "activated": {
                      "type": "boolean",
                      "description": "Always true unless you explicitly [deactivate](/server/deactivate-copilot-user) the user."
                    },
                    "external_id": {
                      "type": "string",
                      "description": "A unique identifier for the user from another system which is given to Nabla.",
                      "nullable": true,
                      "maxLength": 256
                    },
                    "metadata": {
                      "type": "object",
                      "description": "You can use this parameter to attach key-value data to the object. You can specify up to 50 keys, with key names up to 40 characters long, all values must be of type string and up to 500 characters long.\n\nYou should **not** use this to store Protected Health Information (PHI) or any patient-related data.",
                      "nullable": true,
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "maxProperties": 50,
                      "title": "metadata"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The creation date of this object, in ISO 8601 format.",
                      "example": "2022-03-10T19:16:23.456Z",
                      "title": "created_at"
                    },
                    "email": {
                      "deprecated": true,
                      "type": "string",
                      "format": "email",
                      "nullable": true,
                      "description": "This is a deprecated feature, you should not have use-cases where you create Nabla email-based accounts for your API users. Please [reach out](https://www.nabla.com/copilot-contact/) if anything."
                    },
                    "roles": {
                      "deprecated": true,
                      "type": "array",
                      "description": "This is a deprecated feature, you should not have use-cases where you create users with roles other than practitioner from the API. Please [reach out](https://www.nabla.com/copilot-contact/) if anything.",
                      "items": {
                        "type": "string",
                        "example": "PRACTITIONER",
                        "enum": [
                          "ADMINISTRATOR",
                          "PRACTITIONER"
                        ],
                        "title": "role"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "roles",
                    "activated",
                    "created_at"
                  ],
                  "title": "user"
                }
              },
              "has_more": {
                "type": "boolean",
                "example": true
              },
              "next_cursor": {
                "type": "string",
                "nullable": true,
                "description": "An opaque cursor to fetch the next page of the collection.",
                "title": "next_cursor"
              }
            },
            "required": [
              "data",
              "has_more"
            ]
          }
        }
      }
    }
  }
}
```
