# UpdateGroup

## 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

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

### Query

**id (string)**

Id of the group.

Example:

```
PUT /api/ss/group/5eab99471e18050942c7607a HTTP/1.1
```

**name (string) (optional)**

Name of the group.

Example:

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

**group\_owner (string) (optional)**

Name of the owner for the group.

Example:

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

**primary\_contact\_name (string) (optional)**

Primary contact person name.

Example:

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

**primary\_contact\_number (string) (optional)**

Primary contact person number.

Example:

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

**primary\_contact\_email (string) (optional)**

Primary contact person email.

Example:

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

**is\_deleted (boolean) (optional)**

Whether group is deleted or not.

Example:

```
{
   "is_deleted": false
}
```

**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.action - must be either upsert or remove
* 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.action - must be either upsert or remove
* 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": [
            {
                "action": "upsert",
                "group_name": "AD-GROUP-2",
                "project_access_level": "view",
                "project_request_access_level": "edit"
            },
            {
                "action": "remove",
                "group_name": "AD-GROUP-1"
            }
        ],
        "member_admins": [
            {
                "action": "upsert",
                "user_id": "66d2308ba99324532079e111",
                "project_limit": "edit",
                "project_request_limit": "action",
                "add_user_method": "email",
                "allow_user_invite": true
            },
            {
                "action": "remove",
                "user_id": "668ba6b1be6510000f78f79e"
            }
        ]
    }
}
```

**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 update a group.

### Request

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

```
curl -X PUT 'https://demo.attackforge.com/api/ss/group/5eab99471e18050942c7607a' -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": [
      {
        "action": "upsert",
        "add_user_method": "email",
        "allow_user_invite": true,
        "project_limit": "view",
        "project_request_limit": "none",
        "user_id": "66d2308ba99324532079e111"
      },
      {
        "action": "remove",
        "user_id": "668ba6b1be6510000f78f79e"
      }
    ],
    "sso_1": [
      {
        "action": "upsert",
        "group_name": "AD-GROUP-2",
        "project_access_level": "view",
        "project_request_access_level": "edit"
      },
      {
        "action": "remove",
        "group_name": "AD-GROUP-1"
      }
    ],
    "sso_2": []
  },
  "auto_add_project_request": true,
  "enable_project_team_notifications": true
}'
```

### Response

Response contains a status.

```
{
  "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/updategroup.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.
