# CreateTestsuite

## 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/testsuite HTTP/1.1
Host: localhost:3000
X-SSAPI-KEY: API
KeyContent-Type: application/json
Connection: close
```

### Query

**name (*****string*****)**

Name of the test suite.

Example:

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

**description (*****string*****)**

Brief description of the test suite.

Example:

```
{   
    "description": "..."
}
```

**code (*****string*****) (*****optional*****)**

Code for the test suite.

Example:

```
{   
    "code": "..."
}
```

**sort\_order (*****number*****) (*****optional*****)**

Sort Order to apply to the test suite.

Example:

```
{   
    "sort_order": 1
}
```

**is\_visible\_on\_project\_requests (*****boolean*****) (*****optional*****)**

Whether this test suite should be displayed and made available to be selected when a user is requesting a project.

Example:

```
{   
    "is_visible_on_project_requests": false
}
```

**tags (*****array of strings*****)**

Tags for the test suite.

Example:

```
{   
    "tags": ["...", "..."]
}
```

## Example

The following example is a cURL request to create a new test suite.

### Request

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

```
curl -X POST 'https://localhost:3000/api/ss/testsuite' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "name": "5-day Web App Pentest",
  "description": "Methodology for a 5-day web app pentest.",
  "code": "WEBAPP-5DAY",
  "sort_order": 1,
  "is_visible_on_project_requests": false,
  "tags": ["Web App", "5-days"]
}'
```

### Response

Response contains a status.

```
{
   "status": "Testsuite Created",
   "testsuite": {
      "id": "...",
      "created": "...",
      "name": "...",
      "description": "...",
      "code": "...",
      "sort_order": 1,
      "is_visible_on_project_requests": false,
      "tags": [
        "..."
      ]
    }
}
```


---

# 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/createtestsuite.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.
