Savannah Cloud

Job Types

Reference for the built-in Savannah Cloud job handlers and payload schemas.

Each job sent to POST /jobs includes a Type field and a JSON payload. The worker dispatches based on the Type value.

send_email

{
  "ID": "email-001",
  "Type": "send_email",
  "Payload": {
    "to": "user@example.com",
    "subject": "Your order is confirmed",
    "body": "Thank you for your purchase!"
  },
  "MaxRetries": 3
}
FieldTypeRequired
tostringYes
subjectstringYes
bodystringYes

send_sms

{
  "ID": "sms-001",
  "Type": "send_sms",
  "Payload": {
    "to": "+254700000000",
    "message": "Your verification code is 123456"
  },
  "MaxRetries": 2
}
FieldTypeRequired
tostringYes
messagestringYes

webhook

{
  "ID": "webhook-001",
  "Type": "webhook",
  "Payload": {
    "url": "https://api.example.com/events",
    "payload": { "event": "deployment.success" }
  },
  "MaxRetries": 5
}
FieldTypeRequired
urlstringYes
payloadobjectYes

generate_pdf

{
  "ID": "pdf-001",
  "Type": "generate_pdf",
  "Payload": {
    "template": "invoice",
    "data": { "invoice_id": "INV-001", "amount": 1500 }
  },
  "MaxRetries": 1
}
FieldTypeRequired
templatestringYes
dataobjectYes

git_deploy

{
  "ID": "deploy-001",
  "Type": "git_deploy",
  "Payload": {
    "repo": "owner/repo",
    "branch": "main",
    "env": "production"
  },
  "MaxRetries": 2
}
FieldTypeRequired
repostringYes
branchstringYes
envstringNo

stack_deploy

{
  "ID": "stack-001",
  "Type": "stack_deploy",
  "Payload": {
    "project": "acme-app",
    "stack": "nextjs"
  },
  "MaxRetries": 2
}
FieldTypeRequired
projectstringYes
stackstringYes

Custom job types

You can add your own job handlers by defining a new Type and implementing the worker logic in the server. This is the recommended path for:

  • internal automation jobs
  • custom integrations
  • domain-specific workflow actions
  • tenant-specific processing steps

The worker dispatch layer determines runtime behavior, so the API surface is stable while the work implementation remains extensible.

On this page