{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lettrove-com/json-schema/lettrove-com-file-export-schema.json",
  "title": "As a file",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lettrove-com-openapi.json#/components/schemas/FileExport",
  "type": "object",
  "properties": {
    "exportId": {
      "type": "string",
      "description": "The export's record."
    },
    "designId": {
      "type": "string",
      "description": "The id Lettrove gave the design: 26 letters and digits."
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "description": "The saved revision; only ever goes up."
    },
    "mode": {
      "type": "string",
      "enum": [
        "email",
        "page",
        "popup",
        "document"
      ],
      "description": "What the design is: `email`, `page`, `popup` or `document`. A project makes one mode."
    },
    "format": {
      "type": "string",
      "enum": [
        "zip",
        "pdf",
        "png"
      ],
      "description": "The file it is."
    },
    "url": {
      "type": "string",
      "description": "Where to fetch the file."
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601, UTC."
        },
        {
          "type": "null"
        }
      ],
      "description": "When the URL stops working; `null` while it is kept."
    },
    "filename": {
      "type": "string",
      "description": "A safe file name from the design's name."
    },
    "bytes": {
      "type": "integer",
      "description": "Size of the file in bytes."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Things worth knowing, in words: an email past Gmail's clipping size, an inline image left inline."
    },
    "design": {
      "$ref": "#/$defs/DesignDocument"
    }
  },
  "required": [
    "exportId",
    "designId",
    "revision",
    "mode",
    "format",
    "url",
    "expiresAt",
    "filename",
    "bytes",
    "warnings",
    "design"
  ],
  "$defs": {
    "DesignDocument": {
      "type": "object",
      "additionalProperties": {},
      "description": "The design document. Store it as it is; what you may rely on inside it is on docs.lettrove.com/docs/1/api/design-document."
    }
  }
}