Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

The PUT /users/{userId}/groups endpoint replaces the user’s groups for the user matching the user ID provided.

In this page


Most URLs in the example code use the following values:

Headers

Header parameters in Requests (User Admin API) apply to this endpoint.

Authorization scopes supported:

ScopeAccess granted
users:writeEntire endpoint

Parameters

userID

Type

Required

Example

StringTrue2f9207ca-8922-4245-bfc5-d8f42939e29a

The user ID of the required user.

Requests

Example Request

curl -L -X PUT "https://***.api.newvoicemedia.com/useradmin/8e22b1fe-d2ea-403d-8c03-50eb21188e79/groups" \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.newvoicemedia.v4+json" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
--data-raw "<JSON BODY>"

Request body parameters

The endpoint requires an agentGroups object in JSON format as in the request body.

This endpoint replaces the agents groups.

  • To add a new group, you must request the current group list and append the new group Id. 
  • To remove a new group, you must request the current group list and remove the target group Id from the list.

Example request body

{
  "agentGroups": [
    {
      "groupId": "bfe83c27-1daa-4f4f-9f80-e278bf79e327"
    }
  ]
}

where:

  • agentGroupsThe groups that the agent is in.
    • groupIdThe unique ID of the group.

Responses

Successful response

Successful requests return a 200 Success code.

  • No labels