# Scenarios

**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs).

## List scenarios

> Retrieves a collection of all scenarios for a team or an organization with a given ID. Returned scenarios are sorted by proprietary setting in descending order.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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":{"get":{"tags":["Scenarios"],"summary":"List scenarios","description":"Retrieves a collection of all scenarios for a team or an organization with a given ID. Returned scenarios are sorted by proprietary setting in descending order.","parameters":[{"description":"The unique ID of the team whose scenarios will be retrieved. If this parameter is set, the `organizationId` parameter must be skipped. For each request either `teamId` or `organizationId` must be defined.","name":"teamId","in":"query","schema":{"type":"integer"},"required":true},{"description":"The unique ID of the organization whose scenarios will be retrieved. If this parameter is set, the `teamId` parameter must be skipped. For each request either `teamId` or `organizationId` must be defined.","name":"organizationId","in":"query","schema":{"type":"integer"}},{"name":"id[]","in":"query","schema":{"type":"array","items":{"type":"integer"}},"description":"The array of IDs of scenarios to retrieve."},{"description":"The unique ID of the folder containing scenarios you want to retrieve.","name":"folderId","in":"query","schema":{"type":"integer"}},{"name":"isActive","in":"query","schema":{"type":"boolean"},"description":"Set this parameter to `true` to get only active scenarios in the response.\n"},{"name":"islinked","in":"query","schema":{"type":"boolean"},"deprecated":true,"description":"This parameter is deprecated. Use the `isActive` parameter to filter for active scenarios instead.\n"},{"name":"concept","in":"query","schema":{"type":"boolean"},"description":"If set to `true`, the response contains only scenario concepts."},{"name":"type","in":"query","schema":{"type":"string","enum":["scenario","tool"]},"description":"Limits the type of scenarios to be retrieved."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","hookId","deviceId","deviceScope","description","folderId","isinvalid","islinked","isActive","islocked","isPaused","usedPackages","lastEdit","scheduling","iswaiting","dlqCount","createdByUser","updatedByUser","nextExec","scenarioVersion","moduleSequenceId"]}},"description":"Specifies columns that are returned in the response. Use the `cols[]` parameter for every column that you want to return in the response. For example `GET /endpoint?cols[]=key1&cols[]=key2` to get both `key1` and `key2` columns in the response.\n\n[Check the \"Filtering\" section for a full example.](/pagination-sorting-filtering/filtering.md)\n"},{"name":"pg[offset]","in":"query","schema":{"type":"integer"},"description":"The number of entities you want to skip before getting entities you want."},{"name":"pg[limit]","in":"query","schema":{"type":"integer"},"description":"The maximum number of entities you want to get in the response."},{"schema":{"type":"string","enum":["proprietal","id","name","teamId","folderId","isActive","islinked","isinvalid","islocked","lastEdit","createdByUserName","updatedByUserName","created"]},"description":"The value that will be used to sort returned entities by.","name":"pg[sortBy]","in":"query"},{"name":"pg[sortDir]","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sorting order. It accepts the ascending and descending direction specifiers."}],"responses":{"200":{"description":"Retrieved scenarios","content":{"application/json":{"schema":{"type":"object","properties":{"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"hookId":{"type":"integer"},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"scope":{"type":"string"}}}},"deviceId":{"type":"integer","deprecated":true},"deviceScope":{"type":"string","deprecated":true},"description":{"type":"string"},"folderId":{"type":"integer"},"isinvalid":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true},"isActive":{"type":"boolean"},"islocked":{"type":"boolean"},"isPaused":{"type":"boolean"},"usedPackages":{"type":"array","items":{"type":"string"}},"lastEdit":{"type":"string","format":"date-time"},"scheduling":{"type":"object","properties":{"type":{"type":"string"},"interval":{"type":"integer"}}},"iswaiting":{"type":"boolean"},"dlqCount":{"type":"integer"},"createdByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"updatedByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"nextExec":{"type":"string","format":"date-time"},"created":{"type":"string","format":"date-time"},"scenarioVersion":{"type":"integer"},"moduleSequenceId":{"type":"integer"},"type":{"type":"string","enum":["scenario","tool"]}}}},"pg":{"type":"object","properties":{"last":{"type":"string","description":"Shown only when using the `last` based pagination."},"showLast":{"type":"boolean","description":"Shown only when using the `last` based pagination."},"sortBy":{"type":"string"},"sortDir":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer","description":"Shown only when using the `offset` based pagination."}}}}}}}}}}}}}
```

## Create scenario

> Creates a new scenario with data passed in the request body. In the response, it returns all details of the created scenario including its blueprint.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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":{"post":{"tags":["Scenarios"],"summary":"Create scenario","description":"Creates a new scenario with data passed in the request body. In the response, it returns all details of the created scenario including its blueprint.","parameters":[{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","hookId","deviceId","deviceScope","description","folderId","isinvalid","islinked","isActive","islocked","isPaused","usedPackages","lastEdit","scheduling","iswaiting","dlqCount","createdByUser","updatedByUser","nextExec","scenarioVersion","moduleSequenceId"]}},"description":"Specifies columns that are returned in the response. Use the `cols[]` parameter for every column that you want to return in the response. For example `GET /endpoint?cols[]=key1&cols[]=key2` to get both `key1` and `key2` columns in the response.\n\n[Check the \"Filtering\" section for a full example.](/pagination-sorting-filtering/filtering.md)\n"},{"description":"If set to `true` this parameter confirms the scenario creation when the scenario contains the app that is used in the organization for the first time and needs installation. If the parameter is missing or it is set to `false` an error code is returned and the scenario is not created.","name":"confirmed","in":"query","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"blueprint":{"type":"string","description":"The scenario blueprint. To save resources, the blueprint is sent as a string, not as an object."},"teamId":{"type":"integer","description":"The unique ID of the team in which the scenario will be created."},"scheduling":{"type":"string","description":"The scenario scheduling details. To save resources, the scheduling details are sent as a string, not as an object."},"folderId":{"type":"integer","description":"The unique ID of the folder in which you want to store created scenario."},"basedon":{"type":"integer","description":"Defines if the scenario is created based on a template. The value is the template ID."}},"required":["blueprint","teamId","scheduling"]}}}},"responses":{"200":{"description":"Scenario created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"hookId":{"type":"integer"},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"scope":{"type":"string"}}}},"deviceId":{"type":"integer","deprecated":true},"deviceScope":{"type":"string","deprecated":true},"description":{"type":"string"},"folderId":{"type":"integer"},"isinvalid":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true},"isActive":{"type":"boolean"},"islocked":{"type":"boolean"},"isPaused":{"type":"boolean"},"usedPackages":{"type":"array","items":{"type":"string"}},"lastEdit":{"type":"string","format":"date-time"},"scheduling":{"type":"object","properties":{"type":{"type":"string"},"interval":{"type":"integer"}}},"iswaiting":{"type":"boolean"},"dlqCount":{"type":"integer"},"createdByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"updatedByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"nextExec":{"type":"string","format":"date-time"},"created":{"type":"string","format":"date-time"},"scenarioVersion":{"type":"integer"},"moduleSequenceId":{"type":"integer"},"type":{"type":"string","enum":["scenario","tool"]}}}}}}}}}}}}}
```

## Get scenario details

> Retrieves all available properties of a scenario with a given ID. The returned details do not include a scenario blueprint. If you want to get a scenario blueprint, refer to the \[Get scenario blueprint]\(./blueprints/get--scenarios--scenarioid--blueprint.md) endpoint.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}":{"get":{"tags":["Scenarios"],"summary":"Get scenario details","description":"Retrieves all available properties of a scenario with a given ID. The returned details do not include a scenario blueprint. If you want to get a scenario blueprint, refer to the [Get scenario blueprint](./blueprints/get--scenarios--scenarioid--blueprint.md) endpoint.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","hookId","deviceId","deviceScope","description","folderId","isinvalid","islinked","isActive","islocked","isPaused","usedPackages","lastEdit","scheduling","iswaiting","dlqCount","createdByUser","updatedByUser","nextExec","scenarioVersion","moduleSequenceId"]}},"description":"Specifies columns that are returned in the response. Use the `cols[]` parameter for every column that you want to return in the response. For example `GET /endpoint?cols[]=key1&cols[]=key2` to get both `key1` and `key2` columns in the response.\n\n[Check the \"Filtering\" section for a full example.](/pagination-sorting-filtering/filtering.md)\n"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"hookId":{"type":"integer"},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"scope":{"type":"string"}}}},"deviceId":{"type":"integer","deprecated":true},"deviceScope":{"type":"string","deprecated":true},"description":{"type":"string"},"folderId":{"type":"integer"},"isinvalid":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true},"isActive":{"type":"boolean"},"islocked":{"type":"boolean"},"isPaused":{"type":"boolean"},"usedPackages":{"type":"array","items":{"type":"string"}},"lastEdit":{"type":"string","format":"date-time"},"scheduling":{"type":"object","properties":{"type":{"type":"string"},"interval":{"type":"integer"}}},"iswaiting":{"type":"boolean"},"dlqCount":{"type":"integer"},"createdByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"updatedByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"nextExec":{"type":"string","format":"date-time"},"created":{"type":"string","format":"date-time"},"scenarioVersion":{"type":"integer"},"moduleSequenceId":{"type":"integer"},"type":{"type":"string","enum":["scenario","tool"]}}}}}}}}}}}}}
```

## Delete scenario

> Deletes a scenario 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","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}":{"delete":{"tags":["Scenarios"],"summary":"Delete scenario","description":"Deletes a scenario with a given ID and returns the ID in the response.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Scenario deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"integer"}}}}}}}}}}}
```

## Update scenario

> Updates a scenario 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 scenario including properties that were not changed.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}":{"patch":{"tags":["Scenarios"],"summary":"Update scenario","description":"Updates a scenario 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 scenario including properties that were not changed.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","hookId","deviceId","deviceScope","description","folderId","isinvalid","islinked","isActive","islocked","isPaused","usedPackages","lastEdit","scheduling","iswaiting","dlqCount","createdByUser","updatedByUser","nextExec","scenarioVersion","moduleSequenceId"]}},"description":"Specifies columns that are returned in the response. Use the `cols[]` parameter for every column that you want to return in the response. For example `GET /endpoint?cols[]=key1&cols[]=key2` to get both `key1` and `key2` columns in the response.\n\n[Check the \"Filtering\" section for a full example.](/pagination-sorting-filtering/filtering.md)\n"},{"description":"If set to `true` this parameter confirms the scenario update when the scenario contains the app that is used in the organization for the first time and needs installation. If the parameter is missing or it is set to `false` an error code is returned and the scenario is not updated.","name":"confirmed","in":"query","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"blueprint":{"type":"string","description":"The scenario blueprint. To save resources, the blueprint is sent as a string, not as an object."},"scheduling":{"type":"string","description":"The scenario scheduling details. To save resources, the scheduling details are sent as a string, not as an object."},"folderId":{"type":"integer","description":"The unique ID of the folder in which you want to store created scenario."},"name":{"type":"string","description":"A new name of the scenario. The name does not need to be unique."}}}}}},"responses":{"200":{"description":"Scenario was updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"hookId":{"type":"integer"},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"scope":{"type":"string"}}}},"deviceId":{"type":"integer","deprecated":true},"deviceScope":{"type":"string","deprecated":true},"description":{"type":"string"},"folderId":{"type":"integer"},"isinvalid":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true},"isActive":{"type":"boolean"},"islocked":{"type":"boolean"},"isPaused":{"type":"boolean"},"usedPackages":{"type":"array","items":{"type":"string"}},"lastEdit":{"type":"string","format":"date-time"},"scheduling":{"type":"object","properties":{"type":{"type":"string"},"interval":{"type":"integer"}}},"iswaiting":{"type":"boolean"},"dlqCount":{"type":"integer"},"createdByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"updatedByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"nextExec":{"type":"string","format":"date-time"},"created":{"type":"string","format":"date-time"},"scenarioVersion":{"type":"integer"},"moduleSequenceId":{"type":"integer"},"type":{"type":"string","enum":["scenario","tool"]}}}}}}}}}}}}}
```

## Get trigger details

> Retrieves properties of a trigger included in a scenario with a given ID. A trigger is a module that is able to return bundles that were newly added or updated (depending on the settings) since the last run of the scenario. An example of a trigger is a hook.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/triggers":{"get":{"tags":["Scenarios"],"summary":"Get trigger details","description":"Retrieves properties of a trigger included in a scenario with a given ID. A trigger is a module that is able to return bundles that were newly added or updated (depending on the settings) since the last run of the scenario. An example of a trigger is a hook.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"udid":{"type":"string"},"scope":{"type":"string"},"queueCount":{"type":"integer"},"queueLimit":{"type":"integer"},"typeName":{"type":"string"},"type":{"type":"string"},"url":{"type":"string","format":"uri"},"flags":{"type":"object"}}}}}}}}}}}
```

## Clone scenario

> Clones the specified scenario. The response contains all information about the scenario clone.\
> \
> You have to know which app integrations the scenario contains. You can get a list of apps used in the scenario with the API call \`GET /scenarios/{scenarioId}\` in the \`usedPackages\` array.\
> \
> If you are cloning the scenario to a different team and the scenario contains an app module, webhook or data store, you have to either:\
> \
> \- map the entity ID to a different entity with the correct properties. For example, you can map an app module connection to a different connection of the same app with the same scopes, or\
> &#x20;\- use the \`notAnalyze\` query parameter to turn off the scenario clone blueprint analysis.\
> \
> When you turn off the scenario blueprint analysis you can map the entity ID to the \`null\` value, which omits the entity settings.\
> \
> The scenario blueprint analysis makes sure that the scenario clone will work without further changes. If you turn off the scenario blueprint analysis, check the configuration of all entities in the scenario clone.\
> \
> If you are cloning the scenario to a different team and the scenario contains a custom app or a custom function, which is not available for the users in the team, use the \`confirmed\` query parameter to confirm cloning of the scenario. Otherwise, you get an error listing the custom function that you have to create in the team.\
> \
> Refer to the request body parameters description and examples for more information.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/clone":{"post":{"tags":["Scenarios"],"summary":"Clone scenario","description":"Clones the specified scenario. The response contains all information about the scenario clone.\n\nYou have to know which app integrations the scenario contains. You can get a list of apps used in the scenario with the API call `GET /scenarios/{scenarioId}` in the `usedPackages` array.\n\nIf you are cloning the scenario to a different team and the scenario contains an app module, webhook or data store, you have to either:\n\n- map the entity ID to a different entity with the correct properties. For example, you can map an app module connection to a different connection of the same app with the same scopes, or\n - use the `notAnalyze` query parameter to turn off the scenario clone blueprint analysis.\n\nWhen you turn off the scenario blueprint analysis you can map the entity ID to the `null` value, which omits the entity settings.\n\nThe scenario blueprint analysis makes sure that the scenario clone will work without further changes. If you turn off the scenario blueprint analysis, check the configuration of all entities in the scenario clone.\n\nIf you are cloning the scenario to a different team and the scenario contains a custom app or a custom function, which is not available for the users in the team, use the `confirmed` query parameter to confirm cloning of the scenario. Otherwise, you get an error listing the custom function that you have to create in the team.\n\nRefer to the request body parameters description and examples for more information.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"description":"The ID of the organization.","required":true,"name":"organizationId","in":"query","schema":{"type":"integer"}},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","hookId","deviceId","deviceScope","description","folderId","isinvalid","islinked","isActive","islocked","isPaused","usedPackages","lastEdit","scheduling","iswaiting","dlqCount","createdByUser","updatedByUser","nextExec","scenarioVersion","moduleSequenceId"]}},"description":"Specifies columns that are returned in the response. Use the `cols[]` parameter for every column that you want to return in the response. For example `GET /endpoint?cols[]=key1&cols[]=key2` to get both `key1` and `key2` columns in the response.\n\n[Check the \"Filtering\" section for a full example.](/pagination-sorting-filtering/filtering.md)\n"},{"name":"confirmed","in":"query","schema":{"type":"boolean"},"description":"If the scenario contains a custom app or a custom function, that is not available in the team, you have to set the `confirmed` parameter to `true` to clone the scenario. Otherwise you get an error and the scenario is not cloned."},{"name":"notAnalyze","in":"query","schema":{"type":"boolean"},"description":"If you are cloning a scenario to a different team, you have to map the scenario entities (connections, data stores, webhooks, ...) from the original to the clone. If you cannot map all of the scenario entities, set the `notAnalyze` parameter to `true` to suppress the scenario blueprint analysis."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name for the scenario clone. The maximum length of the name is 120 characters."},"teamId":{"type":"integer","description":"The ID of the team to which you want to clone the scenario."},"account":{"description":"Specify pairs of original and clone connection IDs to map connections to the cloned scenario.","type":"object","additionalProperties":{}},"key":{"description":"Specify pairs of original and clone key IDs to map keys to the cloned scenario.","type":"object","additionalProperties":{}},"hook":{"description":"Specify pairs of original and clone hook IDs to map webhooks to the cloned scenario.","type":"object","additionalProperties":{}},"device":{"description":"Specify pairs of original and clone device IDs to map devices to the cloned scenario.","type":"object","additionalProperties":{}},"udt":{"description":"Specify pairs of original and clone data structure IDs to map data structures to the cloned scenario.","type":"object","additionalProperties":{}},"datastore":{"description":"Specify pairs of original and clone data store IDs to map data stores to the cloned scenario.","type":"object","additionalProperties":{}},"states":{"type":"boolean","description":"Set to `true` to clone also states of the scenario modules, for example last scenario trigger execution. Setting to `false` resets the state information of the scenario modules in the scenario clone."}},"required":["name","teamId","states"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"hookId":{"type":"integer"},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"scope":{"type":"string"}}}},"deviceId":{"type":"integer","deprecated":true},"deviceScope":{"type":"string","deprecated":true},"description":{"type":"string"},"folderId":{"type":"integer"},"isinvalid":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true},"isActive":{"type":"boolean"},"islocked":{"type":"boolean"},"isPaused":{"type":"boolean"},"usedPackages":{"type":"array","items":{"type":"string"}},"lastEdit":{"type":"string","format":"date-time"},"scheduling":{"type":"object","properties":{"type":{"type":"string"},"interval":{"type":"integer"}}},"iswaiting":{"type":"boolean"},"dlqCount":{"type":"integer"},"createdByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"updatedByUser":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"nextExec":{"type":"string","format":"date-time"},"created":{"type":"string","format":"date-time"},"scenarioVersion":{"type":"integer"},"moduleSequenceId":{"type":"integer"},"type":{"type":"string","enum":["scenario","tool"]}}}}}}}}}}}}}
```

## Check module data

> Verifies whether the module data is set or not. This endpoint doesn't retrieve the module data.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/data/{moduleId}":{"get":{"tags":["Scenarios"],"summary":"Check module data","description":"Verifies whether the module data is set or not. This endpoint doesn't retrieve the module data.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"description":"The unique ID of the scenario module. It is available in the scenario blueprint that can be retrieved from the [Get scenario blueprint](/api-reference/scenarios/blueprint/get--scenarios--scenarioid--blueprint.md) endpoint.","name":"moduleId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean"}}}}}}}}}}}
```

## Activate scenario

> Activates the specified scenario. Also runs the scenario if the scenario is scheduled to run at regular intervals. Read more about \[scenario scheduling]\(<https://www.make.com/en/help/scenarios/scheduling-a-scenario).\\>
> \
> The API call response contains the scenario ID and the scenario \`isActive\` property set to \`true\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/start":{"post":{"tags":["Scenarios"],"summary":"Activate scenario","description":"Activates the specified scenario. Also runs the scenario if the scenario is scheduled to run at regular intervals. Read more about [scenario scheduling](https://www.make.com/en/help/scenarios/scheduling-a-scenario).\n\nThe API call response contains the scenario ID and the scenario `isActive` property set to `true`.\n","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"object","properties":{"id":{"type":"integer"},"isActive":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true}}}}}}}}}}}}}
```

## Deactivate scenario

> Deactivates and stops the specified scenario if the scenario is running. The API call response contains the scenario ID and the scenario \`isActive\` property set to \`false\`.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/stop":{"post":{"tags":["Scenarios"],"summary":"Deactivate scenario","description":"Deactivates and stops the specified scenario if the scenario is running. The API call response contains the scenario ID and the scenario `isActive` property set to `false`.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"object","properties":{"id":{"type":"integer"},"isActive":{"type":"boolean"},"islinked":{"type":"boolean","deprecated":true}}}}}}}}}}}}}
```

## Run a scenario

> Runs the specified scenario. The scenario has to be active. If your scenario has required scenario inputs you have to provide the scenario inputs in the request body. If the scenario provides scenario outputs, these are returned in the response.\
> \
> \*\*Note:\*\* \[Organization request limits]\(<https://developers.make.com/api-documentation/getting-started/rate-limiting>) do \*\*not\*\* apply for this endpoint.<br>

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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","scenarios:write","scenarios:run"]}],"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/{scenarioId}/run":{"post":{"tags":["Scenarios"],"summary":"Run a scenario","description":"Runs the specified scenario. The scenario has to be active. If your scenario has required scenario inputs you have to provide the scenario inputs in the request body. If the scenario provides scenario outputs, these are returned in the response.\n\n**Note:** [Organization request limits](https://developers.make.com/api-documentation/getting-started/rate-limiting) do **not** apply for this endpoint.\n","parameters":[{"name":"scenarioId","in":"path","schema":{"type":"integer"},"description":"The ID of the scenario. Get the ID of the scenario with the API call `GET /scenarios`.","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"If your scenario has inputs specify the input parameters and values in the `data` object."},"responsive":{"type":"boolean","description":"If set to `true` the Make API waits until the scenario finishes. The response contains the scenario `status` and `executionId`. If the scenario execution takes longer than 40 seconds, the API call returns the time out error, but the scenario is still executed.\n\nIf set to `false` the API call returns immediately without waiting. The response contains only the `executionId`.","default":false},"callbackUrl":{"type":"string","description":"Url that will be called once the scenario execution finishes. If the run is responsive and finishes within 40 seconds, the url is not called since the result is present in the response. \n\nThe `callbackUrl` will be called using a `POST` request with the following body:\n\n{\n \"executionId\": `executionId`,\n \"statusUrl\": \"url to retrieve execution status and outputs via GET\"\n }\n "}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"executionId":{"type":"string","description":"ID of the scenario execution."},"status":{"type":"string","description":"Status of the scenario execution:\n\n- `1`: success\n - `2`: warning\n - `3`: error."}}}}}}}}}}}
```

## Replay a scenario execution

> Replays the specified scenario execution. The scenario has to be active.&#x20;

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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:run"]}],"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/{scenarioId}/replay":{"post":{"tags":["Scenarios"],"summary":"Replay a scenario execution","description":"Replays the specified scenario execution. The scenario has to be active. ","parameters":[{"name":"scenarioId","in":"path","schema":{"type":"integer"},"description":"The ID of the scenario. Get the ID of the scenario with the API call `GET /scenarios`.","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"executionIds":{"type":"array","description":"An array of executionIds. Currently only the first one will be replayed."}}}}}},"responses":{"202":{"description":"202 Accepted - Successful response"},"404":{"description":"404 Not Found"}}}}}}
```

## Get scenario interface

> Retrieves the scenario inputs and outputs specification for the specified scenario. Check out the \[scenario inputs and outputs documentation]\(<https://help.make.com/scenario-inputs-and-outputs>) in the Make help center.The scenario inputs and outputs feature is available with all plans. \[Read more about Make pricing.]\(<https://www.make.com/en/pricing>)

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/interface":{"get":{"tags":["Scenarios"],"summary":"Get scenario interface","description":"Retrieves the scenario inputs and outputs specification for the specified scenario. Check out the [scenario inputs and outputs documentation](https://help.make.com/scenario-inputs-and-outputs) in the Make help center.The scenario inputs and outputs feature is available with all plans. [Read more about Make pricing.](https://www.make.com/en/pricing)","parameters":[{"in":"path","name":"scenarioId","schema":{"type":"integer"},"required":true,"description":"The ID of the scenario. Get the list of scenarios with the API call `GET /scenarios`."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"interface":{"type":"object","additionalProperties":{}}}}}}}}}}}}
```

## Update scenario interface

> Updates specification of the scenario inputs. Check out the \[scenario inputs documentation]\(<https://www.make.com/en/help/scenarios/scenario-inputs>) in the Make help center.\
> \
> If you want to enable the scenario inputs you have to set the scenario scheduling to "On demand" first, otherwise you get error 422 (IM016). You can use the API call:\
> \
> \`PATCH /scenarios/{scenarioId}?confirmed=true\`\
> \
> with the request body:\
> \
> \`{"scheduling": "{\\"type\\":\\"on-demand\\"}"}\`\
> \
> You can disable inputs for the specified scenario by sending a payload with an empty \`input\` array.\
> \
> The response contains the updated scenario inputs specification.\
> \
> The scenario inputs feature requires your account to have the pricing plan \*\*Pro\*\* or higher. \[Read more about Make pricing.]\(<https://www.make.com/en/pricing>)

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/interface":{"patch":{"tags":["Scenarios"],"summary":"Update scenario interface","description":"Updates specification of the scenario inputs. Check out the [scenario inputs documentation](https://www.make.com/en/help/scenarios/scenario-inputs) in the Make help center.\n\nIf you want to enable the scenario inputs you have to set the scenario scheduling to \"On demand\" first, otherwise you get error 422 (IM016). You can use the API call:\n\n`PATCH /scenarios/{scenarioId}?confirmed=true`\n\nwith the request body:\n\n`{\"scheduling\": \"{\\\"type\\\":\\\"on-demand\\\"}\"}`\n\nYou can disable inputs for the specified scenario by sending a payload with an empty `input` array.\n\nThe response contains the updated scenario inputs specification.\n\nThe scenario inputs feature requires your account to have the pricing plan **Pro** or higher. [Read more about Make pricing.](https://www.make.com/en/pricing)","parameters":[{"name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the scenario. Get the list of scenarios with the API call `GET /scenarios`."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interface":{"type":"object","additionalProperties":{},"description":"Contains the `input` array with specification of the scenario input parameters."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"interface":{"type":"object","additionalProperties":{}}}}}}}}}}}}
```

## Get scenario usage

> Retrieves a list of daily centicredits, operations, and data transfer usage for a specified scenario over the past 30 days.\
> \
> By default, the endpoint uses the timezone of the user making the API call to define the start and end of each day in the 30-day timeframe.\
> \
> To use the organization's timezone instead, set the \`organizationTimezone\` parameter to \`true\`. This ensures that the daily aggregates align with the organization's operational hours. This is especially useful for scenarios where aggregated data needs to align with the organization's operational hours.\
> \
> For instance, a remote data analyst in India working for a Czech company can set \`organizationTimezone=true\` to ensure the usage data reflects the company's timezone, providing more relevant and accurate insights for organizational reporting and analysis.\
> \
> For more information on timezones in Make, please refer to our \[Help Center article]\(<https://www.make.com/en/help/general/manage-time-zones>).<br>

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/usage":{"get":{"tags":["Scenarios"],"summary":"Get scenario usage","description":"Retrieves a list of daily centicredits, operations, and data transfer usage for a specified scenario over the past 30 days.\n\nBy default, the endpoint uses the timezone of the user making the API call to define the start and end of each day in the 30-day timeframe.\n\nTo use the organization's timezone instead, set the `organizationTimezone` parameter to `true`. This ensures that the daily aggregates align with the organization's operational hours. This is especially useful for scenarios where aggregated data needs to align with the organization's operational hours.\n\nFor instance, a remote data analyst in India working for a Czech company can set `organizationTimezone=true` to ensure the usage data reflects the company's timezone, providing more relevant and accurate insights for organizational reporting and analysis.\n\nFor more information on timezones in Make, please refer to our [Help Center article](https://www.make.com/en/help/general/manage-time-zones).\n","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"organizationTimezone","in":"query","schema":{"type":"boolean"},"required":false,"description":"When set to `true`, the endpoint will calculate and return usage data based on the organization's timezone instead of the user's local timezone."}],"responses":{"200":{"description":"Successfully retrieved usage data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"operations":{"type":"integer"},"dataTransfer":{"type":"integer"},"centicredits":{"type":"bigint"}}}}}}}}}}}}}}
```

## List buildtime variables

> Retrieves buildtime variables of a scenario with the given ID. Buildtime variables could be team or user defined, team defined ones are prefixed with a \`TAC\_\` and user defined variables are prefixed with a \`PAC\_\`. \`TAC\_\`s can be used within the scenario as per its input spec by the entire team, whereas \`PAC\_\`s can only be used within the scenario by the user who added them.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/build-variables":{"get":{"tags":["Scenarios"],"summary":"List buildtime variables","description":"Retrieves buildtime variables of a scenario with the given ID. Buildtime variables could be team or user defined, team defined ones are prefixed with a `TAC_` and user defined variables are prefixed with a `PAC_`. `TAC_`s can be used within the scenario as per its input spec by the entire team, whereas `PAC_`s can only be used within the scenario by the user who added them.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"object"}}}}}}}}}}}
```

## Add new buildtime variables to scenario metadata

> Adds new buildtime team or user defined variable/s. Buildtime variables should be prefixed either with a \`TAC\_\` (for team defined variables) or with a \`PAC\_\` (for personal user defined variables), followed by the connection value. If a variable already exists, an error will be thrown. If a variable's name is not within scenario input specification, an error will be thrown. If the adding of new variables was successful the reponse would be \`OK\`.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/build-variables":{"post":{"tags":["Scenarios"],"summary":"Add new buildtime variables to scenario metadata","description":"Adds new buildtime team or user defined variable/s. Buildtime variables should be prefixed either with a `TAC_` (for team defined variables) or with a `PAC_` (for personal user defined variables), followed by the connection value. If a variable already exists, an error will be thrown. If a variable's name is not within scenario input specification, an error will be thrown. If the adding of new variables was successful the reponse would be `OK`.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name for the buildtime variable. The maximum length of the name is 128 characters."},"value":{"type":"string","description":"The value for the buildtime variable. It should start either with TAC_ or PAC_ followed by numeric chars only."}}}}}}}}},"responses":{"200":{"description":"Buildtime variables added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"integer"}}}}}}}}}}}
```

## Update buildtime variables in scenario metadata

> Updates team or user defined buildtime variable/s. The endpoint updates and overwrites exsiting records with the newly provided values, meaning any existing buildtime variable which is not provided through the payload will be overwritten. Buildtime variables should be prefixed either with a \`TAC\_\` (for team defined variables) or with a \`PAC\_\` (for personal user defined variables), followed by the connection value. If a variable doesn't exist, it will be added provided that its name is within the scenario input specification. If the updating of variables was successful the reponse would be \`OK\`.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/build-variables":{"put":{"tags":["Scenarios"],"summary":"Update buildtime variables in scenario metadata","description":"Updates team or user defined buildtime variable/s. The endpoint updates and overwrites exsiting records with the newly provided values, meaning any existing buildtime variable which is not provided through the payload will be overwritten. Buildtime variables should be prefixed either with a `TAC_` (for team defined variables) or with a `PAC_` (for personal user defined variables), followed by the connection value. If a variable doesn't exist, it will be added provided that its name is within the scenario input specification. If the updating of variables was successful the reponse would be `OK`.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name for the buildtime variable. The maximum length of the name is 128 characters."},"value":{"type":"string","description":"The value for the buildtime variable. It should start either with TAC_ or PAC_ followed by numeric chars only."}}}}}}}}},"responses":{"200":{"description":"Buildtime variables updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"integer"}}}}}}}}}}}
```

## Delete buildtime variable

> Deletes a buildtime variable with a given value for a scenario with a given ID and returns \`OK\` in the response.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/{scenarioId}/build-variables":{"delete":{"tags":["Scenarios"],"summary":"Delete buildtime variable","description":"Deletes a buildtime variable with a given value for a scenario with a given ID and returns `OK` in the response.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"value","in":"query","schema":{"type":"string"},"description":"The value of the buildtime variable"}],"responses":{"200":{"description":"Buildtime variable deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"integer"}}}}}}}}}}}
```

## List AI agent scenarios

> Retrieves scenarios that contain at least one AI agent module for the specified team. Results are sorted by last edit date in descending order.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios","description":"**Scenarios** allow you to create and run automation tasks. A scenario consists of a series of modules that indicate how data should be transferred and transformed between apps or services. The following endpoints allow you to create, manage and execute scenarios and also inspect and manage [scenario inputs](https://www.make.com/en/help/scenarios/scenario-inputs)."}],"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/ai-agents":{"get":{"tags":["Scenarios"],"summary":"List AI agent scenarios","description":"Retrieves scenarios that contain at least one AI agent module for the specified team. Results are sorted by last edit date in descending order.","parameters":[{"description":"The unique ID of the team whose scenarios folders will be retrieved.","name":"teamId","in":"query","schema":{"type":"integer"},"required":true},{"name":"pg[offset]","in":"query","schema":{"type":"integer"},"description":"The number of entities you want to skip before getting entities you want."},{"name":"pg[limit]","in":"query","schema":{"type":"integer"},"description":"The maximum number of entities you want to get in the response."}],"responses":{"200":{"description":"Retrieved AI agent scenarios","content":{"application/json":{"schema":{"type":"object","properties":{"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The unique ID of the scenario."},"name":{"type":"string","description":"The name of the scenario."},"description":{"type":"string","nullable":true,"description":"The description of the scenario."},"isActive":{"type":"boolean","description":"Whether the scenario is currently active."},"teamId":{"type":"integer","description":"The unique ID of the team."},"created":{"type":"string","format":"date-time","description":"The date and time when the scenario was created."},"lastEdit":{"type":"string","format":"date-time","description":"The date and time when the scenario was last edited."},"scheduling":{"type":"object","description":"The scheduling configuration of the scenario."},"usedPackages":{"type":"array","items":{"type":"string"},"description":"The list of app packages used in the scenario."},"agentCount":{"type":"integer","description":"The number of AI agent modules in the scenario."},"createdByUser":{"type":"object","nullable":true,"description":"The user who created the scenario.","properties":{"id":{"type":"integer","description":"The unique ID of the user."},"name":{"type":"string","nullable":true,"description":"The name of the user."},"email":{"type":"string","description":"The email address of the user."}}}}}},"pg":{"type":"object","properties":{"limit":{"type":"integer","description":"The maximum number of results returned."},"offset":{"type":"integer","description":"The number of results skipped."}}}}}}}}}}}}}
```


---

# 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://developers.make.com/api-documentation/api-reference/scenarios.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.
