{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deadsimple-email/json-schema/deadsimple-email-calendar-event-schema.json",
  "title": "CalendarEvent",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deadsimple-email-openapi.json#/components/schemas/CalendarEvent",
  "type": "object",
  "properties": {
    "event_id": {
      "type": "string"
    },
    "inbox_id": {
      "type": "string"
    },
    "workspace_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "ical_uid": {
      "type": "string",
      "description": "Stable across updates. What an update, cancellation or reply is matched on, on both ends."
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "location": {
      "type": "string"
    },
    "start_at": {
      "type": "string",
      "description": "ISO 8601 UTC, e.g. 2026-09-15T19:00:00Z"
    },
    "end_at": {
      "type": "string",
      "description": "ISO 8601 UTC. Exclusive for all-day events."
    },
    "timezone": {
      "type": "string"
    },
    "all_day": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "confirmed",
        "tentative",
        "cancelled"
      ]
    },
    "organizer": {
      "$ref": "#/$defs/CalendarOrganizer"
    },
    "attendees": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CalendarAttendee"
      }
    },
    "source": {
      "type": "string",
      "enum": [
        "api",
        "sent",
        "inbound"
      ],
      "description": "api = created here; sent = created here and sent as an invitation; inbound = arrived by email."
    },
    "sequence": {
      "type": "integer"
    },
    "message_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The invitation we sent, or the inbound message that last created, updated or cancelled the event."
    },
    "invited_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "$defs": {
    "CalendarAttendee": {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "name": {
          "type": "string"
        },
        "response": {
          "type": "string",
          "enum": [
            "needs-action",
            "accepted",
            "declined",
            "tentative"
          ],
          "description": "The attendee's answer as last seen (our own rsvp, or their REPLY)."
        },
        "optional": {
          "type": "boolean",
          "description": "OPT-PARTICIPANT rather than REQ-PARTICIPANT on the invitation."
        }
      }
    },
    "CalendarOrganizer": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}