Skip to main content
POST
/
v1
/
deployments
curl -X POST https://api.runtools.ai/v1/deployments \
  -H "X-API-Key: rt_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "runtimeSlug": "code-assistant",
    "templateSlug": "nodejs-20",
    "apiSlug": "my-code-bot",
    "webhookUrl": "https://myapp.com/webhook",
    "webhookEvents": ["run.completed", "run.failed"],
    "maxConcurrent": 20,
    "timeout": 300
  }'
{
  "data": {
    "id": "dep_abc123",
    "apiSlug": "my-code-bot",
    "apiEndpoint": "https://api.runtools.ai/v1/run/my-code-bot",
    "runtimeSlug": "code-assistant",
    "templateSlug": "nodejs-20",
    "status": "active",
    "createdAt": "2025-01-21T10:00:00Z"
  }
}

Request Body

runtimeSlug
string
required
Runtime to deploy
templateSlug
string
required
Template to use for sandbox
apiSlug
string
required
URL slug for the API endpoint
mounts
array
Default persistent storage mounts for runs. Each mount has workspaceId and path.
webhookUrl
string
Webhook URL for run events
webhookEvents
array
Events to send: run.started, run.completed, run.failed
maxConcurrent
number
default:"10"
Max concurrent runs
timeout
number
default:"300"
Run timeout in seconds
secrets
array
Secret names to inject

Response

id
string
Deployment ID
apiSlug
string
API endpoint slug
apiEndpoint
string
Full API endpoint URL
status
string
Deployment status
curl -X POST https://api.runtools.ai/v1/deployments \
  -H "X-API-Key: rt_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "runtimeSlug": "code-assistant",
    "templateSlug": "nodejs-20",
    "apiSlug": "my-code-bot",
    "webhookUrl": "https://myapp.com/webhook",
    "webhookEvents": ["run.completed", "run.failed"],
    "maxConcurrent": 20,
    "timeout": 300
  }'
{
  "data": {
    "id": "dep_abc123",
    "apiSlug": "my-code-bot",
    "apiEndpoint": "https://api.runtools.ai/v1/run/my-code-bot",
    "runtimeSlug": "code-assistant",
    "templateSlug": "nodejs-20",
    "status": "active",
    "createdAt": "2025-01-21T10:00:00Z"
  }
}