{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "EventEnvelope.json",
  "title": "Event",
  "description": "The body of every webhook delivery.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "evt_ followed by a ULID: unique and sortable by time. Deduplicate on it."
    },
    "type": {
      "type": "string",
      "description": "The event type, such as invoice.paid."
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "When the event happened. UTC, with Z."
    },
    "data": {
      "description": "{ \"object\": … }: the object for this event type."
    }
  },
  "required": [
    "id",
    "type",
    "created",
    "data"
  ]
}
