v1Resources/Media/postUpload a media asset

Upload a media asset

Adds a new photo or video to the agency's media library from a URL or base64-encoded payload, optionally scoped to an account, client, location, or brand.

post/api/v1/media/upload
media:write
Request body
urlstringoptional
A publicly reachable URL to fetch the asset from. Provide this or base64, not both.
base64stringoptional
The raw file contents, base64-encoded. Provide this or url, not both.
mimestringoptional
MIME type of the file, e.g. image/jpeg. Inferred when omitted.
filenamestringoptional
Original filename, used for display.
titlestringoptional
A human-readable title for the asset.
scopeTypestring (account | client | location | brand)optional
What this asset belongs to: account (agency-wide), client, location, or brand.
scopeIdstringoptional
The client or location id the asset is scoped to, when scopeType is client or location.
folderIdstringoptional
An existing asset folder to file this upload into.
tagsarray of stringoptional
Free-form tags to attach to the asset.
locationIdsarray of stringoptional
Additional locations to associate this asset with, beyond scopeId.
Response
dataobjectoptional
assetobjectoptional
keystringoptional
Composite identifier for the asset, formatted as "<source>:<id>".
sourcestringoptional
Where this asset originated (e.g. an OS upload vs. an imported source).
idstringoptional
The asset's id within its source.
titlestringoptional
The asset's title.
filenamestringoptional
The asset's original filename.
mimestringoptional
The asset's MIME type.
kindstringoptional
The asset's kind (photo or video).
sizeBytesnumberoptional
File size in bytes, or null when unknown.
urlstringoptional
Ready-to-use URL for the asset's bytes.
thumbnailUrlstringoptional
URL of a thumbnail preview, or null.
tagsarray of stringoptional
Tags attached to the asset.
folderIdsarray of stringoptional
Asset folders this asset belongs to.
locationIdsarray of stringoptional
Every location this asset is associated with.
Errors
400The request is missing a required parameter or is otherwise malformed.
401Missing, invalid, expired, or revoked API key.
403The key lacks the required scope, or isn't authorized for this client/location.
422The request is missing a required parameter or is otherwise malformed.
429Too many requests. Retry after the number of seconds in the Retry-After header.
post/api/v1/media/upload
Your API key
Request body
{
  "data": {
    "asset": {
      "key": "upload:ghi789",
      "source": "upload",
      "id": "ghi789",
      "title": "New storefront photo",
      "filename": "new-storefront.jpg",
      "mime": "image/jpeg",
      "kind": "image",
      "sizeBytes": 398211,
      "url": "https://cdn.synup.com/media/ghi789.jpg",
      "thumbnailUrl": "https://cdn.synup.com/media/ghi789-thumb.jpg",
      "tags": [],
      "folderIds": [],
      "locationIds": []
    }
  }
}