POST

Bulk Create Media Uploads


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Queues photo changes for one location and returns without calling Google.

Every item must target the same locationId, and one call has to be either all additions or all removals. Send two calls to do both.

To add a photo, set slotKey, sourceUrl, category and format. To remove one, set slotKey and mediaKey. Everything else is assigned by the server.

sourceUrl has to stay reachable well after this call returns, not just until it does. Google fetches the image when the queue reaches it, which may be minutes later, and a failure report renders the same URL as a thumbnail possibly weeks later.

Queuing clears the location's previous failures. Every failed item for the location goes, not just the ones matching what you're sending, so a site owner only ever sees the most recent set and retrying failures is just another call to this method carrying those items.

That clearing isn't scoped to you. If another app manages the same location, queuing here discards failures it may not have read yet, and vice versa. Read List Media Uploads before queuing if you need to preserve them.

Duplicates are dropped rather than queued twice, so a double click or a client retry won't add the same photo twice. An item that's already queued comes back as a success carrying the existing item's id. Google doesn't deduplicate by URL itself, so this is what protects you from a double post.

The server decides the order, not the order you send. Every removal is applied before any addition, because Google rejects new photos on a profile that's already at its limit. Additions then go logo, cover, and gallery in the order given.

Errors, and in every case nothing is queued:

  • NOT_FOUND: the location isn't recorded for this site.
  • INVALID_ARGUMENT: items span more than one location, an item has no operation set, additions and removals are mixed in one call, an addition has no sourceUrl, or a removal has no mediaKey.
  • MEDIA_UPLOAD_INVALID_SOURCE_URL: an addition's sourceUrl isn't an absolute http or https URL with a host. Checked here rather than left to fail against Google minutes later.
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage SEO Settings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/gbp/v1/bulk/media-uploads/create

Errors
400Invalid Argument

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?