---
title: "Create Group"
description: "Create Group"
keywords: "Create Group"
url: "https://myrapidi.com/wiki/create_group"
locale: "en"
published: "2017-08-28T11:37:07Z"
modified: "2023-04-04T10:22:49Z"
---

Below you see an example on how to create a group. Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.

## JSON:

```
curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X POST
  -d "{\"code\":\"GR002\",\"description\":\"new group\"}"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/groups
```

The out-put for this example would be:

```
{
 "code": "GR002",
 "description": "new group",
 "comments": []
}
```

## JSONAPI:

```
curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X POST
  -d "{\"data\":{\"type\":\"groups\",\"attributes\": {\"code\":\"GRP000\",\"description\":\"new group\"} }}"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/groups
```

The out-put for this example would be:

```
{
  "data": {
    "id":"21",
    "type": "groups",
    "attributes":{
      "code": "GRP000",
      "description": "new group"
    },
    "relationships": {
      "comments": {
        "data": []
      }
    }
  }
}
```
