{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkbreakers-com/json-schema/linkbreakers-com-create-media-request-schema.json",
  "title": "Request to create a new media file",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkbreakers-com-media-api-openapi.yml#/components/schemas/CreateMediaRequest",
  "properties": {
    "fileData": {
      "description": "The file data to upload, at most 3 MB. It must be transmitted in a base64 string format when sending it through HTTP. Accepted formats are PNG, JPEG, WebP and SVG images, PDF documents and MP4 videos. Larger files go through CreateUpload.",
      "type": "string"
    },
    "fileName": {
      "title": "The name of the file",
      "type": "string"
    },
    "mediaType": {
      "$ref": "#/$defs/MediaType",
      "description": "Deprecated: an upload no longer needs to say what the media is for. Optional, accepted for\ncompatibility and recorded as uploaded_from when uploaded_from is not set; never validated against."
    },
    "uploadedFrom": {
      "$ref": "#/$defs/MediaUploadOrigin",
      "description": "Where the media was uploaded from, so pickers can show a section's own uploads first. It does not\nlimit where the media can be used; see references for where it is used. Unset means\nUPLOAD_ORIGIN_MEDIA_LIBRARY."
    },
    "usage": {
      "$ref": "#/$defs/MediaUsage",
      "description": "Deprecated: an upload no longer needs to say what the media is for, and this no longer limits the\nkinds or sizes accepted. Optional, accepted for compatibility and recorded as uploaded_from when\nuploaded_from is not set."
    },
    "visibility": {
      "$ref": "#/$defs/MediaVisibility",
      "description": "The visibility of the media.\n\nIf not provided, the media file will be private."
    }
  },
  "type": "object",
  "$defs": {
    "MediaType": {
      "default": "TYPE_UNSPECIFIED",
      "description": "Deprecated: the value recorded at upload, kept for older clients. See UploadOrigin.\n\n - TYPE_UNSPECIFIED: The media type is not specified\n - TYPE_CENTRAL_QRCODE_IMAGE: The media type is a central QR code image\n - TYPE_BACKGROUND_COVER: The media type is a background cover for page themes\n - TYPE_BADGE: The media type is a badge image for page themes\n - TYPE_FOOTER_LOGO: The media type is a footer logo shown at the bottom of page theme pages\n - TYPE_OPEN_MEDIA: The media is handed to visitors by an Open media workflow step",
      "enum": [
        "TYPE_UNSPECIFIED",
        "TYPE_CENTRAL_QRCODE_IMAGE",
        "TYPE_BACKGROUND_COVER",
        "TYPE_BADGE",
        "TYPE_FOOTER_LOGO",
        "TYPE_OPEN_MEDIA"
      ],
      "type": "string"
    },
    "MediaUploadOrigin": {
      "default": "UPLOAD_ORIGIN_UNSPECIFIED",
      "description": "UploadOrigin is where in the product a media item was uploaded from. It is information only, so\npickers can show a section's own uploads first; it never limits where the media can be used.\nTo add a place, add a value here (next number), map it in core, and pass it from the screen that uploads.\n\n - UPLOAD_ORIGIN_UNSPECIFIED: Not set. Uploads that do not say where they come from are recorded as UPLOAD_ORIGIN_MEDIA_LIBRARY.\n - UPLOAD_ORIGIN_MEDIA_LIBRARY: Uploaded from the media library itself\n - UPLOAD_ORIGIN_QR_CODE_LOGO: Uploaded while picking a QR code's logo\n - UPLOAD_ORIGIN_BACKGROUND_COVER: Uploaded while picking a page theme's background cover\n - UPLOAD_ORIGIN_BADGE: Uploaded while picking a page theme's badge\n - UPLOAD_ORIGIN_FOOTER_LOGO: Uploaded while picking a page theme's footer logo\n - UPLOAD_ORIGIN_OPEN_MEDIA: Uploaded while picking the media an Open media step opens\n - UPLOAD_ORIGIN_ASSISTANT: Imported by the Assistant, from a file attached to a conversation or a URL",
      "enum": [
        "UPLOAD_ORIGIN_UNSPECIFIED",
        "UPLOAD_ORIGIN_MEDIA_LIBRARY",
        "UPLOAD_ORIGIN_QR_CODE_LOGO",
        "UPLOAD_ORIGIN_BACKGROUND_COVER",
        "UPLOAD_ORIGIN_BADGE",
        "UPLOAD_ORIGIN_FOOTER_LOGO",
        "UPLOAD_ORIGIN_OPEN_MEDIA",
        "UPLOAD_ORIGIN_ASSISTANT"
      ],
      "type": "string"
    },
    "MediaUsage": {
      "default": "USAGE_UNSPECIFIED",
      "description": "Deprecated: the value recorded at upload, kept for older clients. It no longer limits anything. Uploads\naccept images (PNG, JPEG, WebP, SVG) up to 10 MB, PDF documents up to 25 MB and MP4 videos up to 50 MB,\nwhatever the usage. Where media is used is checked when it is attached: a QR code logo, background\ncover, badge or footer logo must be an image of at most 3 MB; an Open media step takes any media.\n\n - USAGE_UNSPECIFIED: Not set\n - USAGE_CENTRAL_QRCODE_IMAGE: The logo in the center of a QR code\n - USAGE_BACKGROUND_COVER: A page theme's background cover\n - USAGE_BADGE: A page theme's badge image\n - USAGE_FOOTER_LOGO: A page theme's footer logo\n - USAGE_OPEN_MEDIA: Media an Open media workflow step hands to visitors: a PDF menu or brochure, an image or an MP4 video",
      "enum": [
        "USAGE_UNSPECIFIED",
        "USAGE_CENTRAL_QRCODE_IMAGE",
        "USAGE_BACKGROUND_COVER",
        "USAGE_BADGE",
        "USAGE_FOOTER_LOGO",
        "USAGE_OPEN_MEDIA"
      ],
      "type": "string"
    },
    "MediaVisibility": {
      "default": "VISIBILITY_UNSPECIFIED",
      "description": "- VISIBILITY_UNSPECIFIED: Media visibility not specified\nThe media visibility is not specified\n - VISIBILITY_PUBLIC: The media visibility is public\n - VISIBILITY_PRIVATE: The media visibility is private",
      "enum": [
        "VISIBILITY_UNSPECIFIED",
        "VISIBILITY_PUBLIC",
        "VISIBILITY_PRIVATE"
      ],
      "title": "Visibility represents the visibility of a media file",
      "type": "string"
    }
  }
}