Asana Project Templates API

The Asana Project Templates API is a tool that allows users to access and utilize pre-designed project templates within the Asana platform. With this API, users can easily create and customize project plans and processes by selecting templates that align with their specific needs and goals. This simplifies the project planning and management process by providing a framework for organizing tasks, setting deadlines, and tracking progress.

OpenAPI Specification

asana-project-templates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Asana Allocations Project Templates API
  description: The Asana Allocations API allows users to manage and allocate resources within their Asana project management system. An allocation object represents how much of a resource (e.g. person, team) is dedicated to a specific work object (e.g. project, portfolio) over a specific period of time. The effort value can be a percentage or number of hours.
  version: '1.0'
  termsOfService: https://asana.com/terms
  contact:
    name: Asana Support
    url: https://asana.com/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://app.asana.com/api/1.0
  description: Main endpoint.
security:
- personalAccessToken: []
- oauth2: []
tags:
- name: Project Templates
  description: 'A project template is an object that allows new projects to be created

    with a predefined setup, which may include tasks, sections, rules, etc.

    It simplifies the process of running a workflow that involves a similar

    set of work every time.



    Project templates in organizations are shared with a single team. Currently, the

    team of a project template cannot be changed via the API.'
paths:
  /project_templates/{project_template_gid}:
    parameters:
    - $ref: '#/components/parameters/project_template_path_gid'
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get a project template
      description: Returns the complete project template record for a single project template.
      tags:
      - Project Templates
      operationId: getProjectTemplate
      parameters:
      - name: opt_fields
        in: query
        description: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
        required: false
        example:
        - color
        - description
        - html_description
        - name
        - owner
        - public
        - requested_dates
        - requested_dates.description
        - requested_dates.name
        - requested_roles
        - requested_roles.name
        - team
        - team.name
        schema:
          type: array
          items:
            type: string
            enum:
            - color
            - description
            - html_description
            - name
            - owner
            - public
            - requested_dates
            - requested_dates.description
            - requested_dates.name
            - requested_roles
            - requested_roles.name
            - team
            - team.name
        style: form
        explode: false
      responses:
        200:
          description: Successfully retrieved the requested project template.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProjectTemplateResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      security:
      - oauth2:
        - project_templates:read
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nJsonElement result = client.projecttemplates.getProjectTemplate(projectTemplateGid)\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet projectTemplatesApiInstance = new Asana.ProjectTemplatesApi();\nlet project_template_gid = \"1331\"; // String | Globally unique identifier for the project template.\nlet opts = { \n    'opt_fields': \"color,description,html_description,name,owner,public,requested_dates,requested_dates.description,requested_dates.name,requested_roles,requested_roles.name,team,team.name\"\n};\nprojectTemplatesApiInstance.getProjectTemplate(project_template_gid, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.projecttemplates.getProjectTemplate(projectTemplateGid, {param: \"value\", param: \"value\", opt_pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nproject_templates_api_instance = asana.ProjectTemplatesApi(api_client)\nproject_template_gid = \"1331\" # str | Globally unique identifier for the project template.\nopts = {\n    'opt_fields': \"color,description,html_description,name,owner,public,requested_dates,requested_dates.description,requested_dates.name,requested_roles,requested_roles.name,team,team.name\", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n    # Get a project template\n    api_response = project_templates_api_instance.get_project_template(project_template_gid, opts)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling ProjectTemplatesApi->get_project_template: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.project_templates.get_project_template(project_template_gid, {''param'': ''value'', ''param'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->projecttemplates->getProjectTemplate($project_template_gid, array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.project_templates.get_project_template(project_template_gid: 'project_template_gid', param: \"value\", param: \"value\", options: {pretty: true})"
    delete:
      summary: Asana Delete a project template
      description: 'A specific, existing project template can be deleted by making a DELETE request on the URL for that project template.


        Returns an empty data record.'
      tags:
      - Project Templates
      operationId: deleteProjectTemplate
      responses:
        200:
          description: Successfully deleted the specified project template.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EmptyResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        402:
          $ref: '#/components/responses/PaymentRequired'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      x-readme:
        code-samples:
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet projectTemplatesApiInstance = new Asana.ProjectTemplatesApi();\nlet project_template_gid = \"1331\"; // String | Globally unique identifier for the project template.\n\nprojectTemplatesApiInstance.deleteProjectTemplate(project_template_gid).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.projecttemplates.deleteProjectTemplate(projectTemplateGid)\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nproject_templates_api_instance = asana.ProjectTemplatesApi(api_client)\nproject_template_gid = \"1331\" # str | Globally unique identifier for the project template.\n\n\ntry:\n    # Delete a project template\n    api_response = project_templates_api_instance.delete_project_template(project_template_gid)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling ProjectTemplatesApi->delete_project_template: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.project_templates.delete_project_template(project_template_gid, opt_pretty=True)'
          name: python-sdk-v3
  /project_templates:
    parameters:
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get multiple project templates
      description: Returns the compact project template records for all project templates in the given team or workspace.
      tags:
      - Project Templates
      operationId: getProjectTemplates
      parameters:
      - $ref: '#/components/parameters/workspace_query_param'
      - $ref: '#/components/parameters/team_query_param'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: opt_fields
        in: query
        description: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
        required: false
        example:
        - color
        - description
        - html_description
        - name
        - offset
        - owner
        - path
        - public
        - requested_dates
        - requested_dates.description
        - requested_dates.name
        - requested_roles
        - requested_roles.name
        - team
        - team.name
        - uri
        schema:
          type: array
          items:
            type: string
            enum:
            - color
            - description
            - html_description
            - name
            - offset
            - owner
            - path
            - public
            - requested_dates
            - requested_dates.description
            - requested_dates.name
            - requested_roles
            - requested_roles.name
            - team
            - team.name
            - uri
        style: form
        explode: false
      responses:
        200:
          description: Successfully retrieved the requested team's or workspace's project templates.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProjectTemplateCompact'
                  next_page:
                    $ref: '#/components/schemas/NextPage'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      security:
      - oauth2:
        - project_templates:read
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nList<JsonElement> result = client.projecttemplates.getProjectTemplates(team, workspace)\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet projectTemplatesApiInstance = new Asana.ProjectTemplatesApi();\nlet opts = { \n    'workspace': \"12345\", \n    'team': \"14916\", \n    'limit': 50, \n    'offset': \"eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9\", \n    'opt_fields': \"color,description,html_description,name,offset,owner,path,public,requested_dates,requested_dates.description,requested_dates.name,requested_roles,requested_roles.name,team,team.name,uri\"\n};\nprojectTemplatesApiInstance.getProjectTemplates(opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.projecttemplates.getProjectTemplates({param: \"value\", param: \"value\", opt_pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nproject_templates_api_instance = asana.ProjectTemplatesApi(api_client)\nopts = {\n    'workspace': \"12345\", # str | The workspace to filter results on.\n    'team': \"14916\", # str | The team to filter projects on.\n    'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.\n    'offset': \"eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9\", # str | Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*\n    'opt_fields': \"color,description,html_description,name,offset,owner,path,public,requested_dates,requested_dates.description,requested_dates.name,requested_roles,requested_roles.name,team,team.name,uri\", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n    # Get multiple project templates\n    api_response = project_templates_api_instance.get_project_templates(opts)\n    for data in api_response:\n        pprint(data)\nexcept ApiException as e:\n    print(\"Exception when calling ProjectTemplatesApi->get_project_templates: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.project_templates.get_project_templates({''param'': ''value'', ''param'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->projecttemplates->getProjectTemplates(array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.project_templates.get_project_templates(param: \"value\", param: \"value\", options: {pretty: true})"
  /teams/{team_gid}/project_templates:
    parameters:
    - $ref: '#/components/parameters/team_path_gid'
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get a team's project templates
      description: Returns the compact project template records for all project templates in the team.
      tags:
      - Project Templates
      operationId: getProjectTemplatesForTeam
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: opt_fields
        in: query
        description: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
        required: false
        example:
        - color
        - description
        - html_description
        - name
        - offset
        - owner
        - path
        - public
        - requested_dates
        - requested_dates.description
        - requested_dates.name
        - requested_roles
        - requested_roles.name
        - team
        - team.name
        - uri
        schema:
          type: array
          items:
            type: string
            enum:
            - color
            - description
            - html_description
            - name
            - offset
            - owner
            - path
            - public
            - requested_dates
            - requested_dates.description
            - requested_dates.name
            - requested_roles
            - requested_roles.name
            - team
            - team.name
            - uri
        style: form
        explode: false
      responses:
        200:
          description: Successfully retrieved the requested team's project templates.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProjectTemplateCompact'
                  next_page:
                    $ref: '#/components/schemas/NextPage'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      security:
      - oauth2:
        - project_templates:read
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nList<JsonElement> result = client.projecttemplates.getProjectTemplatesForTeam(teamGid)\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet projectTemplatesApiInstance = new Asana.ProjectTemplatesApi();\nlet team_gid = \"159874\"; // String | Globally unique identifier for the team.\nlet opts = { \n    'limit': 50, \n    'offset': \"eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9\", \n    'opt_fields': \"color,description,html_description,name,offset,owner,path,public,requested_dates,requested_dates.description,requested_dates.name,requested_roles,requested_roles.name,team,team.name,uri\"\n};\nprojectTemplatesApiInstance.getProjectTemplatesForTeam(team_gid, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.projecttemplates.getProjectTemplatesForTeam(teamGid, {param: \"value\", param: \"value\", opt_pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nproject_templates_api_instance = asana.ProjectTemplatesApi(api_client)\nteam_gid = \"159874\" # str | Globally unique identifier for the team.\nopts = {\n    'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.\n    'offset': \"eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9\", # str | Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*\n    'opt_fields': \"color,description,html_description,name,offset,owner,path,public,requested_dates,requested_dates.description,requested_dates.name,requested_roles,requested_roles.name,team,team.name,uri\", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n    # Get a team's project templates\n    api_response = project_templates_api_instance.get_project_templates_for_team(team_gid, opts)\n    for data in api_response:\n        pprint(data)\nexcept ApiException as e:\n    print(\"Exception when calling ProjectTemplatesApi->get_project_templates_for_team: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.project_templates.get_project_templates_for_team(team_gid, {''param'': ''value'', ''param'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->projecttemplates->getProjectTemplatesForTeam($team_gid, array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.project_templates.get_project_templates_for_team(team_gid: 'team_gid', param: \"value\", param: \"value\", options: {pretty: true})"
  /project_templates/{project_template_gid}/instantiateProject:
    parameters:
    - $ref: '#/components/parameters/project_template_path_gid'
    - $ref: '#/components/parameters/pretty'
    post:
      summary: Asana Instantiate a project from a project template
      description: 'Creates and returns a job that will asynchronously handle the project instantiation.


        To form this request, it is recommended to first make a request to [get a project template](/reference/getprojecttemplate). Then, from the response, copy the `gid` from the object in the `requested_dates` array. This `gid` should be used in `requested_dates` to instantiate a project.


        _Note: The body of this request will differ if your workspace is an organization. To determine if your workspace is an organization, use the [is_organization](/reference/workspaces) parameter._'
      tags:
      - Project Templates
      operationId: instantiateProject
      parameters:
      - name: opt_fields
        in: query
        description: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
        required: false
        example:
        - new_project
        - new_project.name
        - new_project_template
        - new_project_template.name
        - new_task
        - new_task.created_by
        - new_task.name
        - new_task.resource_subtype
        - new_task_template
        - new_task_template.name
        - resource_subtype
        - status
        schema:
          type: array
          items:
            type: string
            enum:
            - new_project
            - new_project.name
            - new_project_template
            - new_project_template.name
            - new_task
            - new_task.created_by
            - new_task.name
            - new_task.resource_subtype
            - new_task_template
            - new_task_template.name
            - resource_subtype
            - status
        style: form
        explode: false
      requestBody:
        description: Describes the inputs used for instantiating a project, such as the resulting project's name, which team it should be created in, and values for date variables.
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/ProjectTemplateInstantiateProjectRequest'
      responses:
        201:
          description: Successfully created the job to handle project instantiation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/JobResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      security:
      - oauth2:
        - projects:write
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nJob result = client.projecttemplates.instantiateProject(projectTemplateGid)\n    .data(\"field\", \"value\")\n    .data(\"field\", \"value\")\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet projectTemplatesApiInstance = new Asana.ProjectTemplatesApi();\nlet project_template_gid = \"1331\"; // String | Globally unique identifier for the project template.\nlet opts = { \n    'body': {\"data\": {\"<PARAM_1>\": \"<VALUE_1>\", \"<PARAM_2>\": \"<VALUE_2>\",}}, \n    'opt_fields': \"new_project,new_project.name,new_project_template,new_project_template.name,new_task,new_task.created_by,new_task.name,new_task.resource_subtype,resource_subtype,status\"\n};\nprojectTemplatesApiInstance.instantiateProject(project_template_gid, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.projecttemplates.instantiateProject(projectTemplateGid, {field: \"value\", field: \"value\", pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nproject_templates_api_instance = asana.ProjectTemplatesApi(api_client)\nproject_template_gid = \"1331\" # str | Globally unique identifier for the project template.\nopts = {\n    'body': {\"data\": {\"<PARAM_1>\": \"<VALUE_1>\", \"<PARAM_2>\": \"<VALUE_2>\",}}, # dict | Describes the inputs used for instantiating a project, such as the resulting project's name, which team it should be created in, and values for date variables.\n    'opt_fields': \"new_project,new_project.name,new_project_template,new_project_template.name,new_task,new_task.created_by,new_task.name,new_task.resource_subtype,resource_subtype,status\", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n    # Instantiate a project from a project template\n    api_response = project_templates_api_instance.instantiate_project(project_template_gid, opts)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling ProjectTemplatesApi->instantiate_project: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.project_templates.instantiate_project(project_template_gid, {''field'': ''value'', ''field'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          instal

# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/asana/refs/heads/main/openapi/asana-project-templates-api-openapi.yml