Everstack
API ReferenceAgentsWebhooks

Webhooks

POST/v1/sandbox/webhooks
POST/v1/sandbox/webhooks

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Request Body

PropertyTypeRequiredDescription
tenantIdstringNo
sandboxIdstringNo
sessionIdstringNo
namestringNo
pathstringNo
commandstringNo
workDirstringNo
timeoutSecondsintegerNo
rateLimitRpmintegerNo
autoRecreatebooleanNo
sandboxConfigobjectNo

Responses

200 Create a sandbox webhook

PropertyTypeDescription
webhookobject
secretstring

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X POST "http://localhost:8089/v1/sandbox/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenantId":"string","sandboxId":"string","sessionId":"string","name":"string","path":"string","command":"string","workDir":"string","timeoutSeconds":0,"rateLimitRpm":0,"autoRecreate":true}'
const response = await fetch("http://localhost:8089/v1/sandbox/webhooks", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "tenantId": "string",
  "sandboxId": "string",
  "sessionId": "string",
  "name": "string",
  "path": "string",
  "command": "string",
  "workDir": "string",
  "timeoutSeconds": 0,
  "rateLimitRpm": 0,
  "autoRecreate": true
}),
});
const data = await response.json();
import requests

response = requests.post(
    "http://localhost:8089/v1/sandbox/webhooks",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
  "tenantId": "string",
  "sandboxId": "string",
  "sessionId": "string",
  "name": "string",
  "path": "string",
  "command": "string",
  "workDir": "string",
  "timeoutSeconds": 0,
  "rateLimitRpm": 0,
  "autoRecreate": true
},
)
data = response.json()

Response

{
  "webhook": {
    "id": "string",
    "tenantId": "string",
    "sandboxId": "string",
    "sessionId": "string",
    "name": "string",
    "path": "string",
    "url": "string",
    "command": "string",
    "workDir": "string",
    "timeoutSeconds": 0,
    "enabled": true,
    "rateLimitRpm": 0,
    "lastTriggeredAt": "2024-01-01T00:00:00Z",
    "triggerCount": 0,
    "errorCount": 0,
    "lastError": "string",
    "autoRecreate": true,
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  },
  "secret": "string"
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}