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

# Update a user

`PUT https://api.pagerduty.com/users/{id}`

Update an existing user.

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.write`

## Authorization

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

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of the resource. |

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

## Request body (`application/json`)

The user to be updated.

| 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. |
| `user.license` | object |  |  |
| `user.license.id` | string | yes | Read-only. |
| `user.license.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.license.type` | string | yes | One of: `license_reference`. |
| `user.license.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `user.license.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |

Example: Request Example

```json
{
  "user": {
    "type": "user",
    "name": "Earline Greenholt",
    "email": "125.greenholt.earline@graham.name",
    "time_zone": "America/Lima",
    "color": "green",
    "role": "admin",
    "job_title": "Director of Engineering",
    "avatar_url": "https://pd-static-assets.pagerduty.com/users/blank-avatar.png",
    "description": "I'm the boss",
    "license": {
      "id": "PTDVERC",
      "type": "license_reference"
    }
  }
}
```

## Response 200

The user that was updated.

### `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": "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"
      }
    ]
  }
}
```

## 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 402

Account does not have the abilities to perform the action. Please review the response for the required abilities.
You can also use the [Abilities API](#resource_Abilities) to determine what features are available to your account.

### `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 404

The requested resource was not found.

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