# Updates a Group

Update an audience in the Program with partial changes using
[SCIM PatchOp](https://tools.ietf.org/html/rfc7644#section-3.5.2).
Add or remove selected fields of the audience.
The list of members in the Group is referenced using the `identifierField`, by either:
- `email`
- `id`
- `userName`
 (the default if no
`identifierField`
 is included)

All operations are supported: `add`, `remove`, and `replace`.
A `replace` replaces **all the members** of the Group by the value sent
(a full replace).
This operation is asynchronous, the response will not include the list of members.
A `JobId` will be in the response's meta, to be able to get a JobReport (see  GET /v2/Groups/JobReport/{jobId}.
 We advise refering to our  SCIM patching documentation before executing.
Refer to our  error responses documentation for detail on errors.

Endpoint: PATCH /scim/v2/Groups/{group_id}
Version: 2026-05-01
Security: oauth2_as_a_server, oauth2_as_a_user

## Security:

  - `oauth2_as_a_server` (unknown)
    oauth2 scopes: groups.write

  - `oauth2_as_a_user` (unknown)
    oauth2 scopes: groups.write

## Path parameters:

  - `group_id` (string, required)
    ID of the audience to patch

## Request fields (application/json):

  - `schemas` (array)
    Example: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]

  - `SocialChorus:1.0:Group` (object)

  - `SocialChorus:1.0:Group.identifierField` (string)
    Specifies which user identifier field to use to determine group membership.
Allowed values are 'id', 'email' and 'userName'. Default value is 'userName'.
    Example: userName

  - `Operations` (array)

  - `Operations.op` (string)
    Example: add

  - `Operations.path` (string)
    Example: members

  - `Operations.value` (array)

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `schemas` (array)
    List of Schemas
    Example: ["urn:ietf:params:scim:schemas:core:2.0:Group","SocialChorus:1.0:Group"]

  - `id` (integer)
    Group unique id
    Example: 115

  - `name` (string)
    A name for the Group, generated from the given displayName.
    Example: group_of_users

  - `displayName` (string)
    A human-readable name for the Group.
    Example: Group of users

  - `externalId` (string)
    ID from provisioning system. This is the resource ID on the client system, not Firstup's ID.
    Example: 1234qweasd567

  - `description` (string)
    Description for the Group.
    Example: Group of iOS users from partner domain

  - `members` (array)
    An empty array, as members will be changed later, asynchronously
    Example: []

  - `meta` (object)

  - `meta.resourceType` (string)
    Example: Group

  - `meta.created` (string)
    date and time when the group was created
    Example: 2022-05-13T13:32:00.598Z

  - `meta.lastModified` (string)
    date and time when the group was last updated
    Example: 2022-05-13T13:32:00.598Z

  - `meta.location` (string)
    URL of the group
    Example: https://partner.socialchorus.com/scim/v2/Groups/115

  - `meta.jobId` (integer)
    the ID of the asynchronus job, to be able to request a Job report
    Example: 4567

  - `SocialChorus:1.0:Group` (object)
    Example: {}

## Response 400:

  - `400` (unknown)
    Bad Request. See more on error responses  here.

## Response 400 fields (*/*):

  - `schemas` (array)
    Example: ["urn:ietf:params:scim:api:messages:2.0:Error"]

  - `detail` (string)
    Example: Reason for bad request

  - `status` (integer)
    Example: 400

## Response 401:

  - `401` (unknown)
    Unauthenticated. See more on error responses  here.

## Response 401 fields (*/*):

  - `schemas` (array)
    Example: ["urn:ietf:params:scim:api:messages:2.0:Error"]

  - `detail` (string)
    Example: Authentication failure

  - `status` (integer)
    Example: 401

## Response 403:

  - `403` (unknown)
    Unauthorized. See more on error responses  here.

## Response 403 fields (*/*):

  - `schemas` (array)
    Example: ["urn:ietf:params:scim:api:messages:2.0:Error"]

  - `detail` (string)
    Example: Operation is not permitted

  - `status` (integer)
    Example: 403

## Response 404:

  - `404` (unknown)
    Not Found. See more on error responses  here.

## Response 404 fields (*/*):

  - `schemas` (array)
    Example: ["urn:ietf:params:scim:api:messages:2.0:Error"]

  - `detail` (string)
    Example: The requested resource was not found.

  - `status` (integer)
    Example: 404

