{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "organizationId": {
      "description": "Workspace ID. Omit to use your current workspace.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "thread": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "thread_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "provider": {
          "type": "string",
          "enum": ["gmail", "outlook", "instantly"]
        }
      },
      "required": ["account_id", "thread_id", "provider"],
      "additionalProperties": false
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "sendAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "description": "When to send, with a time zone offset."
    },
    "confirmSend": {
      "type": "boolean",
      "const": true
    }
  },
  "required": ["thread", "revision", "sendAt", "confirmSend"],
  "additionalProperties": false
}
