curl -X DELETE "https://app.runtm.com/api/v0/deployments/dep_abc123xyz" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.delete(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz",
headers={"Authorization": "Bearer runtm_xxx"}
)
data = response.json()
print(f"Deployment {data['deployment_id']}: {data['message']}")
const response = await fetch(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz",
{
method: "DELETE",
headers: {
"Authorization": "Bearer runtm_xxx"
}
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id}: ${data.message}`);
{
"deployment_id": "dep_abc123xyz",
"status": "destroyed",
"message": "Deployment destroyed successfully"
}
{
"detail": {
"error": "Deployment not found",
"deployment_id": "dep_invalid"
}
}
{
"detail": {
"error": "Cannot destroy deployment in 'building' state",
"recovery_hint": "Wait for the build/deploy to complete or fail, then try again."
}
}
Deployments
Delete Deployment
Destroy a deployment and release resources
DELETE
/
v0
/
deployments
/
{deployment_id}
curl -X DELETE "https://app.runtm.com/api/v0/deployments/dep_abc123xyz" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.delete(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz",
headers={"Authorization": "Bearer runtm_xxx"}
)
data = response.json()
print(f"Deployment {data['deployment_id']}: {data['message']}")
const response = await fetch(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz",
{
method: "DELETE",
headers: {
"Authorization": "Bearer runtm_xxx"
}
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id}: ${data.message}`);
{
"deployment_id": "dep_abc123xyz",
"status": "destroyed",
"message": "Deployment destroyed successfully"
}
{
"detail": {
"error": "Deployment not found",
"deployment_id": "dep_invalid"
}
}
{
"detail": {
"error": "Cannot destroy deployment in 'building' state",
"recovery_hint": "Wait for the build/deploy to complete or fail, then try again."
}
}
Destroy a deployment, stopping the machine and releasing all associated resources.
Path Parameters
string
required
The deployment ID to destroy (e.g.,
dep_abc123xyz)Response
string
The destroyed deployment ID
string
Always
destroyedstring
Success message
curl -X DELETE "https://app.runtm.com/api/v0/deployments/dep_abc123xyz" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.delete(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz",
headers={"Authorization": "Bearer runtm_xxx"}
)
data = response.json()
print(f"Deployment {data['deployment_id']}: {data['message']}")
const response = await fetch(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz",
{
method: "DELETE",
headers: {
"Authorization": "Bearer runtm_xxx"
}
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id}: ${data.message}`);
{
"deployment_id": "dep_abc123xyz",
"status": "destroyed",
"message": "Deployment destroyed successfully"
}
{
"detail": {
"error": "Deployment not found",
"deployment_id": "dep_invalid"
}
}
{
"detail": {
"error": "Cannot destroy deployment in 'building' state",
"recovery_hint": "Wait for the build/deploy to complete or fail, then try again."
}
}
Only deployments in
queued, ready, or failed state can be destroyed. Deployments that are currently building or deploying must complete first.