# Scenarios folders

Scenarios can be grouped into folders for better organization. The following endpoints allow you to create and manage scenarios folders.

## List scenario folders

> Retrieves a collection of all scenarios folders for a team with a given ID. Returned folders are sorted by name in ascending order.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios folders","description":"Scenarios can be grouped into folders for better organization. The following endpoints allow you to create and manage scenarios folders."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios-folders":{"get":{"tags":["Scenarios folders"],"summary":"List scenario folders","description":"Retrieves a collection of all scenarios folders for a team with a given ID. Returned folders are sorted by name in ascending order.","parameters":[{"name":"teamId","in":"query","schema":{"type":"integer"},"description":"Unique ID of the Team.","required":true},{"name":"cols[]","in":"query","description":"Specifies the group of values to return. For example, you may want to receive in response only the names and IDs of folders.","schema":{"type":"array","items":{"type":"string","enum":["id","name","scenariosTotal"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenariosFolders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"scenariosTotal":{"type":"integer"}}}}}}}}}}}}}}
```

## Create scenario folder

> Creates a new scenario folder with data passed in the request body. As the response, it returns all details of the created scenario folder.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios folders","description":"Scenarios can be grouped into folders for better organization. The following endpoints allow you to create and manage scenarios folders."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios-folders":{"post":{"tags":["Scenarios folders"],"summary":"Create scenario folder","description":"Creates a new scenario folder with data passed in the request body. As the response, it returns all details of the created scenario folder.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the scenario folder. The name must be at most 100 characters long and does not need to be unique."},"teamId":{"type":"integer","description":"The unique ID of the team in which the scenario folder will be created."}},"required":["name","teamId"]}}}},"responses":{"200":{"description":"Created a Folder","content":{"application/json":{"schema":{"type":"object","properties":{"scenarioFolder":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"scenariosTotal":{"type":"integer"}}}}}}}}}}}}}
```

## Delete scenario folder

> Deletes a scenario folder with a given ID and returns the ID in the response.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios folders","description":"Scenarios can be grouped into folders for better organization. The following endpoints allow you to create and manage scenarios folders."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios-folders/{folderId}":{"delete":{"tags":["Scenarios folders"],"summary":"Delete scenario folder","description":"Deletes a scenario folder with a given ID and returns the ID in the response.","parameters":[{"name":"folderId","in":"path","schema":{"type":"integer"},"description":"The unique ID of the scenario folder. It can be retrieved from the [List scenarios folders](/api-reference/scenarios-folders/get--scenarios-folders.md) endpoint.","required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenarioFolder":{"type":"integer"}}}}}}}}}}}
```

## Update scenario folder

> Updates a scenario folder with a given ID by passing new values in the request body. Any property that is not provided will be left unchanged. In the response, it returns all details of the updated folder including properties that were not changed.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios folders","description":"Scenarios can be grouped into folders for better organization. The following endpoints allow you to create and manage scenarios folders."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios-folders/{folderId}":{"patch":{"tags":["Scenarios folders"],"summary":"Update scenario folder","description":"Updates a scenario folder with a given ID by passing new values in the request body. Any property that is not provided will be left unchanged. In the response, it returns all details of the updated folder including properties that were not changed.","parameters":[{"name":"folderId","in":"path","schema":{"type":"integer"},"description":"The unique ID of the scenario folder. It can be retrieved from the [List scenarios folders](/api-reference/scenarios-folders/get--scenarios-folders.md) endpoint.","required":true},{"name":"cols[]","in":"query","description":"Specifies the group of values to return. For example, you may want to receive in response only the names and IDs of folders.","schema":{"type":"array","items":{"type":"string","enum":["id","name","scenariosTotal"]}}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name for the updated scenario folder. The name must be at most 100 characters long and does not need to be unique."}}}}}},"responses":{"200":{"description":"Folder updated","content":{"application/json":{"schema":{"type":"object","properties":{"scenarioFolder":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"scenariosTotal":{"type":"integer"}}}}}}}}}}}}}
```
