{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lettrove-com/json-schema/lettrove-com-export-request-schema.json",
  "title": "ExportRequest",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lettrove-com-openapi.json#/components/schemas/ExportRequest",
  "type": "object",
  "properties": {
    "user": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "description": "Your own id for the person: whatever you chose, up to 256 characters. Never a name or an email."
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "description": "Whose design it is. Another person's design is not found."
    },
    "merge": {
      "$ref": "#/$defs/Merge"
    },
    "text": {
      "$ref": "#/$defs/TextOptions"
    },
    "format": {
      "description": "`html` (the default) answers with the HTML; `pdf`, `png` or `zip` with a file kept for a URL.",
      "type": "string",
      "enum": [
        "html",
        "zip",
        "pdf",
        "png"
      ]
    },
    "fullPage": {
      "description": "With `png`: the whole design (`true`, the default) or the first screen only.",
      "type": "boolean"
    }
  },
  "required": [
    "user"
  ],
  "additionalProperties": false,
  "$defs": {
    "Merge": {
      "type": "object",
      "properties": {
        "contact": {
          "description": "The values for `{{contact.<field>}}` tags, by field.",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "unsubscribeUrl": {
          "description": "Your unsubscribe link, for `{{unsubscribe_url}}`. Left out, the tag stays for your sending provider to fill.",
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        "preferencesUrl": {
          "description": "Your preferences link, for `{{preferences_url}}`. Left out, the tag stays.",
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        }
      },
      "additionalProperties": false,
      "description": "Merge tags to fill. A tag with no value stays as written and is listed in `mergeTags`."
    },
    "TextOptions": {
      "type": "object",
      "properties": {
        "links": {
          "description": "Each link's address after its text.",
          "type": "boolean"
        },
        "images": {
          "description": "Images' alt text.",
          "type": "boolean"
        },
        "preheader": {
          "description": "The preheader first.",
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "description": "How the plain-text version is written."
    }
  }
}