Skip to content

Updates a Group

Request

Update an audience in the Program with partial changes using SCIM PatchOp.

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.

Security
oauth2_as_a_server(Required scopes: groups.write) or oauth2_as_a_user(Required scopes: groups.write)
Path
group_idstringrequired

ID of the audience to patch

Bodyapplication/jsonrequired
schemasArray of strings
Example:
[ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ]
SocialChorus:1.0:Groupobject(Scim.Group.SocialChorusExtension)
OperationsArray of objects
curl -i -X PATCH \
  'https://partner.socialchorus.com/scim/v2/Groups/{group_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "schemas": [
      "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "SocialChorus:1.0:Group": {
      "identifierField": "userName"
    },
    "Operations": [
      {
        "op": "add",
        "path": "members",
        "value": [
          {
            "value": "username3"
          }
        ]
      }
    ]
  }'

Responses

Success

Bodyapplication/json
schemasArray of strings

List of Schemas

Example:
[ "urn:ietf:params:scim:schemas:core:2.0:Group", "SocialChorus:1.0:Group" ]
idinteger

Group unique id

Example:115
namestring

A name for the Group, generated from the given displayName.

Example:"group_of_users"
displayNamestring

A human-readable name for the Group.

Example:"Group of users"
externalIdstring

ID from provisioning system. This is the resource ID on the client system, not Firstup's ID.

Example:"1234qweasd567"
descriptionstring

Description for the Group.

Example:"Group of iOS users from partner domain"
membersArray of objects

An empty array, as members will be changed later, asynchronously

Example:
[]
metaobject
SocialChorus:1.0:Groupobject
Example:
{}
Response
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group", "SocialChorus:1.0:Group" ], "id": 115, "name": "group_of_users", "displayName": "Group of users", "externalId": "1234qweasd567", "description": "Group of iOS users from partner domain", "members": [], "meta": { "resourceType": "Group", "created": "2022-05-13T13:32:00.598Z", "lastModified": "2022-05-13T13:32:00.598Z", "location": "https://partner.socialchorus.com/scim/v2/Groups/115", "jobId": 4567 }, "SocialChorus:1.0:Group": {} }