> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# List users

`GET https://api.pagerduty.com/users`

List users of your PagerDuty account, optionally filtered by a search query.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#users)

Scoped OAuth requires: `users.read`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `query` | string |  | Filters the result, showing only the records whose name matches the query. |
| `team_ids[]` | array of string |  | An array of team IDs. Only results related to these teams will be returned. Account must have the `teams` ability to use this parameter. Items must be unique. |
| `limit` | integer |  | The number of results per page. |
| `offset` | integer |  | Offset to start pagination search results. |
| `total` | boolean |  | By default the `total` field in pagination responses is set to `null` to provide the fastest possible response times. Set `total` to `true` for this field to be populated. See our [Pagination Docs](https://docs.pagerduty.com/developer/pagination) for more information. Default: `false`. |
| `include[]` | string |  | Array of additional Models to include in response. One of: `contact_methods`, `notification_rules`, `teams`, `subdomains`. Items must be unique. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Response 200

A paginated array of users.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `offset` | integer |  | Echoes offset pagination property. Read-only. |
| `limit` | integer |  | Echoes limit pagination property. Read-only. |
| `more` | boolean |  | Indicates if there are additional records to return. Read-only. |
| `total` | integer \| null |  | The total number of records matching the given query. Read-only. |
| `users` | array of object | yes |  |
| `users[].id` | string |  | Read-only. |
| `users[].summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `users[].type` | string | yes | The type of object being created. One of: `user`. Default: `user`. |
| `users[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `users[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `users[].name` | string | yes | The name of the user. Max length: 100. |
| `users[].email` | string (email) | yes | The user's email address. Min length: 6. Max length: 100. |
| `users[].time_zone` | string (tzinfo) |  | The preferred time zone name. If null, the account's time zone will be used. |
| `users[].color` | string |  | The schedule color. |
| `users[].role` | string |  | The user role. Account must have the `read_only_users` ability to set a user as a `read_only_user` or a `read_only_limited_user`, and must have advanced permissions abilities to set a user as `observer` or `restricted_access`. One of: `admin`, `limited_user`, `observer`, `owner`, `read_only_user`, `restricted_access`, `read_only_limited_user`, `user`. |
| `users[].avatar_url` | string (url) |  | The URL of the user's avatar. Read-only. |
| `users[].description` | string \| null |  | The user's bio. |
| `users[].invitation_sent` | boolean |  | If true, the user has an outstanding invitation. Read-only. |
| `users[].job_title` | string |  | The user's title. Max length: 100. |
| `users[].created_via_sso` | boolean |  | If true, the user was created via Single Sign-On (SSO). Read-only. |
| `users[].teams` | array of object |  | The list of teams to which the user belongs. Account must have the `teams` ability to set this. Read-only. |
| `users[].teams[].id` | string | yes | Read-only. |
| `users[].teams[].summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `users[].teams[].type` | string | yes | One of: `team_reference`. |
| `users[].teams[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `users[].teams[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `users[].contact_methods` | array of object |  | The list of contact methods for the user. Read-only. |
| `users[].contact_methods[].id` | string | yes | Read-only. |
| `users[].contact_methods[].summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `users[].contact_methods[].type` | string | yes | One of: `email_contact_method_reference`, `phone_contact_method_reference`, `push_notification_contact_method_reference`, `sms_contact_method_reference`, `whatsapp_contact_method_reference`. |
| `users[].contact_methods[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `users[].contact_methods[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `users[].notification_rules` | array of object |  | The list of notification rules for the user. Read-only. |
| `users[].notification_rules[].id` | string | yes | Read-only. |
| `users[].notification_rules[].summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `users[].notification_rules[].type` | string | yes | One of: `assignment_notification_rule_reference`. |
| `users[].notification_rules[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `users[].notification_rules[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `users[].http_cal_url` | string (uri) |  | iCal HTTP feed URL for this user's on-call shifts. Only returned on the `GET /users/{id}` detail endpoint: automatically when viewing your own profile with a user-level token, or when an account admin with `can_update_user` passes `include[]=calendar_urls` for another user. Not returned on list endpoints or with account-level read-only keys. **Security:** this URL is a bearer credential. Anyone with the URL can read the user's on-call calendar without further authentication. Rotate via `POST /users/{id}/regenerate_private_url_key` if it may have been exposed. Read-only. |
| `users[].web_cal_url` | string (uri) |  | iCal webcal URL for this user's on-call shifts. Only returned on the `GET /users/{id}` detail endpoint: automatically when viewing your own profile with a user-level token, or when an account admin with `can_update_user` passes `include[]=calendar_urls` for another user. Not returned on list endpoints or with account-level read-only keys. **Security:** this URL is a bearer credential. Anyone with the URL can read the user's on-call calendar without further authentication. Rotate via `POST /users/{id}/regenerate_private_url_key` if it may have been exposed. Read-only. |

Example: Response Example

```json
{
  "users": [
    {
      "id": "PXPGF42",
      "type": "user",
      "summary": "Earline Greenholt",
      "self": "https://api.pagerduty.com/users/PXPGF42",
      "html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
      "name": "Earline Greenholt",
      "email": "125.greenholt.earline@graham.name",
      "time_zone": "America/Lima",
      "color": "green",
      "role": "admin",
      "avatar_url": "https://pd-static-assets.pagerduty.com/users/blank-avatar.png",
      "description": "I'm the boss",
      "invitation_sent": false,
      "created_via_sso": true,
      "contact_methods": [
        {
          "id": "PTDVERC",
          "type": "email_contact_method_reference",
          "summary": "Default",
          "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC"
        }
      ],
      "notification_rules": [
        {
          "id": "P8GRWKK",
          "type": "assignment_notification_rule_reference",
          "summary": "Default",
          "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
          "html_url": null
        }
      ],
      "job_title": "Director of Engineering",
      "teams": [
        {
          "id": "PQ9K7I8",
          "type": "team_reference",
          "summary": "Engineering",
          "self": "https://api.pagerduty.com/teams/PQ9K7I8",
          "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
        }
      ]
    },
    {
      "id": "PAM4FGS",
      "type": "user",
      "summary": "Kyler Kuhn",
      "self": "https://api.pagerduty.com/users/PAM4FGS",
      "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS",
      "name": "Kyler Kuhn",
      "email": "126_dvm_kyler_kuhn@beahan.name",
      "time_zone": "Asia/Hong_Kong",
      "color": "red",
      "role": "admin",
      "avatar_url": "https://pd-static-assets.pagerduty.com/users/blank-avatar.png",
      "description": "Actually, I am the boss",
      "invitation_sent": false,
      "created_via_sso": false,
      "contact_methods": [
        {
          "id": "PVMGSML",
          "type": "email_contact_method_reference",
          "summary": "Work",
          "self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL"
        }
      ],
      "notification_rules": [
        {
          "id": "P8GRWKK",
          "type": "assignment_notification_rule_reference",
          "summary": "Default",
          "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
          "html_url": null
        }
      ],
      "job_title": "Senior Engineer",
      "teams": [
        {
          "id": "PQ9K7I8",
          "type": "team_reference",
          "summary": "Engineering",
          "self": "https://api.pagerduty.com/teams/PQ9K7I8",
          "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
        }
      ]
    }
  ],
  "limit": 25,
  "offset": 0,
  "more": false,
  "total": null
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 429

Too many requests have been made, the rate limit has been reached.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
