# Getting "The request body was not well-formed." Error

**URL:** <https://devforum.okta.com/t/getting-the-request-body-was-not-well-formed-error/310>\
**Category:** API\
**Created:** [August 3, 2017, 3:56pm UTC](https://devforum.okta.com/t/getting-the-request-body-was-not-well-formed-error/310 "2017-08-03T15:56:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddimri](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@ddimri](https://devforum.okta.com/u/ddimri)\
**Post date:** [August 3, 2017, 3:56pm UTC](https://devforum.okta.com/t/getting-the-request-body-was-not-well-formed-error/310/1 "2017-08-03T15:56:41Z")

</div>

I am trying to create multiple groups using curl. i amusing json input file to read the group names.

```
  curl -k -v -X POST -H "Accept: application/json" -H "Content-Type: **strong text** application/json" -H "Authorization: SSWS xxxxxxxx" -d "@group.json"
  "https://mytesturl.com/api/v1/groups"

```

my group.json file is as below but i’ m getting “errorSummary”:“The request body was not well-formed.”

```
{
  "profile": [{
      "name": "testgroup1",
      "description": "testgroup1"
    },
    {
      "name": "testgroup2",
      "description": "testgroup2"
    },
    {
      "name": "testgroup3",
      "description": "testgroup3"
    },
    {
      "name": "testgroup4",
      "description": "testgroup4"
    }]
}

```

The same command works fine if i just have one key value

```
{
  "profile": {
    "name": "testgroup1",
    "description": "testgroup1"
  }
}

```

What should i do to have curl to process multiple entries in my json file to create multiple groups? Many Thanks!

---

<div class="post-metadata">

**Author:** ![mcguinness](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mcguinness/32/56_2.png) [@mcguinness](https://devforum.okta.com/u/mcguinness)\
**Post date:** [August 8, 2017, 8:07pm UTC](https://devforum.okta.com/t/getting-the-request-body-was-not-well-formed-error/310/2 "2017-08-08T20:07:30Z")

</div>

We do not support creating multiple groups with a single request. You need to issue a request for each group.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2024, 7:14pm UTC](https://devforum.okta.com/t/getting-the-request-body-was-not-well-formed-error/310/3 "2024-01-12T19:14:33Z")

</div>

Closed on January 12, 2024, 7:14pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
