# CreateGroup

## Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

### Headers

```
POST /api/ss/group HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close
```

### Query

**name&#x20;*****(string)***

Name of the group.

Example:

```
{
   "name": "..."
}
```

**group\_owner&#x20;*****(string)***

Name of the owner for the group.

Example:

```
{
   "group_owner": "..."
}
```

**primary\_contact\_name&#x20;*****(string)***

Primary contact person name.

Example:

```
{
   "primary_contact_name": "..."
}
```

**primary\_contact\_number&#x20;*****(string)***

Primary contact person number.

Example:

```
{
   "primary_contact_number": "..."
}
```

**primary\_contact\_email&#x20;*****(string)***

Primary contact person email.

Example:

```
{
   "primary_contact_email": "..."
}
```

**custom\_fields (*****array of objects*****) (*****optional*****)**

Custom fields. Must include a key and value. Key must be unique and letters, number and underscores only.

For more information visit <https://support.attackforge.com/attackforge-enterprise/getting-started/custom-fields-and-forms#using-custom-fields-with-apis>

Example:

```
{   
    "custom_fields": [
        {
            "key": "...",
            "value": "..."
        }
    ]
}
```

**access&#x20;*****(object) (optional)***

Access details.

* sso\_1.project\_access\_level - must be either none, view, upload or edit
* sso\_1.project\_request\_access\_level - must be either none, view, upload or edit
* member\_admins.user\_id - specify either user\_id or group\_id but not both
* member\_admins.group\_id - specify either group\_id or user\_id but not both
* member\_admins.project\_limit - must be either none, view, upload or edit
* member\_admins.project\_request\_limit - must be either none, view, edit or action
* member\_admins.add\_user\_method - must be either list or email

Example:

```
{
    "access": {
        "sso_1": [
            {
                "group_name": "AD-GROUP-1",
                "project_access_level": "edit",
                "project_request_access_level": "action"
            }
        ],
        "member_admins": [
            {
                "user_id": "668ba6b1be6510000f78f79e",
                "project_limit": "view",
                "project_request_limit": "none",
                "add_user_method": "email",
                "allow_user_invite": true
            }
        ]
    }
}
```

**auto\_add\_project\_request&#x20;*****(boolean)***

Project requests created by group members will be automatically added to the group. Access to the project request can be configured for each group member in the members section.&#x20;

Example:

```
{
   "auto_add_project_request": true
}
```

**enable\_project\_team\_notification&#x20;*****(boolean)***

Group members will receive team notifications configured on a Project.

Example:

```
{
   "enable_project_team_notification": true
}
```

## Example

The following example is a cURL request to create a new group.

### Request

Include API Token instead of stars in 'X-SSAPI-KEY: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*' parameter.

```
curl -X POST 'https://demo.attackforge.com/api/ss/group' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "name": "ACME Corp. Technology Team",
  "group_owner": "John Citizen",
  "primary_contact_name": "Paul Citizen",
  "primary_contact_number": "(555)555-5555",
  "primary_contact_email": "john.citizen@attackforge.com",
  "custom_fields": [
    {
      "key": "client_code",
      "value": "CLIENT001"
    }
  ],
  "access": {
    "member_admins": [
      {
        "add_user_method": "email",
        "allow_user_invite": true,
        "project_limit": "view",
        "project_request_limit": "none",
        "user_id": "668ba6b1be6510000f78f79e"
      }
    ],
    "sso_1": [
      {
        "group_name": "AD-GROUP-1",
        "project_access_level": "edit",
        "project_request_access_level": "action"
      }
    ],
    "sso_2": []
  },
  "auto_add_project_request": true,
  "enable_project_team_notifications": true
}'
```

### Response

Response contains a status and group.

```
{
  "group": {
    "access": {
      "member_admins": [
        {
          "add_user_method": "email",
          "allow_user_invite": true,
          "project_limit": "view",
          "project_request_limit": "none",
          "user_id": "668ba6b1be6510000f78f79e"
        }
      ],
      "sso_1": [
        {
          "group_name": "AD-GROUP-1",
          "project_access_level": "edit",
          "project_request_access_level": "action"
        }
      ],
      "sso_2": []
    },
    "created": "2025-10-15T04:11:03.080Z",
    "group_owner": "John Citizen",
    "id": "68ef1ed744b24886d9a1255a",
    "last_modified": "2025-10-15T04:11:03.080Z",
    "name": "ACME Corp. Technology Team",
    "primary_contact_email": "john.citizen@attackforge.com",
    "primary_contact_name": "Paul Citizen",
    "primary_contact_number": "(555)555-5555",
    "auto_add_project_request": true,
    "enable_project_team_notifications": true,
    "custom_fields": [
      {
        "key": "client_code",
        "value": "CLIENT001"
      }
    ]
  },
  "status": "ok"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.attackforge.com/attackforge-enterprise/modules/self-service-restful-api/creategroup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
