# Templates

The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates.

## List templates

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

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates":{"get":{"tags":["Templates"],"summary":"List templates","description":"Retrieves a collection of all templates for a team with a given ID. Returned templates are sorted by ID in ascending order.","parameters":[{"name":"teamId","in":"query","schema":{"type":"integer"},"description":"The unique ID of the team whose templates will be retrieved."},{"name":"public","in":"query","schema":{"type":"boolean"},"description":"Indicates if the template is public which means that it was published and approved, and can be accessed by anyone."},{"name":"usedApps[]","in":"query","schema":{"type":"array","items":{"type":"string"}},"description":"The array with the text IDs of the apps used in the templates. This parameter allows you to get only the templates containing specific apps."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","description","usedApps","public","published","approved","approvedId","requestedApproval","publishedId","publicUrl","approvedName","publishedName"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the names and IDs of the templates."},{"name":"pg[sortBy]","in":"query","schema":{"type":"string"},"description":"The value that will be used to sort returned entities by."},{"name":"pg[offset]","in":"query","schema":{"type":"integer"},"description":"The value of entities you want to skip before getting entities you need."},{"name":"pg[sortDir]","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sorting order. It accepts the ascending and descending direction specifiers."},{"name":"pg[limit]","in":"query","schema":{"type":"integer"},"description":"Sets the maximum number of results per page in the API call response. For example, `pg[limit]=100`. The default number varies with different API endpoints."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"teamName":{"type":"string"},"organizationId":{"type":"string"},"description":{"type":"string"},"usedApps":{"type":"array","items":{"type":"string"}},"public":{"type":"boolean"},"published":{"type":"string","format":"date-time"},"approved":{"type":"string","format":"date-time"},"approvedId":{"type":"integer"},"requestedApproval":{"type":"boolean"},"publishedId":{"type":"integer"},"publicUrl":{"type":"string"},"approvedName":{"type":"string"},"publishedName":{"type":"string"}}}},"pg":{"type":"object","properties":{"last":{"type":"string"},"showLast":{"type":"boolean"},"sortBy":{"type":"string"},"sortDir":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}}}}}}}}}
```

## Create template

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

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates":{"post":{"tags":["Templates"],"summary":"Create template","description":"Creates a new template with data passed in the request body. In the response, it returns all details of the created template.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"integer","description":"The unique numeric ID of the team in which the template will be created."},"language":{"type":"string","description":"The language of the template determining in which language template details such as module names will be displayed. This property also impacts the visibility of the created template and cannot be changed later."},"blueprint":{"type":"object","properties":{"flow":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"ca":{"type":"string"},"qs":{"type":"array","items":{}},"url":{"type":"string","format":"uri"},"gzip":{"type":"boolean"},"method":{"type":"string"},"headers":{"type":"array","items":{}},"timeout":{"type":"string"},"authPass":{"type":"string"},"authUser":{"type":"string"},"bodyType":{"type":"string"},"shareCookies":{"type":"boolean"},"parseResponse":{"type":"boolean"},"followRedirect":{"type":"boolean"},"useQuerystring":{"type":"boolean"},"rejectUnauthorized":{"type":"boolean"}}},"module":{"type":"string","format":"uri"},"onerror":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"count":{"type":"string","format":"utc-millisec"},"retry":{"type":"boolean"},"interval":{"type":"string","format":"utc-millisec"}}},"module":{"type":"string","format":"uri"},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}},"restore":{"type":"object","properties":{"retry":{"type":"object","properties":{"mode":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"parameters":{"type":"object"}}}},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object"}},"restore":{"type":"object","properties":{"qs":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"method":{"type":"object","properties":{"mode":{"type":"string"},"label":{"type":"string"}}},"headers":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"bodyType":{"type":"object","properties":{"label":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}}}},"parameters":{"type":"object","properties":{"handleErrors":{"type":"boolean"}}}}}},"name":{"type":"string"},"metadata":{"type":"object","properties":{"version":{"type":"integer"},"scenario":{"type":"object","properties":{"maxErrors":{"type":"integer"},"autoCommit":{"type":"boolean"},"roundtrips":{"type":"integer"}}}}}},"description":"The full blueprint of the scenario or template. It contains information about the general setup and all included apps and modules, and their settings."},"scheduling":{"description":"The scheduling details of the template.","type":"object","properties":{"type":{"type":"string","enum":["immediately","indefinitely","once","daily","weekly","monthly","yearly"]},"interval":{"type":"integer","minimum":0},"date":{"type":"string","format":"date-time"},"between":{"type":"array","items":{"type":"string","format":"date-time"}},"time":{"type":"string","pattern":"^[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?(\\\\.[0-9]+)?$"},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":31}},"months":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"restrict":{"type":"array","items":{"type":"object","properties":{"time":{"type":"array","items":{"type":"string","nullable":true,"pattern":"^[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?(\\\\.[0-9]+)?$"}},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":31}},"months":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}}}}},"maximum_runs_per_minute":{"type":"integer","nullable":true,"minimum":1,"maximum":10000}}},"controller":{"description":"The controller of the template. This property refers to wizards that can be added to each module in the template from the Make interface. The wizards contain short instructions for other users explaining how to use the template step by step.","type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":1},"description":{"type":"string","maxLength":1500,"minLength":0},"idSequence":{"type":"integer"},"modules":{"type":"object"}}}}}}}},"parameters":[{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","description","usedApps","public","published","approved","approvedId","requestedApproval","publishedId","publicUrl","approvedName","publishedName"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only names and IDs of the newly created template."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"teamName":{"type":"string"},"organizationId":{"type":"string"},"description":{"type":"string"},"usedApps":{"type":"array","items":{"type":"string"}},"public":{"type":"boolean"},"published":{"type":"string","format":"date-time"},"approved":{"type":"string","format":"date-time"},"approvedId":{"type":"integer"},"requestedApproval":{"type":"boolean"},"publishedId":{"type":"integer"},"publicUrl":{"type":"string"},"approvedName":{"type":"string"},"publishedName":{"type":"string"}}}}}}}}}}}}}
```

## Get template details

> Retrieves details of a template with a given ID.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates/{templateId}":{"get":{"tags":["Templates"],"summary":"Get template details","description":"Retrieves details of a template with a given ID.","parameters":[{"name":"templateId","in":"path","schema":{"type":"integer"},"required":true,"description":"The unique ID of the private template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","description","usedApps","public","published","approved","approvedId","requestedApproval","publishedId","publicUrl","approvedName","publishedName"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the ID and name of the template."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"teamName":{"type":"string"},"organizationId":{"type":"string"},"description":{"type":"string"},"usedApps":{"type":"array","items":{"type":"string"}},"public":{"type":"boolean"},"published":{"type":"string","format":"date-time"},"approved":{"type":"string","format":"date-time"},"approvedId":{"type":"integer"},"requestedApproval":{"type":"boolean"},"publishedId":{"type":"integer"},"publicUrl":{"type":"string"},"approvedName":{"type":"string"},"publishedName":{"type":"string"}}}}}}}}}}}}}
```

## Delete template

> Deletes a template 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":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates/{templateId}":{"delete":{"tags":["Templates"],"summary":"Delete template","description":"Deletes a template with a given ID and returns the ID in the response.","parameters":[{"name":"templateId","in":"path","schema":{"type":"integer"},"required":true,"description":"The unique ID of the private template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint."},{"name":"confirmed","in":"query","schema":{"type":"boolean"},"description":"Confirms the deletion of the private or published template. If the parameter is missing or it is set to `false` an error code is returned and the resource is not deleted. The public (approved) templates can only be deleted by administrators."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"integer"}}}}}}}}}}}
```

## Update template

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

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates/{templateId}":{"patch":{"tags":["Templates"],"summary":"Update template","description":"Updates a template 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 template including properties that were not changed.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the template. The name does not need to be unique."},"blueprint":{"type":"object","properties":{"flow":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"ca":{"type":"string"},"qs":{"type":"array","items":{}},"url":{"type":"string","format":"uri"},"gzip":{"type":"boolean"},"method":{"type":"string"},"headers":{"type":"array","items":{}},"timeout":{"type":"string"},"authPass":{"type":"string"},"authUser":{"type":"string"},"bodyType":{"type":"string"},"shareCookies":{"type":"boolean"},"parseResponse":{"type":"boolean"},"followRedirect":{"type":"boolean"},"useQuerystring":{"type":"boolean"},"rejectUnauthorized":{"type":"boolean"}}},"module":{"type":"string","format":"uri"},"onerror":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"count":{"type":"string","format":"utc-millisec"},"retry":{"type":"boolean"},"interval":{"type":"string","format":"utc-millisec"}}},"module":{"type":"string","format":"uri"},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}},"restore":{"type":"object","properties":{"retry":{"type":"object","properties":{"mode":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"parameters":{"type":"object"}}}},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object"}},"restore":{"type":"object","properties":{"qs":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"method":{"type":"object","properties":{"mode":{"type":"string"},"label":{"type":"string"}}},"headers":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"bodyType":{"type":"object","properties":{"label":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}}}},"parameters":{"type":"object","properties":{"handleErrors":{"type":"boolean"}}}}}},"name":{"type":"string"},"metadata":{"type":"object","properties":{"version":{"type":"integer"},"scenario":{"type":"object","properties":{"maxErrors":{"type":"integer"},"autoCommit":{"type":"boolean"},"roundtrips":{"type":"integer"}}}}}},"description":"The full blueprint of the template. It contains information about the general setup and all included apps and modules, and their settings."},"scheduling":{"description":"The scheduling details of the template.","type":"object","properties":{"type":{"type":"string","enum":["immediately","indefinitely","once","daily","weekly","monthly","yearly"]},"interval":{"type":"integer","minimum":0},"date":{"type":"string","format":"date-time"},"between":{"type":"array","items":{"type":"string","format":"date-time"}},"time":{"type":"string","pattern":"^[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?(\\\\.[0-9]+)?$"},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":31}},"months":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"restrict":{"type":"array","items":{"type":"object","properties":{"time":{"type":"array","items":{"type":"string","nullable":true,"pattern":"^[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?(\\\\.[0-9]+)?$"}},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":31}},"months":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}}}}},"maximum_runs_per_minute":{"type":"integer","nullable":true,"minimum":1,"maximum":10000}}},"controller":{"description":"The controller of the template. This property refers to wizards that can be added to each module in the template from the Make interface. The wizards contain short instructions for other users explaining how to use the template step by step.","type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":1},"description":{"type":"string","maxLength":1500,"minLength":0},"idSequence":{"type":"integer"},"modules":{"type":"object"}}}}}}}},"parameters":[{"name":"templateId","in":"path","schema":{"type":"integer"},"required":true,"description":"The unique ID of the private template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint."},{"name":"templatePublicId","in":"query","schema":{"type":"integer"},"description":"The unique ID of the public version of the approved template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint as one of the following IDs: `publishedId` for all published templates that are waiting for approval or not, or `approvedId` for approved templates."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","description","usedApps","public","published","approved","approvedId","requestedApproval","publishedId","publicUrl","approvedName","publishedName"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the description of the template."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"teamName":{"type":"string"},"organizationId":{"type":"string"},"description":{"type":"string"},"usedApps":{"type":"array","items":{"type":"string"}},"public":{"type":"boolean"},"published":{"type":"string","format":"date-time"},"approved":{"type":"string","format":"date-time"},"approvedId":{"type":"integer"},"requestedApproval":{"type":"boolean"},"publishedId":{"type":"integer"},"publicUrl":{"type":"string"},"approvedName":{"type":"string"},"publishedName":{"type":"string"}}}}}}}}}}}}}}
```

## Get template blueprint

> Retrieves a blueprint of a template with a given ID.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates/{templateId}/blueprint":{"get":{"tags":["Templates"],"summary":"Get template blueprint","description":"Retrieves a blueprint of a template with a given ID.","parameters":[{"name":"templateId","in":"path","schema":{"type":"integer"},"required":true,"description":"The unique ID of the private template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint."},{"name":"forUse","in":"query","schema":{"type":"boolean"},"description":"If this parameter is set to `true`, it means the blueprint should be used for creating a scenario from the template."},{"name":"templatePublicId","in":"query","schema":{"type":"integer"},"description":"The unique ID of the public version of the approved template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint as one of the following IDs: `publishedId` for all published templates that are waiting for approval or not, or `approvedId` for approved templates."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"blueprint":{"type":"object","properties":{"flow":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"ca":{"type":"string"},"qs":{"type":"array","items":{}},"url":{"type":"string","format":"uri"},"gzip":{"type":"boolean"},"method":{"type":"string"},"headers":{"type":"array","items":{}},"timeout":{"type":"string"},"authPass":{"type":"string"},"authUser":{"type":"string"},"bodyType":{"type":"string"},"shareCookies":{"type":"boolean"},"parseResponse":{"type":"boolean"},"followRedirect":{"type":"boolean"},"useQuerystring":{"type":"boolean"},"rejectUnauthorized":{"type":"boolean"}}},"module":{"type":"string","format":"uri"},"onerror":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"count":{"type":"string","format":"utc-millisec"},"retry":{"type":"boolean"},"interval":{"type":"string","format":"utc-millisec"}}},"module":{"type":"string","format":"uri"},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}},"restore":{"type":"object","properties":{"retry":{"type":"object","properties":{"mode":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"parameters":{"type":"object"}}}},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object"}},"restore":{"type":"object","properties":{"qs":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"method":{"type":"object","properties":{"mode":{"type":"string"},"label":{"type":"string"}}},"headers":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"bodyType":{"type":"object","properties":{"label":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}}}},"parameters":{"type":"object","properties":{"handleErrors":{"type":"boolean"}}}}}},"name":{"type":"string"},"metadata":{"type":"object","properties":{"version":{"type":"integer"},"scenario":{"type":"object","properties":{"maxErrors":{"type":"integer"},"autoCommit":{"type":"boolean"},"roundtrips":{"type":"integer"}}}}}}},"controller":{"type":"object","properties":{"name":{"type":"string"},"modules":{"type":"object"},"idSequence":{"type":"integer"}}},"scheduling":{"type":"object","properties":{"type":{"type":"string"},"interval":{"type":"integer"}}},"language":{"type":"string"}}}}}}}}}}}
```

## Publish template

> Publishes a private template with a given ID. In the response, it returns all details of the template.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates/{templateId}/publish":{"post":{"tags":["Templates"],"summary":"Publish template","description":"Publishes a private template with a given ID. In the response, it returns all details of the template.","requestBody":{"content":{}},"parameters":[{"name":"templateId","in":"path","schema":{"type":"integer"},"required":true,"description":"The unique ID of the private template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","description","usedApps","public","published","approved","approvedId","requestedApproval","publishedId","publicUrl","approvedName","publishedName"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the name and ID of the published template."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"teamName":{"type":"string"},"organizationId":{"type":"string"},"description":{"type":"string"},"usedApps":{"type":"array","items":{"type":"string"}},"public":{"type":"boolean"},"published":{"type":"string","format":"date-time"},"approved":{"type":"string","format":"date-time"},"approvedId":{"type":"integer"},"requestedApproval":{"type":"boolean"},"publishedId":{"type":"integer"},"publicUrl":{"type":"string"},"approvedName":{"type":"string"},"publishedName":{"type":"string"}}}}}}}}}}}}}
```

## Request approval

> Requests approval of the published template with the given IDs of its private and published versions. In the response, it returns all details of the template.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates** feature allows you to create and use templates as a starting point for your Make scenarios. By default, Make offers hundreds of templates containing the scenarios of most-used apps. The following endpoints allow you to create and manage templates."}],"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":["templates: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":{"/templates/{templateId}/request-approval":{"post":{"tags":["Templates"],"summary":"Request approval","description":"Requests approval of the published template with the given IDs of its private and published versions. In the response, it returns all details of the template.","parameters":[{"name":"templateId","in":"path","schema":{"type":"integer"},"required":true,"description":"The unique ID of the private template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint."},{"name":"templatePublicId","in":"query","schema":{"type":"integer"},"description":"The unique ID of the public version of the approved template. It can be retrieved from the [List templates](/api-reference/templates/get--templates.md) endpoint as one of the following IDs: `publishedId` for all published templates that are waiting for approval or not, or `approvedId` for approved templates."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","description","usedApps","public","published","approved","approvedId","requestedApproval","publishedId","publicUrl","approvedName","publishedName"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the ID and name of the template you requested approval for."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"teamName":{"type":"string"},"organizationId":{"type":"string"},"description":{"type":"string"},"usedApps":{"type":"array","items":{"type":"string"}},"public":{"type":"boolean"},"published":{"type":"string","format":"date-time"},"approved":{"type":"string","format":"date-time"},"approvedId":{"type":"integer"},"requestedApproval":{"type":"boolean"},"publishedId":{"type":"integer"},"publicUrl":{"type":"string"},"approvedName":{"type":"string"},"publishedName":{"type":"string"}}}}}}}}}}}}}
```
