Parameters

media
array
Required
Description
Array of media and folder objects to create.
items
dictionary
media[]
dictionary
type
number
Required
Description
Resource type: `1` for media/file, `2` for folder.
parent
number
Required
Description
Parent folder ID (`0` for root).
name
string
Description
Display name of the media asset or folder.
url
string
Description
Public or private storage URL of the file (required for files, empty string for folders).
mime_type
string
Description
MIME type of the asset (e.g. `image/jpeg`, `image/png`, `video/mp4`).
POST/v1/media
curl https://api.tradly.app/v1/media \
  -H "Authorization: Bearer YOUR_PUBLISHABLE_OR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{
  "media": [
    {
      "type": 1,
      "parent": 0,
      "name": "hero-image.jpg",
      "url": "https://media.tradly.app/images/marketplace/1000/hero-image.jpg",
      "mime_type": "image/jpeg"
    },
    {
      "type": 2,
      "parent": 0,
      "name": "Product Photos",
      "url": "",
      "mime_type": ""
    }
  ]
}'
RESPONSE
{
  "status": true,
  "data": {}
}