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

# Update user

`PUT https://api.pagerduty.com/scim/v2/Users/{id}`

Updates an existing user with the provided details.
Scoped OAuth requires: `users.write`

## Authorization

- **apiKey** (apiKey) — `Authorization` header. A [General Access API Key](https://support.pagerduty.com/main/docs/api-access-keys#generate-a-general-access-rest-api-key) with format `Token token=<API_KEY>`
- **bearerToken** (http) — HTTP bearer. An [App OAuth Token](https://docs.pagerduty.com/developer/private-apps) with format `Bearer <TOKEN>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of the user targeted in this request. |

## Request body (`application/json`)

SCIM User Update Params

| Field | Type | Required | Description |
|---|---|---|---|
| `active` | boolean |  | A Boolean value indicating the User's administrative status. When set to false, the user will be deleted. All users are created as active by default. It is an error to attempt to create a user with the `active` field set to `false`. Default: `true`. |
| `displayName` | string | yes | The name of the User, suitable for display to end-users. The name SHOULD be the full name of the User being described, if known. Min length: 1. Max length: 255. |
| `entitlements` | array of object |  | A list containing the User's entitlements. PagerDuty Users have a single entitlement representing the User's license. The `value` field of this item must be set to the User's license ID, and the `type` field must be set to `license`. The license is not required to be set when creating a user. If not set, a default license will be assigned. Valid license IDs can be fetched from the PagerDuty Public API: https://developer.pagerduty.com/api-reference/4c10cb38f7381-list-licenses. Min items: 1. Max items: 1. |
| `entitlements[].type` | string | yes | One of: `license`. |
| `entitlements[].value` | string | yes |  |
| `externalId` | string |  | A unique identifier for the User, set by the SCIM client. The SCIM client is responsible for ensuring that the value is unique across all Users. Min length: 1. Max length: 100. |
| `id` | string |  | A unique identifier for a SCIM resource as defined by the service provider. The identifier is unique across the service provider's entire set of resources. It is a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests. The ID must always be treated as a case-sensitive opaque string. Min length: 26. Max length: 100. |
| `roles` | array of object |  | A list containing the User's role. PagerDuty Users have a single role and the list will always contain a single item. The `roles` field accepts two formats: Format 1 - Using the primary field: ```json {"roles": [{"value": "user", "primary": true}]} ``` *Required*: `value` (role name), `primary` (must be `true`) *Optional*: `type` (can be any string value, will be ignored and default to `"base"`) Format 2 - Using the type field: ```json {"roles": [{"value": "user", "type": "base"}]} ``` *Required*: `value` (role name), `type` (must be `"base"`) *Optional*: `primary` (must be `true` if included) The role is not required when creating a user. If not set, a default role will be assigned. Valid user roles are defined in the PagerDuty Public API documentation: https://developer.pagerduty.com/api-reference/4cb4fd0f5444a-create-a-user The only supported role type at this time is "base", which maps to the user's base account role in PagerDuty. Min items: 1. Max items: 1. |
| `roles[].primary` | boolean |  | Whether this is the primary role (must be true) One of: `true`. |
| `roles[].type` | string |  | Role type (can be any string when primary=true, must be 'base' otherwise) |
| `roles[].value` | string |  | Role name. |
| `schemas` | array of string (uri) |  | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:schemas:core:2.0:User"]`. Min items: 1. Items must be unique. |
| `timezone` | string \| null |  | The User's case-sensitive time zone. Must be a valid IANA time zone identifier. Write-only. |
| `title` | string \| null |  | The job title of the User. |
| `userName` | string (email) | yes | A unique identifier for the User, typically used by the user to directly authenticate to the service provider. Each User MUST include a non-empty userName value. This identifier MUST be unique across the service provider's entire set of Users. Min length: 1. Max length: 100. |

## Response 200

SCIM User

### `application/scim+json`

| Field | Type | Required | Description |
|---|---|---|---|
| `active` | boolean | yes | A Boolean value indicating the User's administrative status. When set to false, the user will be deleted. All users are created as active by default. It is an error to attempt to create a user with the `active` field set to `false`. Default: `true`. |
| `displayName` | string | yes | The name of the User, suitable for display to end-users. The name SHOULD be the full name of the User being described, if known. Min length: 1. Max length: 255. |
| `entitlements` | array of object |  | A list containing the User's entitlements. PagerDuty Users have a single entitlement representing the User's license. The `value` field of this item must be set to the User's license ID, and the `type` field must be set to `license`. The license is not required to be set when creating a user. If not set, a default license will be assigned. Valid license IDs can be fetched from the PagerDuty Public API: https://developer.pagerduty.com/api-reference/4c10cb38f7381-list-licenses. Min items: 1. Max items: 1. |
| `entitlements[].type` | string | yes | One of: `license`. |
| `entitlements[].value` | string | yes |  |
| `externalId` | string |  | A unique identifier for the User, set by the SCIM client. The SCIM client is responsible for ensuring that the value is unique across all Users. Min length: 1. Max length: 100. |
| `id` | string | yes | A unique identifier for a SCIM resource as defined by the service provider. The identifier is unique across the service provider's entire set of resources. It is a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests. The ID must always be treated as a case-sensitive opaque string. Min length: 26. Max length: 100. |
| `meta` | object | yes | Read-only. |
| `meta.resourceType` | string | yes | A label indicating the resource type of the resource. Read-only. One of: `User`. |
| `roles` | array of object | yes | A list containing the User's role. PagerDuty Users have a single role and the list will always contain a single item. The only supported role type at this time is "base", which maps to the user's base account role in PagerDuty. Min items: 1. Max items: 1. |
| `roles[].primary` | boolean | yes | One of: `true`. |
| `roles[].type` | string | yes | One of: `base`. |
| `roles[].value` | string | yes |  |
| `schemas` | array of string (uri) | yes | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:schemas:core:2.0:User"]`. Min items: 1. Items must be unique. |
| `timezone` | string \| null |  | The User's case-sensitive time zone. Must be a valid IANA time zone identifier. Write-only. |
| `title` | string \| null |  | The job title of the User. |
| `userName` | string (email) | yes | A unique identifier for the User, typically used by the user to directly authenticate to the service provider. Each User MUST include a non-empty userName value. This identifier MUST be unique across the service provider's entire set of Users. Min length: 1. Max length: 100. |

## Response 204

No Content

## Response 400

Bad Request

### `application/scim+json`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | string | yes | Detailed error explanation. |
| `schemas` | array of string (uri) | yes | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:api:messages:2.0:Error"]`. Min items: 1. Items must be unique. |
| `scimType` | string |  | SCIM error type. One of: `invalidFilter`, `tooMany`, `uniqueness`, `mutability`, `invalidSyntax`, `invalidPath`, `noTarget`, `invalidValue`, `invalidVers`, `sensitive`. |
| `status` | string | yes | HTTP status code for the error. |

## Response 401

Unauthorized

### `application/scim+json`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | string | yes | Detailed error explanation. |
| `schemas` | array of string (uri) | yes | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:api:messages:2.0:Error"]`. Min items: 1. Items must be unique. |
| `scimType` | string |  | SCIM error type. One of: `invalidFilter`, `tooMany`, `uniqueness`, `mutability`, `invalidSyntax`, `invalidPath`, `noTarget`, `invalidValue`, `invalidVers`, `sensitive`. |
| `status` | string | yes | HTTP status code for the error. |

## Response 403

Forbidden

### `application/scim+json`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | string | yes | Detailed error explanation. |
| `schemas` | array of string (uri) | yes | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:api:messages:2.0:Error"]`. Min items: 1. Items must be unique. |
| `scimType` | string |  | SCIM error type. One of: `invalidFilter`, `tooMany`, `uniqueness`, `mutability`, `invalidSyntax`, `invalidPath`, `noTarget`, `invalidValue`, `invalidVers`, `sensitive`. |
| `status` | string | yes | HTTP status code for the error. |

## Response 404

Not Found

### `application/scim+json`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | string | yes | Detailed error explanation. |
| `schemas` | array of string (uri) | yes | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:api:messages:2.0:Error"]`. Min items: 1. Items must be unique. |
| `scimType` | string |  | SCIM error type. One of: `invalidFilter`, `tooMany`, `uniqueness`, `mutability`, `invalidSyntax`, `invalidPath`, `noTarget`, `invalidValue`, `invalidVers`, `sensitive`. |
| `status` | string | yes | HTTP status code for the error. |

## Response 500

Internal Server Error

### `application/scim+json`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | string | yes | Detailed error explanation. |
| `schemas` | array of string (uri) | yes | URIs that indicate the schemas used in data. Default: `["urn:ietf:params:scim:api:messages:2.0:Error"]`. Min items: 1. Items must be unique. |
| `scimType` | string |  | SCIM error type. One of: `invalidFilter`, `tooMany`, `uniqueness`, `mutability`, `invalidSyntax`, `invalidPath`, `noTarget`, `invalidValue`, `invalidVers`, `sensitive`. |
| `status` | string | yes | HTTP status code for the error. |

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