curl -X POST "https://app.runtm.com/api/v0/deployments" \
-H "Authorization: Bearer runtm_xxx" \
-F "[email protected]" \
-F "[email protected]" \
-F 'secrets={"DATABASE_URL": "postgres://..."}'
import requests
with open("runtm.yaml", "rb") as manifest, open("artifact.zip", "rb") as artifact:
response = requests.post(
"https://app.runtm.com/api/v0/deployments",
headers={"Authorization": "Bearer runtm_xxx"},
files={
"manifest": ("runtm.yaml", manifest),
"artifact": ("artifact.zip", artifact),
},
data={
"secrets": '{"DATABASE_URL": "postgres://..."}'
}
)
data = response.json()
print(f"Deployment {data['deployment_id']} created")
const formData = new FormData();
formData.append("manifest", manifestFile);
formData.append("artifact", artifactZip);
formData.append("secrets", JSON.stringify({
DATABASE_URL: "postgres://..."
}));
const response = await fetch(
"https://app.runtm.com/api/v0/deployments",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx"
},
body: formData
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id} created`);
{
"deployment_id": "dep_abc123xyz",
"name": "my-api",
"state": "queued",
"url": null,
"version": 1,
"is_latest": true,
"previous_deployment_id": null,
"template": "backend-service",
"runtime": "python",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"detail": {
"error": "Invalid manifest",
"message": "Missing required field: name"
}
}
{
"detail": {
"error": "Artifact too large",
"size_bytes": 25000000,
"max_bytes": 20971520
}
}
Deployments
Create Deployment
Create a new deployment or redeploy an existing one
POST
/
v0
/
deployments
curl -X POST "https://app.runtm.com/api/v0/deployments" \
-H "Authorization: Bearer runtm_xxx" \
-F "[email protected]" \
-F "[email protected]" \
-F 'secrets={"DATABASE_URL": "postgres://..."}'
import requests
with open("runtm.yaml", "rb") as manifest, open("artifact.zip", "rb") as artifact:
response = requests.post(
"https://app.runtm.com/api/v0/deployments",
headers={"Authorization": "Bearer runtm_xxx"},
files={
"manifest": ("runtm.yaml", manifest),
"artifact": ("artifact.zip", artifact),
},
data={
"secrets": '{"DATABASE_URL": "postgres://..."}'
}
)
data = response.json()
print(f"Deployment {data['deployment_id']} created")
const formData = new FormData();
formData.append("manifest", manifestFile);
formData.append("artifact", artifactZip);
formData.append("secrets", JSON.stringify({
DATABASE_URL: "postgres://..."
}));
const response = await fetch(
"https://app.runtm.com/api/v0/deployments",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx"
},
body: formData
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id} created`);
{
"deployment_id": "dep_abc123xyz",
"name": "my-api",
"state": "queued",
"url": null,
"version": 1,
"is_latest": true,
"previous_deployment_id": null,
"template": "backend-service",
"runtime": "python",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"detail": {
"error": "Invalid manifest",
"message": "Missing required field: name"
}
}
{
"detail": {
"error": "Artifact too large",
"size_bytes": 25000000,
"max_bytes": 20971520
}
}
Deploy a new application or update an existing one. Accepts a multipart form with the manifest and artifact.
Request Body
file
required
Your
runtm.yaml manifest filefile
required
Zip file containing your project files (max 20MB)
string
JSON string of secrets to inject (e.g.,
{"API_KEY": "xxx"})string
Source hash for tracking changes
Query Parameters
boolean
default:"false"
Force new deployment instead of redeploying existing
string
Override machine tier:
starter, standard, performanceboolean
default:"false"
Skip Docker build, reuse previous image (for env/tier changes only)
Headers
string
Unique key for idempotent requests. Same key returns existing deployment.
Response
string
Unique deployment identifier
string
Project name
string
Initial state (usually
queued)integer
Deployment version number
curl -X POST "https://app.runtm.com/api/v0/deployments" \
-H "Authorization: Bearer runtm_xxx" \
-F "[email protected]" \
-F "[email protected]" \
-F 'secrets={"DATABASE_URL": "postgres://..."}'
import requests
with open("runtm.yaml", "rb") as manifest, open("artifact.zip", "rb") as artifact:
response = requests.post(
"https://app.runtm.com/api/v0/deployments",
headers={"Authorization": "Bearer runtm_xxx"},
files={
"manifest": ("runtm.yaml", manifest),
"artifact": ("artifact.zip", artifact),
},
data={
"secrets": '{"DATABASE_URL": "postgres://..."}'
}
)
data = response.json()
print(f"Deployment {data['deployment_id']} created")
const formData = new FormData();
formData.append("manifest", manifestFile);
formData.append("artifact", artifactZip);
formData.append("secrets", JSON.stringify({
DATABASE_URL: "postgres://..."
}));
const response = await fetch(
"https://app.runtm.com/api/v0/deployments",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx"
},
body: formData
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id} created`);
{
"deployment_id": "dep_abc123xyz",
"name": "my-api",
"state": "queued",
"url": null,
"version": 1,
"is_latest": true,
"previous_deployment_id": null,
"template": "backend-service",
"runtime": "python",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"detail": {
"error": "Invalid manifest",
"message": "Missing required field: name"
}
}
{
"detail": {
"error": "Artifact too large",
"size_bytes": 25000000,
"max_bytes": 20971520
}
}