Skip to main content
POST
Creates a new organization template from a GitHub repository. Templates define pre-configured sandbox environments that auto-match to repositories based on repository patterns. Requires admin or owner role. Required scope: templates:write

Headers

string
required
Bearer token. Example: Bearer runtm_xxx
string
required
Organization ID.

Body

string
Optional template slug name. If omitted, Runtime derives one from the repository and branch. Must be unique within the organization.
string
required
Human-readable template name.
string
Template description.
string
required
GitHub repository in owner/repo form to use as the template source.
string
default:"main"
Branch to use from the source repository.
array
default:"[\"claude-code\"]"
Coding agents this template should support. Use an array, even for one agent. Valid values: claude-code, codex, github-copilot, opencode.
string
default:"basic"
Resource tier for template sessions. Valid values: basic, standard, max.
object
Optional seed build spec. Runtime may rewrite this during the template build.
array
Optional multi-repo configuration. Each entry includes full_name, branch, optional workdir, and optional is_primary.
agent is not a create-template field. To create a Codex template, send "agents": ["codex"].

Response

Returns 201 with the created template resource.
string
Template ID.
string
Template slug name.
string
Human-readable name.
string
GitHub repository used as the template source.
string
Initial build status.
string
Detected framework, or null when it has not been detected yet.
array
Agents configured for the template.