# Create template (v3) (/docs/api-reference/templates/create-template-v3)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1395 · updated: 2026-07-30 -->
Related: [List templates (v2)](/docs/api-reference/templates/list-templates-v2.md), [Create template (v2)](/docs/api-reference/templates/create-template-v2.md), [Get build upload link](/docs/api-reference/templates/get-build-upload-link.md), [List templates](/docs/api-reference/templates/list-templates.md), [Create template](/docs/api-reference/templates/create-template.md), [Get template](/docs/api-reference/templates/get-template.md)

# Create template (v3)

`POST /v3/templates`

Create a new template

## OpenAPI

```json
{
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "name": {
              "description": "Name of the template. Can include a tag with colon separator (e.g. \"my-template\" or \"my-template:v1\"). If tag is included, it will be treated as if the tag was provided in the tags array.",
              "type": "string"
            },
            "tags": {
              "type": "array",
              "description": "Tags to assign to the template build",
              "items": {
                "type": "string"
              }
            },
            "alias": {
              "description": "Alias of the template. Deprecated, use name instead.",
              "type": "string",
              "deprecated": true
            },
            "teamID": {
              "deprecated": true,
              "type": "string",
              "description": "Identifier of the team"
            },
            "cpuCount": {
              "type": "integer",
              "format": "int32",
              "minimum": 1,
              "description": "CPU cores for the sandbox"
            },
            "memoryMB": {
              "type": "integer",
              "format": "int32",
              "minimum": 128,
              "description": "Memory for the sandbox in MiB"
            }
          },
          "type": "object"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "The build was requested successfully",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "templateID",
              "buildID",
              "public",
              "aliases",
              "names",
              "tags"
            ],
            "properties": {
              "templateID": {
                "type": "string",
                "description": "Identifier of the template"
              },
              "buildID": {
                "type": "string",
                "description": "Identifier of the last successful build for given template"
              },
              "public": {
                "type": "boolean",
                "description": "Whether the template is public or only accessible by the team"
              },
              "names": {
                "type": "array",
                "description": "Names of the template",
                "items": {
                  "type": "string"
                }
              },
              "tags": {
                "type": "array",
                "description": "Tags assigned to the template build",
                "items": {
                  "type": "string"
                }
              },
              "aliases": {
                "type": "array",
                "description": "Aliases of the template",
                "deprecated": true,
                "items": {
                  "type": "string"
                }
              }
            },
            "type": "object"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "401": {
      "description": "Authentication error",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "500": {
      "description": "Server error",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    }
  }
}
```
