{"_id":"593960e40073e80027c8b0b8","project":"55843604fd8d910d007b9502","version":{"_id":"558444ceafccfd0d00fcb2bb","forked_from":"55843604fd8d910d007b9505","project":"55843604fd8d910d007b9502","__v":55,"createdAt":"2015-06-19T16:35:26.435Z","releaseDate":"2015-06-19T16:35:26.435Z","categories":["558444cfafccfd0d00fcb2bc","558444cfafccfd0d00fcb2bd","55ad4ce733616a0d00599d2e","55ad4cef6aadf20d0015b764","55ad4cf36aadf20d0015b765","55ad4cfb24cf160d0013584f","55ad4d0024cf160d00135850","55ad4d0a24cf160d00135851","55ad4d0d24cf160d00135852","55ad4d126aadf20d0015b766","55ad4d1624cf160d00135853","55ad4d1933616a0d00599d2f","55ad4d2233616a0d00599d30","55ad4d2e24cf160d00135854","55d35b6bf77e6d0d00b1b092","55d3649a0168850d0073f14a","55d366d40168850d0073f15a","55d37fcff77e6d0d00b1b13f","55d383e50168850d0073f1e1","55d3ac26c336ec0d007c2251","55d3c51cb2330119009c31db","55d3c59bfe37111900e536f3","55d3c5a7fe37111900e536f4","55d3c5b4fe37111900e536f5","55d3c5d4fe37111900e536f6","55d3c5d6b2330119009c31df","55d3c5d71f478b170077c164","55d3c687b2330119009c31e4","55d3c6a4fe37111900e536f9","55d3c6befe37111900e536fa","55d3c6e8d2c66f0d00497f93","55d49dcfd7c16b2d007de905","55d4ca8f5082980d0009c79b","55d4cab9c95a3d2f0069ad3d","55d4d279c95a3d2f0069ad60","55d4d9355082980d0009c7e1","55d4f6b5988e130d000b3eb1","55d64dc8e60a2f0d00b88ecb","5627ca43fcbbc621004ec07d","56c64a0d8f98b50d0012c37c","56f1b8b13eb62a34003ea041","56f1b9df4476fb2200795e8c","57f6907dca5e5d1700039ae9","591dd06ca266c423002ec4ca","59234825e465c11900922518","5936f82eaa591e0027638d57","59972f54fd7078001992c136","599c6da8f180820025f14909","59b054613c3e1b0019cf27d9","59b1ceca2d6231003ad73e5f","59b1cf1857911600382e0dc4","59b1cf2730f3d60010c30ef7","59b1cf385d4b89003035441a","59b1cf5857911600382e0dc6","59bc2c4e26ac9b0010a8b753","59bc2ce20b3eb30010657b70"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3"},"category":{"_id":"59234825e465c11900922518","__v":0,"version":"558444ceafccfd0d00fcb2bb","project":"55843604fd8d910d007b9502","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-22T20:20:53.281Z","from_sync":false,"order":1,"slug":"using-the-qualtrics-api","title":"Using the Qualtrics APIs"},"user":"5919f13aff66b00f00f1948c","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-08T14:36:20.517Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Groups allow sharing libraries of surveys, graphics, files, and messages between users. Administrators can use the user group APIs to create groups, add users to groups, and remove users from groups. For more information about user groups, see \"[User Groups](https://www.qualtrics.com/support/survey-platform/sp-administration/managing-users/user-groups/)\" on the support site. For information about using libraries, see \"[Library Overview](https://www.qualtrics.com/support/survey-platform/account-library/library-overview/)\".\n\nThe following topics are discussed in this document:\n\n- [Create Group](doc:managing-user-groups#create-group)\n- [Add User to Group](doc:managing-user-groups#add-user-to-group)\n- [Remove User from Group](doc:managing-user-groups#remove-user-from-group)\n- [List Groups](doc:managing-user-groups#list-groups)\n- [Get Group](doc:managing-user-groups#get-group)\n- [Update Group](doc:managing-user-groups#update-group)\n- [Delete Group](doc:managing-user-groups#delete-group) \n[block:api-header]\n{\n  \"title\": \"Create Group\"\n}\n[/block]\nWhen you create a new group you must specify the group's name and group type. You can name the new group and assign it to a division (see \"[User Divisions](https://www.qualtrics.com/support/survey-platform/sp-administration/managing-users/user-divisions/)\" for more information about divisions). Besides the group's name, you need to specify the group's type. Group types specify default permissions to give new groups and can be created in the Administration user interface. See \"[Group Types](https://www.qualtrics.com/support/survey-platform/for-administrators/managing-users/user-groups/#GroupTypes)\" for more information.\n\nThe following example shows how to create a new group:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Create Group \\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\" # 1\\ndataCenter = \\\"YOUR DATACENTER\\\"\\t# 2\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups\\\".format(dataCenter)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    \\\"Content-Type\\\": \\\"application/json\\\"\\n    }\\n\\ndata = { \\\"type\\\": \\\"GT_1234567890\\\",\\n\\t\\\"name\\\": \\\"SW Users\\\"\\n\\t }\\nresponse = requests.post(baseUrl, json=data, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"python\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Add User to Group\"\n}\n[/block]\nThe following example shows how to add a user to a group. You need both the group's ID and the user's ID. Use the [List Groups](doc:list-groups) API to obtain the group ID and the [List Users](doc:list-users) API to obtain the user's ID.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Add User to Group\\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\"\\ndataCenter = \\\"YOUR DATACENTER\\\"\\n\\ngroupId = \\\"GR_1234567\\\"\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups/{1}/members\\\".format(dataCenter, groupId)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    \\\"Content-Type\\\": \\\"application/json\\\"\\n    }\\n\\ndata = { \\\"userId\\\": \\\"UR_123456789\\\",\\n\\t }\\nresponse = requests.post(baseUrl, json=data, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"python\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Remove User from Group\"\n}\n[/block]\nThe following example shows how to remove a user from a specific group. You need the user ID and group ID of the user and group.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Remove User from Group\\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\"\\ndataCenter = \\\"YOUR DATACENTER\\\"\\n\\ngroupId = \\\"GR_1234567890\\\"\\nuserId = \\\"UR_1234567890\\\"\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups/{1}/members/{2}\\\".format(dataCenter, groupId, userId)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    }\\n\\nresponse = requests.delete(baseUrl, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"python\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"List Groups\"\n}\n[/block]\nThe following example shows how to obtain a list of the group IDs and names of your groups.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# List Groups\\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\"\\ndataCenter = 'YOUR DATACENTER'\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups\\\".format(dataCenter)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    }\\n\\nresponse = requests.get(baseUrl, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"python\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]\nThe following example shows the results from the List Groups API for a user who owns three groups:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"meta\\\": {\\n        \\\"httpStatus\\\": \\\"200 - OK\\\",\\n        \\\"requestId\\\": \\\"93e1f820-8e03-4ded-95af-146471a0e764\\\"\\n    },\\n    \\\"result\\\": {\\n        \\\"elements\\\": [\\n            {\\n                \\\"id\\\": \\\"GR_123\\\",\\n                \\\"name\\\": \\\"Group1\\\"\\n            },\\n            {\\n                \\\"id\\\": \\\"GR_456\\\",\\n                \\\"name\\\": \\\"Group2\\\"\\n            },\\n            {\\n                \\\"id\\\": \\\"GR_789\\\",\\n                \\\"name\\\": \\\"Group3\\\"\\n            }\\n        ],\\n        \\\"nextPage\\\": null\\n    }\\n}\\n\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nFor results that include more than 100 groups, the `nextPage` member contains a URL containing the next 100 groups.\n[block:api-header]\n{\n  \"title\": \"Get Group\"\n}\n[/block]\nThe Get Group API allows you to obtain several pieces of information about a group:\n\n- The group's name\n- The group's creation date (see [Dates and Times](doc:dates-and-times) for format information)\n- The group's creator (a user ID)\n- The division ID this group belongs to\n- The group's ID\n- The group's type (as a group type ID)\n\n## Obtaining the Group ID\n\nTo use this API, you need to obtain the ID of the group you wish to query. To obtain the group ID, you should use the List Groups API to obtain a list of groups, their names, and IDs.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Get Group\\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\"\\ndataCenter = \\\"YOUR DATACENTER\\\"\\n\\ngroupId = \\\"GR_12345678\\\"\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups/{1}\\\".format(dataCenter, groupId)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    }\\n\\nresponse = requests.get(baseUrl, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"json\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]\nThe following response gives an example of the object that is returned:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"meta\\\": {\\n        \\\"httpStatus\\\": \\\"200 - OK\\\",\\n        \\\"requestId\\\": \\\"7843c825-f284-4121-ba0d-5e16fafa0409\\\"\\n    },\\n    \\\"result\\\": {\\n        \\\"autoMembership\\\": \\\"division\\\",\\n        \\\"creationDate\\\": \\\"2017-05-10T09:37:32Z\\\",\\n        \\\"creatorId\\\": \\\"UR_12334567890\\\",\\n        \\\"divisionId\\\": \\\"DV_1234567\\\",\\n        \\\"id\\\": \\\"GR_12345678\\\",\\n        \\\"name\\\": \\\"SW Users\\\",\\n        \\\"type\\\": \\\"GT_1234567890\\\"\\n    }\\n}\\n\",\n      \"language\": \"json\",\n      \"name\": \"JSON\"\n    }\n  ]\n}\n[/block]\nThe response object contains the following:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Member\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`autoMembership`\",\n    \"0-1\": \"String\",\n    \"1-0\": \"`creationDate`\",\n    \"1-1\": \"String\",\n    \"2-0\": \"`creatorId`\",\n    \"2-1\": \"String\",\n    \"3-0\": \"`divisionId`\",\n    \"3-1\": \"String\",\n    \"4-0\": \"`id`\",\n    \"4-1\": \"String\",\n    \"5-0\": \"`name`\",\n    \"5-1\": \"String\",\n    \"6-0\": \"`type`\",\n    \"6-1\": \"String\",\n    \"1-2\": \"The group's creation date and time as an ISO 8601 date. See [Dates and Times](doc:dates-and-times) for more information.\",\n    \"2-2\": \"The user ID of the user who created this group.\",\n    \"3-2\": \"The division ID this group belongs to.\",\n    \"4-2\": \"The group's ID.\",\n    \"5-2\": \"The group's name.\",\n    \"6-2\": \"The group type ID of this group.\",\n    \"0-2\": \"Either \\\"brand\\\", \\\"division\\\", or \\\"null\\\". With \\\"brand\\\" or \\\"division\\\" all users in your organization or specified division will automatically be able to access this group's content. If \\\"null\\\", an administrator will need to manually add specific individuals to the group.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Update Group\"\n}\n[/block]\nYou can change three properties of an existing group:\n\n- Group type\n- Division\n- Name\n\nThe following sample gives an existing group, identified by its group ID, a new name, \"New Name\". \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Update Group\\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\"\\ndataCenter = \\\"YOUR DATACENTER\\\"\\n\\ngroupId = \\\"GR_123456789\\\"\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups/{1}\\\".format(dataCenter, groupId)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    \\\"Content-Type\\\": \\\"application/json\\\"\\n    }\\n\\ndata = { \\n\\t\\\"name\\\": \\\"New Name\\\",\\n\\t }\\nresponse = requests.put(baseUrl, json=data, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"python\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Delete Group\"\n}\n[/block]\nThe following example shows how to delete a group:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Delete Group\\n\\nimport requests\\n\\n# Setting user Parameters\\napiToken = \\\"YOUR API TOKEN\\\"\\ndataCenter = \\\"YOUR DATACENTER\\\"\\n\\ngroupId = \\\"GR_1234567890\\\"\\n\\nbaseUrl = \\\"https://{0}.qualtrics.com/API/v3/groups/{1}\\\".format(dataCenter, groupId)\\nheaders = {\\n    \\\"x-api-token\\\": apiToken,\\n    }\\n\\nresponse = requests.delete(baseUrl, headers=headers)\\nprint(response.text)\\n\",\n      \"language\": \"python\",\n      \"name\": \"Python 3\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"managing-user-groups","type":"basic","title":"Managing User Groups"}

Managing User Groups


Groups allow sharing libraries of surveys, graphics, files, and messages between users. Administrators can use the user group APIs to create groups, add users to groups, and remove users from groups. For more information about user groups, see "[User Groups](https://www.qualtrics.com/support/survey-platform/sp-administration/managing-users/user-groups/)" on the support site. For information about using libraries, see "[Library Overview](https://www.qualtrics.com/support/survey-platform/account-library/library-overview/)". The following topics are discussed in this document: - [Create Group](doc:managing-user-groups#create-group) - [Add User to Group](doc:managing-user-groups#add-user-to-group) - [Remove User from Group](doc:managing-user-groups#remove-user-from-group) - [List Groups](doc:managing-user-groups#list-groups) - [Get Group](doc:managing-user-groups#get-group) - [Update Group](doc:managing-user-groups#update-group) - [Delete Group](doc:managing-user-groups#delete-group) [block:api-header] { "title": "Create Group" } [/block] When you create a new group you must specify the group's name and group type. You can name the new group and assign it to a division (see "[User Divisions](https://www.qualtrics.com/support/survey-platform/sp-administration/managing-users/user-divisions/)" for more information about divisions). Besides the group's name, you need to specify the group's type. Group types specify default permissions to give new groups and can be created in the Administration user interface. See "[Group Types](https://www.qualtrics.com/support/survey-platform/for-administrators/managing-users/user-groups/#GroupTypes)" for more information. The following example shows how to create a new group: [block:code] { "codes": [ { "code": "# Create Group \n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\" # 1\ndataCenter = \"YOUR DATACENTER\"\t# 2\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups\".format(dataCenter)\nheaders = {\n \"x-api-token\": apiToken,\n \"Content-Type\": \"application/json\"\n }\n\ndata = { \"type\": \"GT_1234567890\",\n\t\"name\": \"SW Users\"\n\t }\nresponse = requests.post(baseUrl, json=data, headers=headers)\nprint(response.text)\n", "language": "python", "name": "Python 3" } ] } [/block] [block:api-header] { "title": "Add User to Group" } [/block] The following example shows how to add a user to a group. You need both the group's ID and the user's ID. Use the [List Groups](doc:list-groups) API to obtain the group ID and the [List Users](doc:list-users) API to obtain the user's ID. [block:code] { "codes": [ { "code": "# Add User to Group\n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\"\ndataCenter = \"YOUR DATACENTER\"\n\ngroupId = \"GR_1234567\"\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups/{1}/members\".format(dataCenter, groupId)\nheaders = {\n \"x-api-token\": apiToken,\n \"Content-Type\": \"application/json\"\n }\n\ndata = { \"userId\": \"UR_123456789\",\n\t }\nresponse = requests.post(baseUrl, json=data, headers=headers)\nprint(response.text)\n", "language": "python", "name": "Python 3" } ] } [/block] [block:api-header] { "title": "Remove User from Group" } [/block] The following example shows how to remove a user from a specific group. You need the user ID and group ID of the user and group. [block:code] { "codes": [ { "code": "# Remove User from Group\n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\"\ndataCenter = \"YOUR DATACENTER\"\n\ngroupId = \"GR_1234567890\"\nuserId = \"UR_1234567890\"\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups/{1}/members/{2}\".format(dataCenter, groupId, userId)\nheaders = {\n \"x-api-token\": apiToken,\n }\n\nresponse = requests.delete(baseUrl, headers=headers)\nprint(response.text)\n", "language": "python", "name": "Python 3" } ] } [/block] [block:api-header] { "title": "List Groups" } [/block] The following example shows how to obtain a list of the group IDs and names of your groups. [block:code] { "codes": [ { "code": "# List Groups\n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\"\ndataCenter = 'YOUR DATACENTER'\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups\".format(dataCenter)\nheaders = {\n \"x-api-token\": apiToken,\n }\n\nresponse = requests.get(baseUrl, headers=headers)\nprint(response.text)\n", "language": "python", "name": "Python 3" } ] } [/block] The following example shows the results from the List Groups API for a user who owns three groups: [block:code] { "codes": [ { "code": "{\n \"meta\": {\n \"httpStatus\": \"200 - OK\",\n \"requestId\": \"93e1f820-8e03-4ded-95af-146471a0e764\"\n },\n \"result\": {\n \"elements\": [\n {\n \"id\": \"GR_123\",\n \"name\": \"Group1\"\n },\n {\n \"id\": \"GR_456\",\n \"name\": \"Group2\"\n },\n {\n \"id\": \"GR_789\",\n \"name\": \"Group3\"\n }\n ],\n \"nextPage\": null\n }\n}\n", "language": "json", "name": "Response" } ] } [/block] For results that include more than 100 groups, the `nextPage` member contains a URL containing the next 100 groups. [block:api-header] { "title": "Get Group" } [/block] The Get Group API allows you to obtain several pieces of information about a group: - The group's name - The group's creation date (see [Dates and Times](doc:dates-and-times) for format information) - The group's creator (a user ID) - The division ID this group belongs to - The group's ID - The group's type (as a group type ID) ## Obtaining the Group ID To use this API, you need to obtain the ID of the group you wish to query. To obtain the group ID, you should use the List Groups API to obtain a list of groups, their names, and IDs. [block:code] { "codes": [ { "code": "# Get Group\n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\"\ndataCenter = \"YOUR DATACENTER\"\n\ngroupId = \"GR_12345678\"\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups/{1}\".format(dataCenter, groupId)\nheaders = {\n \"x-api-token\": apiToken,\n }\n\nresponse = requests.get(baseUrl, headers=headers)\nprint(response.text)\n", "language": "json", "name": "Python 3" } ] } [/block] The following response gives an example of the object that is returned: [block:code] { "codes": [ { "code": "{\n \"meta\": {\n \"httpStatus\": \"200 - OK\",\n \"requestId\": \"7843c825-f284-4121-ba0d-5e16fafa0409\"\n },\n \"result\": {\n \"autoMembership\": \"division\",\n \"creationDate\": \"2017-05-10T09:37:32Z\",\n \"creatorId\": \"UR_12334567890\",\n \"divisionId\": \"DV_1234567\",\n \"id\": \"GR_12345678\",\n \"name\": \"SW Users\",\n \"type\": \"GT_1234567890\"\n }\n}\n", "language": "json", "name": "JSON" } ] } [/block] The response object contains the following: [block:parameters] { "data": { "h-0": "Member", "h-1": "Type", "h-2": "Description", "0-0": "`autoMembership`", "0-1": "String", "1-0": "`creationDate`", "1-1": "String", "2-0": "`creatorId`", "2-1": "String", "3-0": "`divisionId`", "3-1": "String", "4-0": "`id`", "4-1": "String", "5-0": "`name`", "5-1": "String", "6-0": "`type`", "6-1": "String", "1-2": "The group's creation date and time as an ISO 8601 date. See [Dates and Times](doc:dates-and-times) for more information.", "2-2": "The user ID of the user who created this group.", "3-2": "The division ID this group belongs to.", "4-2": "The group's ID.", "5-2": "The group's name.", "6-2": "The group type ID of this group.", "0-2": "Either \"brand\", \"division\", or \"null\". With \"brand\" or \"division\" all users in your organization or specified division will automatically be able to access this group's content. If \"null\", an administrator will need to manually add specific individuals to the group." }, "cols": 3, "rows": 7 } [/block] [block:api-header] { "title": "Update Group" } [/block] You can change three properties of an existing group: - Group type - Division - Name The following sample gives an existing group, identified by its group ID, a new name, "New Name". [block:code] { "codes": [ { "code": "# Update Group\n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\"\ndataCenter = \"YOUR DATACENTER\"\n\ngroupId = \"GR_123456789\"\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups/{1}\".format(dataCenter, groupId)\nheaders = {\n \"x-api-token\": apiToken,\n \"Content-Type\": \"application/json\"\n }\n\ndata = { \n\t\"name\": \"New Name\",\n\t }\nresponse = requests.put(baseUrl, json=data, headers=headers)\nprint(response.text)\n", "language": "python", "name": "Python 3" } ] } [/block] [block:api-header] { "title": "Delete Group" } [/block] The following example shows how to delete a group: [block:code] { "codes": [ { "code": "# Delete Group\n\nimport requests\n\n# Setting user Parameters\napiToken = \"YOUR API TOKEN\"\ndataCenter = \"YOUR DATACENTER\"\n\ngroupId = \"GR_1234567890\"\n\nbaseUrl = \"https://{0}.qualtrics.com/API/v3/groups/{1}\".format(dataCenter, groupId)\nheaders = {\n \"x-api-token\": apiToken,\n }\n\nresponse = requests.delete(baseUrl, headers=headers)\nprint(response.text)\n", "language": "python", "name": "Python 3" } ] } [/block]