curl -N "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run?tier=starter" \
-X POST \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run",
headers={"Authorization": "Bearer runtm_xxx"},
params={"tier": "starter"},
stream=True,
)
for line in response.iter_lines():
if line:
text = line.decode("utf-8")
if text.startswith("data: "):
import json
event = json.loads(text[6:])
print(f"[{event['phase']}] {event['status']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run?tier=starter",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const text = decoder.decode(value);
for (const line of text.split("\n")) {
if (line.startsWith("data: ")) {
const event = JSON.parse(line.slice(6));
console.log(`[${event.phase}] ${event.status}`);
}
}
}
{"phase": "validate", "status": "running"}
{"phase": "validate", "status": "passed"}
{"phase": "artifact", "status": "running"}
{"phase": "artifact", "status": "complete"}
{"phase": "upload", "status": "running"}
{"phase": "upload", "status": "complete"}
{"phase": "deploy", "status": "running"}
{"phase": "deploy", "status": "ready", "deployment_id": "dep_abc123", "url": "https://my-app.runtm.app"}
Deploy
Run Deploy
Start a deployment and stream progress events
POST
/
api
/
sessions
/
{session_id}
/
deploy
/
run
curl -N "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run?tier=starter" \
-X POST \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run",
headers={"Authorization": "Bearer runtm_xxx"},
params={"tier": "starter"},
stream=True,
)
for line in response.iter_lines():
if line:
text = line.decode("utf-8")
if text.startswith("data: "):
import json
event = json.loads(text[6:])
print(f"[{event['phase']}] {event['status']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run?tier=starter",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const text = decoder.decode(value);
for (const line of text.split("\n")) {
if (line.startsWith("data: ")) {
const event = JSON.parse(line.slice(6));
console.log(`[${event.phase}] ${event.status}`);
}
}
}
{"phase": "validate", "status": "running"}
{"phase": "validate", "status": "passed"}
{"phase": "artifact", "status": "running"}
{"phase": "artifact", "status": "complete"}
{"phase": "upload", "status": "running"}
{"phase": "upload", "status": "complete"}
{"phase": "deploy", "status": "running"}
{"phase": "deploy", "status": "ready", "deployment_id": "dep_abc123", "url": "https://my-app.runtm.app"}
Runs
runtm deploy inside the session sandbox and streams NDJSON progress events via Server-Sent Events. Each event includes a phase and status field tracking deployment progress through validation, artifact creation, upload, and deployment.
Required scope: deployments:write
Path Parameters
string
required
The session ID (UUID).
Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope to an organization.
Query Parameters
string
default:"starter"
Machine tier for the deployment. Values:
starter, performance, pro. Must be in your plan’s allowed tiers.Response
Returns atext/event-stream with NDJSON events. Each line is prefixed with data: and contains a JSON object.
string
Current deployment phase:
validate, artifact, upload, deploy, discovery.string
Phase status:
running, passed, complete, ready, failed, needs_metadata.string
Error message when
status is failed.string
Deployment ID, present when status is
ready.curl -N "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run?tier=starter" \
-X POST \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run",
headers={"Authorization": "Bearer runtm_xxx"},
params={"tier": "starter"},
stream=True,
)
for line in response.iter_lines():
if line:
text = line.decode("utf-8")
if text.startswith("data: "):
import json
event = json.loads(text[6:])
print(f"[{event['phase']}] {event['status']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/run?tier=starter",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const text = decoder.decode(value);
for (const line of text.split("\n")) {
if (line.startsWith("data: ")) {
const event = JSON.parse(line.slice(6));
console.log(`[${event.phase}] ${event.status}`);
}
}
}
{"phase": "validate", "status": "running"}
{"phase": "validate", "status": "passed"}
{"phase": "artifact", "status": "running"}
{"phase": "artifact", "status": "complete"}
{"phase": "upload", "status": "running"}
{"phase": "upload", "status": "complete"}
{"phase": "deploy", "status": "running"}
{"phase": "deploy", "status": "ready", "deployment_id": "dep_abc123", "url": "https://my-app.runtm.app"}