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, or a blank environment when
github_repo is omitted. 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
Body
Optional template slug name. If omitted, Runtime derives one from the repository and branch. Must be unique within the organization.
GitHub repository in
owner/repo form to use as the template source. Omit for a blank environment.Coding agents this template should support. Use an array, even for one agent. Valid values:
claude-code, codex, github-copilot, opencode.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.
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"]
}