---
title: Create Vault Groups (Bulk Create)
slug: kron-pam-api-collection-381-patch3/create-vault-groups-bulk-create
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "ogUKSQ5ciS0TO7Nn0sEzD",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/createSapmGroups",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>The <strong>Create Vault Groups (Bulk Create)</strong> method allows you to send multiple parameters for each group you want to create. If you intend to create a subgroup of another group, you should specify the <code>parentSapmGroupId</code> parameter. If this parameter is not provided, the group will not have a parent group.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "[\n\t{\n\t\"name\":\"Group2\",\n\t\"description\":\"Desc2 of Group2\",\n\t\"parentSapmGroupId\":13682\n\t},\n\t{\n\t\"name\":\"Groupx\",\n\t\"description\":\"Descx\"\n\t},\n\t{\n\t\"name\":\"Groupx\",\n\t\"description\":\"Descx\"\n\t}\n]\n",
          "value": "[\n\t{\n\t\"name\":\"Group2\",\n\t\"description\":\"Desc2 of Group2\",\n\t\"parentSapmGroupId\":13682\n\t},\n\t{\n\t\"name\":\"Groupx\",\n\t\"description\":\"Descx\"\n\t},\n\t{\n\t\"name\":\"Groupx\",\n\t\"description\":\"Descx\"\n\t}\n]\n",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Create Vault Groups (Bulk Create)</p>",
        "jsonExample": "[\n    {\n        \"modelData\": {\n            \"name\": \"Group2\",\n            \"description\": \"Desc2 of Group2\",\n            \"parentSapmGroupId\": 982668\n        },\n        \"message\": \"SUCCESS\"\n    },\n    {\n        \"modelData\": {\n            \"name\": \"Groupx\",\n            \"description\": \"Descx\",\n            \"parentSapmGroupId\": null\n        },\n        \"message\": \"SUCCESS\"\n    },\n    {\n        \"modelData\": {\n            \"name\": \"Groupx\",\n            \"description\": \"Descx\",\n            \"parentSapmGroupId\": null\n        },\n        \"message\": \"A Sapm group named Groupx already exists\"\n    }\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "plP4sMOSzhRtftR0WajF2",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/createSapmGroups \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"[\\n\\t{\\n\\t\\\"name\\\":\\\"Group2\\\",\\n\\t\\\"description\\\":\\\"Desc2 of Group2\\\",\\n\\t\\\"parentSapmGroupId\\\":13682\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t}\\n]\\n\"'"
        },
        {
          "id": "_aT5tqv0ZXPDYIkoLSST_",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"[\\n\\t{\\n\\t\\\"name\\\":\\\"Group2\\\",\\n\\t\\\"description\\\":\\\"Desc2 of Group2\\\",\\n\\t\\\"parentSapmGroupId\\\":13682\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t}\\n]\\n\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/createSapmGroups\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "9eZh2lt7oxZv6-HVL2RQ3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/createSapmGroups\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"[\\n\\t{\\n\\t\\\"name\\\":\\\"Group2\\\",\\n\\t\\\"description\\\":\\\"Desc2 of Group2\\\",\\n\\t\\\"parentSapmGroupId\\\":13682\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t}\\n]\\n\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "NscCp2_xXZIXnBxs7XHFi",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/createSapmGroups\"\n\npayload = json.dumps(\"[\\n\\t{\\n\\t\\\"name\\\":\\\"Group2\\\",\\n\\t\\\"description\\\":\\\"Desc2 of Group2\\\",\\n\\t\\\"parentSapmGroupId\\\":13682\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t},\\n\\t{\\n\\t\\\"name\\\":\\\"Groupx\\\",\\n\\t\\\"description\\\":\\\"Descx\\\"\\n\\t}\\n]\\n\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "plP4sMOSzhRtftR0WajF2"
    },
    "results": {
      "languages": [
        {
          "id": "-KOUhRzx6EchPOEKxiwyM",
          "language": "200",
          "code": "[\n    {\n        \"modelData\": {\n            \"name\": \"Group2\",\n            \"description\": \"Desc2 of Group2\",\n            \"parentSapmGroupId\": 982668\n        },\n        \"message\": \"SUCCESS\"\n    },\n    {\n        \"modelData\": {\n            \"name\": \"Groupx\",\n            \"description\": \"Descx\",\n            \"parentSapmGroupId\": null\n        },\n        \"message\": \"SUCCESS\"\n    },\n    {\n        \"modelData\": {\n            \"name\": \"Groupx\",\n            \"description\": \"Descx\",\n            \"parentSapmGroupId\": null\n        },\n        \"message\": \"A Sapm group named Groupx already exists\"\n    }\n]"
        }
      ],
      "selectedLanguageId": "-KOUhRzx6EchPOEKxiwyM"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}