{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antwork-io/json-schema/antwork-io-media-upload-schema.json",
  "title": "MediaUpload",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antwork-io-media-api-openapi.yml#/components/schemas/MediaUpload",
  "type": "object",
  "required": [
    "object",
    "uploadUrl",
    "method",
    "expiresAt",
    "attachesTo",
    "maxBytes"
  ],
  "properties": {
    "object": {
      "const": "media_upload"
    },
    "uploadUrl": {
      "type": "string",
      "description": "PUT the raw bytes here, once. Its JSON answer has the `mediaId` and `url`."
    },
    "method": {
      "const": "PUT"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "Start the upload before this; a long upload may finish after it."
    },
    "attachesTo": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The posts the file is appended to when it lands."
    },
    "maxBytes": {
      "type": "integer"
    }
  }
}