> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Update a user

PUT https://one.zuora.com/scim/v2/Users/{id}
Content-Type: application/json

Updates an existing user resource, overwriting all values for a user even if an attribute is empty or not provided.
If an attribute that had been set previously is left blank during a PUT operation, the new value will be blank in accordance with the data type of the attribute and the storage provider.
Deactivated users can be re-enabled by setting the active attribute to true. The value of the \<id> should be the user's corresponding user ID.

Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/oneid/scim/update-a-specific-user

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Request

### Path parameters

- `id` (string, required) — The ID of the user to be updated.

### Headers

- `Idempotency-Key` (string, optional) — Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
- `Accept-Encoding` (string, optional) — Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.
- `Content-Encoding` (string, optional) — Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
- `Zuora-Track-Id` (string, optional) — A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`"`), and quote (`'`).
- `Zuora-Entity-Ids` (string, optional) — An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.

### Body (application/json)

This endpoint expects an object.

- `schemas` (list of string, optional)
- `id` (string, optional, nullable)
- `externalId` (string, optional)
- `meta` (ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaMeta, optional)
- `userName` (string, optional)
- `name` (ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaName, optional)
- `displayName` (string, optional)
- `preferredLanguage` (string, optional)
- `locale` (string, optional)
- `active` (boolean, optional)
- `emails` (list of ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaEmailsItems, optional)
- `groups` (list of ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaGroupsItems, optional)
- `roles` (list of ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaRolesItems, optional)
- `urn:zuora:scim:schemas:1.0:UserExtension` (ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaUrnZuoraScimSchemas10UserExtension, optional)

## Response

### 200

OK

- `id` (string, optional) — The unique identifier for the user resource.
- `userName` (string, optional) — The user’s unique username.
- `displayName` (string, optional) — The display name of the user, typically used in user interfaces.
- `active` (boolean, optional) — Indicates whether the user account is currently active.
- `emails` (list of ScimV2UsersIdPutResponsesContentApplicationJsonSchemaEmailsItems, optional)
- `meta` (ScimV2UsersIdPutResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaMeta

- `created` (datetime, optional)
- `resourceType` (string, optional)
- `location` (string, optional)

### ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaName

- `formatted` (string, optional)
- `familyName` (string, optional)
- `givenName` (string, optional)

### ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaEmailsItems

- `value` (string, optional)

### ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaGroupsItems

- `value` (string, optional)
- `display` (string, optional)

### ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaRolesItems

- `value` (string, optional)
- `display` (string, optional)

### ScimV2UsersIdPutRequestBodyContentApplicationJsonSchemaUrnZuoraScimSchemas10UserExtension

- `schemas` (list of string, optional)
- `organizationId` (string, optional)
- `status` (string, optional)
- `ssoEnabled` (boolean, optional)
- `region` (string, optional)

### ScimV2UsersIdPutResponsesContentApplicationJsonSchemaEmailsItems

- `value` (string, optional) — The email address of the user.
- `primary` (boolean, optional) — Indicates whether this email address is the primary email for the user.

### ScimV2UsersIdPutResponsesContentApplicationJsonSchemaMeta

- `resourceType` (string, optional) — The type of resource, e.g., 'User'.
- `created` (datetime, optional) — The date and time when the user resource was created.
- `lastModified` (datetime, optional) — The date and time when the user resource was last modified.

## Examples

**Request**

```json
{
  "schemas": [
    "urn:zuora:scim:schemas:1.0:UserExtension",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "id": "4ae68f98-2762-4001-b95c-34569b413e8e",
  "externalId": "Amy+test5",
  "meta": {
    "created": "2023-01-04T18:48:30.180Z",
    "resourceType": "User",
    "location": "http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e"
  },
  "userName": "Amy+test6",
  "name": {
    "formatted": "Amy Lawrence",
    "familyName": "Amy",
    "givenName": "Lawrence"
  },
  "displayName": "Amy Lawrence",
  "preferredLanguage": "en",
  "locale": "en-US",
  "active": true,
  "emails": [
    {
      "value": "Amy+test5-updated@zuora.com"
    }
  ],
  "groups": [
    {
      "value": "0fb99576-2154-4d96-a6cb-384dd430f45f",
      "display": "Amy Test"
    }
  ],
  "roles": [
    {
      "value": "USER",
      "display": "USER"
    }
  ],
  "urn:zuora:scim:schemas:1.0:UserExtension": {
    "schemas": [
      "urn:zuora:scim:schemas:1.0:UserExtension"
    ],
    "organizationId": "ec141dc2-901e-4813-a25d-ef480cff1e26",
    "status": "ACTIVE",
    "ssoEnabled": true,
    "region": "EU"
  }
}
```

**Response**

```json
{
  "id": "123456",
  "userName": "johndoe",
  "displayName": "John Doe",
  "active": true,
  "emails": [
    {
      "value": "johndoe@example.com",
      "primary": true
    }
  ],
  "meta": {
    "resourceType": "User",
    "created": "2023-01-01T12:00:00Z",
    "lastModified": "2023-01-01T12:00:00Z"
  },
  "itemsPerPage": 1,
  "resources": [
    {
      "active": true,
      "displayName": "Amy Lawrence",
      "emails": [
        {
          "display": "Amy+test5-updated@zuora.com",
          "primary": true,
          "type": "work",
          "value": "Amy+test5-updated@zuora.com"
        }
      ],
      "externalId": "Amy+test6",
      "id": "4ae68f98-2762-4001-b95c-34569b413e8e",
      "locale": "en-US",
      "meta": {
        "created": "2024-10-03T10:22:09.727Z",
        "location": "http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e",
        "resourceType": "User"
      },
      "name": {
        "familyName": "Amy",
        "formatted": "Amy Lawrence",
        "givenName": "Lawrence"
      },
      "preferredLanguage": "en",
      "roles": [
        {
          "display": "USER",
          "value": "USER"
        }
      ],
      "schemas": [
        "urn:zuora:scim:schemas:1.0:UserExtension",
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "urn:zuora:scim:schemas:1.0:UserExtension": {
        "organizationId": "5619df2e-fa8c-47fa-9c1e-16ab5af4936e",
        "region": "EU",
        "schemas": [
          "urn:zuora:scim:schemas:1.0:UserExtension"
        ],
        "ssoEnabled": true,
        "status": "ACTIVE"
      },
      "userName": "assingh151@zuora.com"
    }
  ],
  "schemas": [
    "urn:zuora:scim:schemas:1.0:UserExtension",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "startIndex": 1,
  "totalResults": 1
}
```

**SDK Code**

```python SCIM_updateASpecificUser_example
import requests

url = "https://one.zuora.com/scim/v2/Users/id"

payload = {
    "schemas": ["urn:zuora:scim:schemas:1.0:UserExtension", "urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "4ae68f98-2762-4001-b95c-34569b413e8e",
    "externalId": "Amy+test5",
    "meta": {
        "created": "2023-01-04T18:48:30.180Z",
        "resourceType": "User",
        "location": "http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e"
    },
    "userName": "Amy+test6",
    "name": {
        "formatted": "Amy Lawrence",
        "familyName": "Amy",
        "givenName": "Lawrence"
    },
    "displayName": "Amy Lawrence",
    "preferredLanguage": "en",
    "locale": "en-US",
    "active": True,
    "emails": [{ "value": "Amy+test5-updated@zuora.com" }],
    "groups": [
        {
            "value": "0fb99576-2154-4d96-a6cb-384dd430f45f",
            "display": "Amy Test"
        }
    ],
    "roles": [
        {
            "value": "USER",
            "display": "USER"
        }
    ],
    "urn:zuora:scim:schemas:1.0:UserExtension": {
        "schemas": ["urn:zuora:scim:schemas:1.0:UserExtension"],
        "organizationId": "ec141dc2-901e-4813-a25d-ef480cff1e26",
        "status": "ACTIVE",
        "ssoEnabled": True,
        "region": "EU"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript SCIM_updateASpecificUser_example
const url = 'https://one.zuora.com/scim/v2/Users/id';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"schemas":["urn:zuora:scim:schemas:1.0:UserExtension","urn:ietf:params:scim:schemas:core:2.0:User"],"id":"4ae68f98-2762-4001-b95c-34569b413e8e","externalId":"Amy+test5","meta":{"created":"2023-01-04T18:48:30.180Z","resourceType":"User","location":"http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e"},"userName":"Amy+test6","name":{"formatted":"Amy Lawrence","familyName":"Amy","givenName":"Lawrence"},"displayName":"Amy Lawrence","preferredLanguage":"en","locale":"en-US","active":true,"emails":[{"value":"Amy+test5-updated@zuora.com"}],"groups":[{"value":"0fb99576-2154-4d96-a6cb-384dd430f45f","display":"Amy Test"}],"roles":[{"value":"USER","display":"USER"}],"urn:zuora:scim:schemas:1.0:UserExtension":{"schemas":["urn:zuora:scim:schemas:1.0:UserExtension"],"organizationId":"ec141dc2-901e-4813-a25d-ef480cff1e26","status":"ACTIVE","ssoEnabled":true,"region":"EU"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SCIM_updateASpecificUser_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://one.zuora.com/scim/v2/Users/id"

	payload := strings.NewReader("{\n  \"schemas\": [\n    \"urn:zuora:scim:schemas:1.0:UserExtension\",\n    \"urn:ietf:params:scim:schemas:core:2.0:User\"\n  ],\n  \"id\": \"4ae68f98-2762-4001-b95c-34569b413e8e\",\n  \"externalId\": \"Amy+test5\",\n  \"meta\": {\n    \"created\": \"2023-01-04T18:48:30.180Z\",\n    \"resourceType\": \"User\",\n    \"location\": \"http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e\"\n  },\n  \"userName\": \"Amy+test6\",\n  \"name\": {\n    \"formatted\": \"Amy Lawrence\",\n    \"familyName\": \"Amy\",\n    \"givenName\": \"Lawrence\"\n  },\n  \"displayName\": \"Amy Lawrence\",\n  \"preferredLanguage\": \"en\",\n  \"locale\": \"en-US\",\n  \"active\": true,\n  \"emails\": [\n    {\n      \"value\": \"Amy+test5-updated@zuora.com\"\n    }\n  ],\n  \"groups\": [\n    {\n      \"value\": \"0fb99576-2154-4d96-a6cb-384dd430f45f\",\n      \"display\": \"Amy Test\"\n    }\n  ],\n  \"roles\": [\n    {\n      \"value\": \"USER\",\n      \"display\": \"USER\"\n    }\n  ],\n  \"urn:zuora:scim:schemas:1.0:UserExtension\": {\n    \"schemas\": [\n      \"urn:zuora:scim:schemas:1.0:UserExtension\"\n    ],\n    \"organizationId\": \"ec141dc2-901e-4813-a25d-ef480cff1e26\",\n    \"status\": \"ACTIVE\",\n    \"ssoEnabled\": true,\n    \"region\": \"EU\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SCIM_updateASpecificUser_example
require 'uri'
require 'net/http'

url = URI("https://one.zuora.com/scim/v2/Users/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"schemas\": [\n    \"urn:zuora:scim:schemas:1.0:UserExtension\",\n    \"urn:ietf:params:scim:schemas:core:2.0:User\"\n  ],\n  \"id\": \"4ae68f98-2762-4001-b95c-34569b413e8e\",\n  \"externalId\": \"Amy+test5\",\n  \"meta\": {\n    \"created\": \"2023-01-04T18:48:30.180Z\",\n    \"resourceType\": \"User\",\n    \"location\": \"http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e\"\n  },\n  \"userName\": \"Amy+test6\",\n  \"name\": {\n    \"formatted\": \"Amy Lawrence\",\n    \"familyName\": \"Amy\",\n    \"givenName\": \"Lawrence\"\n  },\n  \"displayName\": \"Amy Lawrence\",\n  \"preferredLanguage\": \"en\",\n  \"locale\": \"en-US\",\n  \"active\": true,\n  \"emails\": [\n    {\n      \"value\": \"Amy+test5-updated@zuora.com\"\n    }\n  ],\n  \"groups\": [\n    {\n      \"value\": \"0fb99576-2154-4d96-a6cb-384dd430f45f\",\n      \"display\": \"Amy Test\"\n    }\n  ],\n  \"roles\": [\n    {\n      \"value\": \"USER\",\n      \"display\": \"USER\"\n    }\n  ],\n  \"urn:zuora:scim:schemas:1.0:UserExtension\": {\n    \"schemas\": [\n      \"urn:zuora:scim:schemas:1.0:UserExtension\"\n    ],\n    \"organizationId\": \"ec141dc2-901e-4813-a25d-ef480cff1e26\",\n    \"status\": \"ACTIVE\",\n    \"ssoEnabled\": true,\n    \"region\": \"EU\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java SCIM_updateASpecificUser_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://one.zuora.com/scim/v2/Users/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"schemas\": [\n    \"urn:zuora:scim:schemas:1.0:UserExtension\",\n    \"urn:ietf:params:scim:schemas:core:2.0:User\"\n  ],\n  \"id\": \"4ae68f98-2762-4001-b95c-34569b413e8e\",\n  \"externalId\": \"Amy+test5\",\n  \"meta\": {\n    \"created\": \"2023-01-04T18:48:30.180Z\",\n    \"resourceType\": \"User\",\n    \"location\": \"http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e\"\n  },\n  \"userName\": \"Amy+test6\",\n  \"name\": {\n    \"formatted\": \"Amy Lawrence\",\n    \"familyName\": \"Amy\",\n    \"givenName\": \"Lawrence\"\n  },\n  \"displayName\": \"Amy Lawrence\",\n  \"preferredLanguage\": \"en\",\n  \"locale\": \"en-US\",\n  \"active\": true,\n  \"emails\": [\n    {\n      \"value\": \"Amy+test5-updated@zuora.com\"\n    }\n  ],\n  \"groups\": [\n    {\n      \"value\": \"0fb99576-2154-4d96-a6cb-384dd430f45f\",\n      \"display\": \"Amy Test\"\n    }\n  ],\n  \"roles\": [\n    {\n      \"value\": \"USER\",\n      \"display\": \"USER\"\n    }\n  ],\n  \"urn:zuora:scim:schemas:1.0:UserExtension\": {\n    \"schemas\": [\n      \"urn:zuora:scim:schemas:1.0:UserExtension\"\n    ],\n    \"organizationId\": \"ec141dc2-901e-4813-a25d-ef480cff1e26\",\n    \"status\": \"ACTIVE\",\n    \"ssoEnabled\": true,\n    \"region\": \"EU\"\n  }\n}")
  .asString();
```

```php SCIM_updateASpecificUser_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://one.zuora.com/scim/v2/Users/id', [
  'body' => '{
  "schemas": [
    "urn:zuora:scim:schemas:1.0:UserExtension",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "id": "4ae68f98-2762-4001-b95c-34569b413e8e",
  "externalId": "Amy+test5",
  "meta": {
    "created": "2023-01-04T18:48:30.180Z",
    "resourceType": "User",
    "location": "http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e"
  },
  "userName": "Amy+test6",
  "name": {
    "formatted": "Amy Lawrence",
    "familyName": "Amy",
    "givenName": "Lawrence"
  },
  "displayName": "Amy Lawrence",
  "preferredLanguage": "en",
  "locale": "en-US",
  "active": true,
  "emails": [
    {
      "value": "Amy+test5-updated@zuora.com"
    }
  ],
  "groups": [
    {
      "value": "0fb99576-2154-4d96-a6cb-384dd430f45f",
      "display": "Amy Test"
    }
  ],
  "roles": [
    {
      "value": "USER",
      "display": "USER"
    }
  ],
  "urn:zuora:scim:schemas:1.0:UserExtension": {
    "schemas": [
      "urn:zuora:scim:schemas:1.0:UserExtension"
    ],
    "organizationId": "ec141dc2-901e-4813-a25d-ef480cff1e26",
    "status": "ACTIVE",
    "ssoEnabled": true,
    "region": "EU"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp SCIM_updateASpecificUser_example
using RestSharp;

var client = new RestClient("https://one.zuora.com/scim/v2/Users/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"schemas\": [\n    \"urn:zuora:scim:schemas:1.0:UserExtension\",\n    \"urn:ietf:params:scim:schemas:core:2.0:User\"\n  ],\n  \"id\": \"4ae68f98-2762-4001-b95c-34569b413e8e\",\n  \"externalId\": \"Amy+test5\",\n  \"meta\": {\n    \"created\": \"2023-01-04T18:48:30.180Z\",\n    \"resourceType\": \"User\",\n    \"location\": \"http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e\"\n  },\n  \"userName\": \"Amy+test6\",\n  \"name\": {\n    \"formatted\": \"Amy Lawrence\",\n    \"familyName\": \"Amy\",\n    \"givenName\": \"Lawrence\"\n  },\n  \"displayName\": \"Amy Lawrence\",\n  \"preferredLanguage\": \"en\",\n  \"locale\": \"en-US\",\n  \"active\": true,\n  \"emails\": [\n    {\n      \"value\": \"Amy+test5-updated@zuora.com\"\n    }\n  ],\n  \"groups\": [\n    {\n      \"value\": \"0fb99576-2154-4d96-a6cb-384dd430f45f\",\n      \"display\": \"Amy Test\"\n    }\n  ],\n  \"roles\": [\n    {\n      \"value\": \"USER\",\n      \"display\": \"USER\"\n    }\n  ],\n  \"urn:zuora:scim:schemas:1.0:UserExtension\": {\n    \"schemas\": [\n      \"urn:zuora:scim:schemas:1.0:UserExtension\"\n    ],\n    \"organizationId\": \"ec141dc2-901e-4813-a25d-ef480cff1e26\",\n    \"status\": \"ACTIVE\",\n    \"ssoEnabled\": true,\n    \"region\": \"EU\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift SCIM_updateASpecificUser_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "schemas": ["urn:zuora:scim:schemas:1.0:UserExtension", "urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "4ae68f98-2762-4001-b95c-34569b413e8e",
  "externalId": "Amy+test5",
  "meta": [
    "created": "2023-01-04T18:48:30.180Z",
    "resourceType": "User",
    "location": "http://localhost:9900/scim/v2/Users/4ae68f98-2762-4001-b95c-34569b413e8e"
  ],
  "userName": "Amy+test6",
  "name": [
    "formatted": "Amy Lawrence",
    "familyName": "Amy",
    "givenName": "Lawrence"
  ],
  "displayName": "Amy Lawrence",
  "preferredLanguage": "en",
  "locale": "en-US",
  "active": true,
  "emails": [["value": "Amy+test5-updated@zuora.com"]],
  "groups": [
    [
      "value": "0fb99576-2154-4d96-a6cb-384dd430f45f",
      "display": "Amy Test"
    ]
  ],
  "roles": [
    [
      "value": "USER",
      "display": "USER"
    ]
  ],
  "urn:zuora:scim:schemas:1.0:UserExtension": [
    "schemas": ["urn:zuora:scim:schemas:1.0:UserExtension"],
    "organizationId": "ec141dc2-901e-4813-a25d-ef480cff1e26",
    "status": "ACTIVE",
    "ssoEnabled": true,
    "region": "EU"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://one.zuora.com/scim/v2/Users/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```