---
title: PATCH User API
description: The PATCH User API updates an existing user in the account.
url: https://docs.tealium.com/api/v3/scim-api/patch-user-api/
---
## How it works

Use the PATCH method to update an existing user:

```bash
PATCH /scim/v2/Users/{id}
```

## Authentication

The OAuth bearer token is used to authenticate all API calls, not the API key.

For more information, see [Authentication](https://docs.tealium.com/about-scim-api/#authentication).

## PATCH operation parameters

This command takes the following parameters:

| Object | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | URL-parameter | Required | The unique identifier for the user. This value is sent as part of the REST API call.|
| `op` | String | Optional | The operation to perform. Supported values are `add`, `replace`, and `remove`. |
| `path` | String | Optional | The attribute path that specifies the target of the operation. If omitted, the operation is performed on the entire resource. |
| `active` | Boolean | Optional | Whether the user is active. This parameter cannot be removed. Use the `replace` operation to set it to `false`. |
| `displayName` | String | Optional | The display name of the user. |
| `externalId` | String | Optional | The external ID of the user. |
| `name.givenName` | String | Optional | The given name of the user. |
| `name.familyName` | String | Optional | The family name of the user. |

`userName` cannot be changed.

### Example cURL request

#### Microsoft Entra ID

```bash
curl -X PATCH "https://developer.tealiumapis.com/scim/v2/Users/eb987394-b2b0-4a21-a1d8-7915a91e06b" \
-H "Content-Type: application/scim+json" \
-H "Accept: application/scim+json" \
-d '{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "path": "active",
            "value": "false"
        }
    , "/early-access/api/scim-api/patch-user-api"]
}'
```

#### Okta

```bash
curl -X PATCH "https://developer.tealiumapis.com/scim/v2/Users/eb987394-b2b0-4a21-a1d8-7915a91e06b" \
-H "Content-Type: application/scim+json" \
-H "Accept: application/scim+json" \
-d '{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "value": {
                "active": false
            }
        }
    , "/early-access/api/scim-api/patch-user-api"]
}'
```

### Example response

This call returns a 204 status code.

## Error messages

Potential error messages for this endpoint:

| Error code | Error message |
| --- | --- |
| 400 | `{"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],"status": "400","scimType": "invalidValue","detail": "User payload is required."` |
| 401 | `{"returnCode" : 1401 , "message" : "Authentication failed."}` |
| 403 | `{"schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error"],"status": "403","scimType": null,"detail": "Missing X-Tealium-Account header."}` |
| 404 |` {"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],"status": "404","scimType": "noTarget","detail": "User not found in account {ACCOUNT}."}`|
| 500 | `{"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],"status": "500","scimType": "internalServerError","detail": "Error processing json for extension - account {ACCOUNT}"}`|