curl -X POST "https://app.runtm.com/api/cloud/org-templates" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"description": "Pre-configured Next.js with Tailwind CSS",
"github_repo": "owner/nextjs-starter",
"github_branch": "main",
"tier": "basic",
"agents": ["codex"]
}'
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/org-templates",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"description": "Pre-configured Next.js with Tailwind CSS",
"github_repo": "owner/nextjs-starter",
"github_branch": "main",
"tier": "basic",
"agents": ["codex"],
},
)
data = response.json()
print(f"Created template: {data['id']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/org-templates",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "nextjs-starter",
display_name: "Next.js Starter",
description: "Pre-configured Next.js with Tailwind CSS",
github_repo: "owner/nextjs-starter",
github_branch: "main",
tier: "basic",
agents: ["codex"],
}),
}
);
const data = await response.json();
console.log(`Created template: ${data.id}`);
{
"id": "tmpl_abc123",
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"github_repo": "owner/nextjs-starter",
"build_status": "pending",
"framework": null,
"agents": ["codex"]
}
Templates
Create Template
Create a new organization template
POST
/
api
/
org-templates
curl -X POST "https://app.runtm.com/api/cloud/org-templates" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"description": "Pre-configured Next.js with Tailwind CSS",
"github_repo": "owner/nextjs-starter",
"github_branch": "main",
"tier": "basic",
"agents": ["codex"]
}'
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/org-templates",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"description": "Pre-configured Next.js with Tailwind CSS",
"github_repo": "owner/nextjs-starter",
"github_branch": "main",
"tier": "basic",
"agents": ["codex"],
},
)
data = response.json()
print(f"Created template: {data['id']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/org-templates",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "nextjs-starter",
display_name: "Next.js Starter",
description: "Pre-configured Next.js with Tailwind CSS",
github_repo: "owner/nextjs-starter",
github_branch: "main",
tier: "basic",
agents: ["codex"],
}),
}
);
const data = await response.json();
console.log(`Created template: ${data.id}`);
{
"id": "tmpl_abc123",
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"github_repo": "owner/nextjs-starter",
"build_status": "pending",
"framework": null,
"agents": ["codex"]
}
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_xxxstring
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
Returns201 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.
curl -X POST "https://app.runtm.com/api/cloud/org-templates" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"description": "Pre-configured Next.js with Tailwind CSS",
"github_repo": "owner/nextjs-starter",
"github_branch": "main",
"tier": "basic",
"agents": ["codex"]
}'
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/org-templates",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"description": "Pre-configured Next.js with Tailwind CSS",
"github_repo": "owner/nextjs-starter",
"github_branch": "main",
"tier": "basic",
"agents": ["codex"],
},
)
data = response.json()
print(f"Created template: {data['id']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/org-templates",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "nextjs-starter",
display_name: "Next.js Starter",
description: "Pre-configured Next.js with Tailwind CSS",
github_repo: "owner/nextjs-starter",
github_branch: "main",
tier: "basic",
agents: ["codex"],
}),
}
);
const data = await response.json();
console.log(`Created template: ${data.id}`);
{
"id": "tmpl_abc123",
"name": "nextjs-starter",
"display_name": "Next.js Starter",
"github_repo": "owner/nextjs-starter",
"build_status": "pending",
"framework": null,
"agents": ["codex"]
}