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

# Get the current user

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

Get details about the current user.

This endpoint can only be used with a [user-level API key](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.

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)

## Authorization

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

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `include[]` | string |  | Array of additional Models to include in response. Use `calendar_urls` to include `http_cal_url` and `web_cal_url`; account admins with `can_update_user` may use this to retrieve another user's calendar feed URLs. Note that these URLs are bearer credentials: anyone with the URL can read that user's on-call calendar. One of: `contact_methods`, `notification_rules`, `teams`, `subdomains`, `calendar_urls`. 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

The requesting user.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `user` | object | yes |  |
| `user.id` | string |  | Read-only. |
| `user.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. |
| `user.type` | string | yes | The type of object being created. One of: `user`. Default: `user`. |
| `user.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `user.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `user.name` | string | yes | The name of the user. Max length: 100. |
| `user.email` | string (email) | yes | The user's email address. Min length: 6. Max length: 100. |
| `user.time_zone` | string (tzinfo) |  | The preferred time zone name. If null, the account's time zone will be used. |
| `user.color` | string |  | The schedule color. |
| `user.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`. |
| `user.avatar_url` | string (url) |  | The URL of the user's avatar. Read-only. |
| `user.description` | string \| null |  | The user's bio. |
| `user.invitation_sent` | boolean |  | If true, the user has an outstanding invitation. Read-only. |
| `user.job_title` | string |  | The user's title. Max length: 100. |
| `user.created_via_sso` | boolean |  | If true, the user was created via Single Sign-On (SSO). Read-only. |
| `user.teams` | array of object |  | The list of teams to which the user belongs. Account must have the `teams` ability to set this. Read-only. |
| `user.teams[].id` | string | yes | Read-only. |
| `user.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. |
| `user.teams[].type` | string | yes | One of: `team_reference`. |
| `user.teams[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `user.teams[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `user.contact_methods` | array of object |  | The list of contact methods for the user. Read-only. |
| `user.contact_methods[].id` | string | yes | Read-only. |
| `user.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. |
| `user.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`. |
| `user.contact_methods[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `user.contact_methods[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `user.notification_rules` | array of object |  | The list of notification rules for the user. Read-only. |
| `user.notification_rules[].id` | string | yes | Read-only. |
| `user.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. |
| `user.notification_rules[].type` | string | yes | One of: `assignment_notification_rule_reference`. |
| `user.notification_rules[].self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `user.notification_rules[].html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `user.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. |
| `user.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
{
  "user": {
    "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": null,
    "invitation_sent": false,
    "job_title": "Director of Engineering",
    "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",
        "html_url": null
      }
    ],
    "notification_rules": [
      {
        "id": "P8GRWKK",
        "type": "assignment_notification_rule_reference",
        "summary": "Default",
        "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PTDVERC",
        "html_url": null
      }
    ],
    "teams": [
      {
        "id": "PQ9K7I8",
        "type": "team_reference",
        "summary": "Engineering",
        "self": "https://api.pagerduty.com/teams/PQ9K7I8",
        "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
      }
    ]
  }
}
```

## 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 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).
