curl -X PUT "https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/context" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{"content": "Always run the test suite before opening a PR."}'
runtm-api template context set tmpl_abc123 --text 'Always run the test suite before opening a PR.'
runtm-api template context set tmpl_abc123 --clear
{
"template_id": "tmpl_abc123",
"organization_id": "org_abc123",
"content": "Always run the test suite before opening a PR.",
"updated_at": "2026-07-28T19:00:00Z"
}
Context
Set Template Context
Replace or clear the template’s instruction block
PUT
/
api
/
org-templates
/
{template_id}
/
context
curl -X PUT "https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/context" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{"content": "Always run the test suite before opening a PR."}'
runtm-api template context set tmpl_abc123 --text 'Always run the test suite before opening a PR.'
runtm-api template context set tmpl_abc123 --clear
{
"template_id": "tmpl_abc123",
"organization_id": "org_abc123",
"content": "Always run the test suite before opening a PR.",
"updated_at": "2026-07-28T19:00:00Z"
}
Replaces the template’s instruction block. Send a string to replace, or explicit
null (or an empty string) to clear. Content changes apply to new sessions immediately; no rebuild is required for context.
Required scope: context:write
Path Parameters
string
required
The template ID.
Request Body
string | null
The new instruction block (max 20000 characters). Null or blank clears it.
Response
The updated context, same shape as Get Template Context.curl -X PUT "https://app.runtm.com/api/cloud/org-templates/tmpl_abc123/context" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{"content": "Always run the test suite before opening a PR."}'
runtm-api template context set tmpl_abc123 --text 'Always run the test suite before opening a PR.'
runtm-api template context set tmpl_abc123 --clear
{
"template_id": "tmpl_abc123",
"organization_id": "org_abc123",
"content": "Always run the test suite before opening a PR.",
"updated_at": "2026-07-28T19:00:00Z"
}