Job Payload

When creating a new job, this is the most complete body that can be sent:

{
  "image": "ubuntu:latest",
  "command": "ls -lah",
  "envs": {
    "SMTP_SERVER":"my-smtp-server"
  },
  "startIn": "5m",
  "startAt": 1645113692,
  "cron": "* * * * *",
  "metadata": {
    "username": "heynemann",
    "email": "heynemann@some-email.com"
  },
  "notify": {
    "succeeds": ["success@mycompany.com"],
    "fails": ["failure@mycompany.com", "other@mycompany.com"],
    "finishes": ["whatever@mycompany.com"]
  },
  "webhooks": {
    "succeeds": [{
      "url": "http://my.website.com/route",
      "headers": {
        "MY-TOKEN": "qweqwe"
      },
      "retries": 3
    }],
    "fails": [{
      "url": "http://my.website.com/route",
      "headers": {
        "MY-TOKEN": "qweqwe"
      },
      "retries": 3
    }],
    "finishes": [{
      "url": "http://my.website.com/route",
      "headers": {
        "MY-TOKEN": "qweqwe"
      },
      "retries": 3
    }]
  },
  "retries": 4,
  "expiration": 1645113692,
  "timeout": 3600
}