---
title: Update Group of Users
slug: single-connect-api-3-0-3/update-group-of-users
description: Learn how to update a group of users with a simple code example utilizing the curl command. This document includes headers for JSON data and provides the necessary code to send a POST request, effortlessly updating user information.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "_WdqT771bK29GyRmSPKWC",
  "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": "o8jbGV2cYd4Q8ZbR5f-VH",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID \\\n     --header 'accept: application/json'"
        },
        {
          "id": "wbmz_ryoFyQijsvOGnMqg",
          "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": "qDNLNG_lgY6xGvsN0SjKj",
          "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": "RP6YJG7IBmtIV0z9AuW86",
          "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": "o8jbGV2cYd4Q8ZbR5f-VH"
    },
    "results": {
      "languages": [
        {
          "id": "lYe4CMF1M4QIPXInNhj0h",
          "language": "200",
          "code": "true"
        }
      ],
      "selectedLanguageId": "lYe4CMF1M4QIPXInNhj0h"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}