{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkbreakers-com/json-schema/linkbreakers-com-import-media-request-schema.json",
  "title": "Request to import a 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/ImportMediaRequest",
  "properties": {
    "assistantAttachmentId": {
      "description": "The id of a file the caller attached to their own Assistant conversation. Attachments are\nshort-lived and belong to the member who attached them, in that workspace.",
      "type": "string"
    },
    "fileName": {
      "description": "The name shown in the media library and as the file name visitors download. Empty takes the\nattachment's name, or the last segment of the URL's path.",
      "type": "string"
    },
    "uploadedFrom": {
      "$ref": "#/$defs/MediaUploadOrigin",
      "description": "Where the media was imported from, information only. Unset means UPLOAD_ORIGIN_ASSISTANT for an\nattachment and UPLOAD_ORIGIN_MEDIA_LIBRARY for a URL."
    },
    "url": {
      "description": "A public https URL the file is downloaded from, on port 443. Redirects are followed only to\nother public https URLs, at most five. The file's kind is read from its bytes.",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "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"
    }
  }
}