> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch a SCIM group

> Applies partial updates to a SCIM group using SCIM PatchOp operations. Supports updating the display name and adding, removing, or replacing members.

Required scopes: `user_management:read-write`.

<h4 style={{borderBottom:"none"}}>Authorizations</h4>

<ParamField header="Authorization" type="string" required>
  This API uses OAuth 2.0 with the authorization code grant flow.
</ParamField>

<h4 style={{borderBottom:"none"}}>Path</h4>

<ParamField path="workspace_team_id" type="string" required>
  The ID of the group to update.
</ParamField>

<div style={{display:"flex",justifyContent:"space-between",alignItems:"center"}}><h4 style={{borderBottom:"none",margin:"0"}}>Body</h4><span style={{fontSize:"0.75rem",fontWeight:"400",color:"#9ca3af"}}>application/json</span></div>

<ParamField body="schemas" type="string[]" required>
  Must include `"urn:ietf:params:scim:api:messages:2.0:PatchOp"`.
</ParamField>

<ParamField body="Operations" type="object[]" required>
  List of patch operations to apply sequentially.

  <Expandable title="Operations[]">
    <ParamField body="op" type="string" required>
      The operation type: `"add"`, `"remove"`, or `"replace"`.
    </ParamField>

    <ParamField body="path" type="string">
      The attribute to target, e.g. `"displayName"` or `"members"`. Also supports the SCIM filter path syntax `members[value eq "{id}"]` with `op: "remove"` to remove a specific member. May be omitted when `value` contains a keyed object.
    </ParamField>

    <ParamField body="value" type="any">
      The value for the operation. For member additions and replacements, must be an array of objects with a `value` property containing a workspace membership ID or workspace invite ID.
    </ParamField>
  </Expandable>
</ParamField>

<h4 style={{borderBottom:"none"}}>Response</h4>

The response has the same shape as [Update a SCIM group](/rest-api/scim/update-group).

<RequestExample>
  ```json Add members theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
    "Operations": [
      {
        "op": "add",
        "path": "members",
        "value": [{"value": "3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47"}]
      }
    ]
  }
  ```

  ```json Rename group theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
    "Operations": [
      {
        "op": "replace",
        "path": "displayName",
        "value": "Platform Engineering"
      }
    ]
  }
  ```

  ```json Remove all members theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
    "Operations": [
      {
        "op": "remove",
        "path": "members"
      }
    ]
  }
  ```

  ```json Remove specific member theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
    "Operations": [
      {
        "op": "remove",
        "path": "members[value eq \"3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47\"]"
      }
    ]
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
    "id": "b5d3f8a1-c920-47e6-8b4d-3f17a9c82e50",
    "displayName": "Platform Engineering",
    "members": [
      {
        "value": "3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47",
        "$ref": "/scim/v2/Users/3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47"
      }
    ],
    "meta": {
      "resourceType": "Group",
      "created": "2024-01-01T00:00:00.000Z",
      "lastModified": "2024-01-02T00:00:00.000Z"
    }
  }
  ```
</ResponseExample>
