---
title: Update Group of Users
slug: single-connect-api-3-2-0/update-group-of-users
description: Learn how to update a group of users in a REST API using cURL with this comprehensive code example. Discover how to structure the POST request by including the URL, request headers, and request body in JSON format. Perfect for developers looking to enhanc
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "uDIQueXTShP44KWv1MaR3",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "[\"8728e3c1-fbd9-413f-ac20-4476bbc53848\"]",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Update Group of Users",
        "jsonExample": "true"
      }
    ],
    "contentType": "application/json",
    "description": "This method allows adding registered users into an existing user group. User ids that are tried to be added into the group should be included in the request body. The user group which will be updated should be specified with its id in the request URL.",
    "examples": {
      "languages": [
        {
          "id": "kesHobaeQtuBBJz8vcw3o",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID \\\n     --header 'accept: application/json'"
        },
        {
          "id": "JSaK--aRbK5PTlURiYYqu",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "EkvYqJU6amWUU3JmeEgSM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "NMHsDNKvp6VouKsBF4GF3",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "kesHobaeQtuBBJz8vcw3o"
    },
    "results": {
      "languages": [
        {
          "id": "TqP789JUti5333vp43bVm",
          "language": "200",
          "code": "true"
        }
      ],
      "selectedLanguageId": "TqP789JUti5333vp43bVm"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}