curl -X POST "https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
data = response.json()
print(f"Fix session created: {data['id']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await response.json();
console.log(`Fix session created: ${data.id}`);
{
"id": "sess_fix_abc123",
"state": "running",
"template_id": "tmpl_abc123",
"message": "Fix session created for template nextjs-starter"
}
Builds
Fix Session
Create a session to repair a broken template
POST
/
api
/
org-templates
/
{template_id}
/
fix-session
curl -X POST "https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
data = response.json()
print(f"Fix session created: {data['id']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await response.json();
console.log(`Fix session created: ${data.id}`);
{
"id": "sess_fix_abc123",
"state": "running",
"template_id": "tmpl_abc123",
"message": "Fix session created for template nextjs-starter"
}
Creates a new sandbox session pre-loaded with the template’s current state, allowing an agent to diagnose and fix build failures or configuration issues. The fix session includes the build transcript for context. Requires admin or owner role.
Required scope:
templates:write
Path Parameters
string
required
The template ID (e.g.
tmpl_abc123).Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
required
Organization ID.
Response
Returns201 with the created fix session.
string
The fix session ID.
string
Session state (typically
running).string
The template this fix session is targeting.
string
Confirmation message.
curl -X POST "https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
data = response.json()
print(f"Fix session created: {data['id']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/fix-session",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await response.json();
console.log(`Fix session created: ${data.id}`);
{
"id": "sess_fix_abc123",
"state": "running",
"template_id": "tmpl_abc123",
"message": "Fix session created for template nextjs-starter"
}