> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# BulkCreateMediaUploads

# Package: googleBusinessProfile

# Namespace: MediaUploadService

# Method link: https://dev.wix.com/docs/api-reference/business-management/google-business-profile/media-upload-v1/bulk-create-media-uploads.md

## Permission Scopes:
Manage SEO Settings: SCOPE.PROMOTE.MANAGE-SEO

## Introduction

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.

---

## REST API

### Schema

```
 Method: bulkCreateMediaUploads
 Description: 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.
 URL: https://www.wixapis.com/gbp/v1/bulk/media-uploads/create
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  mediaUploads
 Method parameters: 
   param name: mediaUploads | type: array<mediaUploads> | description: Photo changes to queue. All must share one `locationId` and one `operation`.  Per item set `locationId`, `operation`, `slotKey`, and then either `sourceUrl`, `category` and `format` to add, or `mediaKey` to remove. Every other field is assigned by the server and ignored if you send it.  Up to 52 items: 50 gallery photos plus a logo and a cover. | required: true | validation: minItems 1, maxItems 52
              - name: locationId | type: string | description: GUID of the location this change applies to. This is Google's location identifier.  | validation: minLength 1, maxLength 255, immutable
              - name: slotKey | type: string | description: Your own key for this photo: `logo`, `cover`, or `photo:<id>`.  Set it to something stable and meaningful to you. It's how a failure is matched back to the photo that caused it, and it's part of what makes a repeated submission a duplicate rather than a second change.  | validation: maxLength 255
              - name: sourceUrl | type: string | description: Publicly reachable URL Google fetches the image from. Additions only.  Keep it reachable well beyond the upload itself. A failure report renders this URL as a thumbnail, possibly weeks later.  | validation: maxLength 2048
              - name: category | type: MediaCategory | description: Where the photo appears on the profile. Additions only.  
                     - enum:
                     -     COVER: The banner image at the top of the profile. One per location.
                     -     PROFILE: The profile image shown alongside the business name.
                     -     LOGO: The business's logo. One per location.
                     -     EXTERIOR: The outside of the premises, including the storefront.
                     -     INTERIOR: The inside of the premises.
                     -     PRODUCT: A product the business sells.
                     -     AT_WORK: The team at work, such as staff serving customers.
                     -     FOOD_AND_DRINK: Food or drink the business serves.
                     -     MENU: The menu, for a business that serves food or drink.
                     -     COMMON_AREA: A shared space, such as a lobby or a waiting area.
                     -     ROOMS: Guest rooms, for accommodation businesses.
                     -     TEAMS: The people who work at the business.
                     -     ADDITIONAL: Anything that doesn't fit the other categories. This is the default for a gallery photo.
              - name: format | type: MediaFormat | description: Media type of the photo. Additions only.  
                     - enum: PHOTO, VIDEO
              - name: operation | type: MediaUploadOperation | description: Whether this change adds a photo to the profile or removes one.  
                     - enum:
                     -     CREATE: Add a photo to the profile.
                     -     DELETE: Remove a photo from the profile.
              - name: mediaKey | type: string | description: Google's identifier for the photo to remove. Removals only.  | validation: maxLength 255
   param name: returnEntity | type: returnEntity | description: Whether to return each queued item in `results.item`.  
 Return type: BulkCreateMediaUploadsResponse
  - name: results | type: array<BulkCreateMediaUploadResult> | description: Results in the order the items were sent. An item that was already queued is reported as a success carrying the existing item's `id`.  | validation: minItems 1, maxItems 52
     - name: itemMetadata | type: ItemMetadata | description: Whether this item was queued, and why not if it wasn't.  
        - name: id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: MediaUpload | description: The queued item. Returned only when `returnEntity` is `true`.  
        - name: id | type: string | description: Queued change GUID.  | read-only: true | validation: format GUID
        - name: locationId | type: string | description: GUID of the location this change applies to. This is Google's location identifier.  | validation: minLength 1, maxLength 255, immutable
        - name: batchId | type: string | description: Groups the changes queued by one Bulk Create Media Uploads call. Useful for troubleshooting, since one save can produce more than one batch.  | read-only: true | validation: format GUID
        - name: slotKey | type: string | description: Your own key for this photo: `logo`, `cover`, or `photo:<id>`.  Set it to something stable and meaningful to you. It's how a failure is matched back to the photo that caused it, and it's part of what makes a repeated submission a duplicate rather than a second change.  | validation: maxLength 255
        - name: sourceUrl | type: string | description: Publicly reachable URL Google fetches the image from. Additions only.  Keep it reachable well beyond the upload itself. A failure report renders this URL as a thumbnail, possibly weeks later.  | validation: maxLength 2048
        - name: category | type: MediaCategory | description: Where the photo appears on the profile. Additions only.  
             - enum:
             -     COVER: The banner image at the top of the profile. One per location.
             -     PROFILE: The profile image shown alongside the business name.
             -     LOGO: The business's logo. One per location.
             -     EXTERIOR: The outside of the premises, including the storefront.
             -     INTERIOR: The inside of the premises.
             -     PRODUCT: A product the business sells.
             -     AT_WORK: The team at work, such as staff serving customers.
             -     FOOD_AND_DRINK: Food or drink the business serves.
             -     MENU: The menu, for a business that serves food or drink.
             -     COMMON_AREA: A shared space, such as a lobby or a waiting area.
             -     ROOMS: Guest rooms, for accommodation businesses.
             -     TEAMS: The people who work at the business.
             -     ADDITIONAL: Anything that doesn't fit the other categories. This is the default for a gallery photo.
        - name: format | type: MediaFormat | description: Media type of the photo. Additions only.  
             - enum: PHOTO, VIDEO
        - name: operation | type: MediaUploadOperation | description: Whether this change adds a photo to the profile or removes one.  
             - enum:
             -     CREATE: Add a photo to the profile.
             -     DELETE: Remove a photo from the profile.
        - name: sequence | type: integer | description: Position in the order the queue applies changes, assigned by the server.  Every removal comes before every addition, because Google rejects new photos on a profile that's already at its limit, so the old ones have to go first. Additions then follow as logo, cover, and gallery in the order given.  | read-only: true 
        - name: state | type: MediaUploadState | description: Whether this change is waiting, being applied, or has failed.  | read-only: true 
             - enum:
             -     PENDING: Waiting its turn in the queue.
             -     UPLOADING: Being applied to Google now. A change that stays here isn't one that never ran: its outcome isn't known yet.
             -     FAILED: Failed, and won't be retried. Kept until replaced or dismissed.
        - name: attempts | type: integer | description: How many times this change has been attempted.  | read-only: true 
        - name: mediaKey | type: string | description: Google's identifier for the photo to remove. Removals only.  | validation: maxLength 255
        - name: failure | type: MediaUploadFailure | description: Why this change failed. Present only when `state` is `FAILED`.  | read-only: true 
           - name: reason | type: MediaUploadFailureReason | description: Why the change failed, in terms you can show a site owner.  
                 - enum:
                 -     IMAGE_TOO_SMALL: Below Google's minimum dimensions.
                 -     ASPECT_RATIO_REJECTED: Cover/logo ratio outside Google's accepted range.
                 -     FORMAT_UNSUPPORTED: File type Google will not accept.
                 -     SOURCE_UNREACHABLE: Google could not fetch the image URL.
                 -     PERMISSION_REVOKED: Access to the Google account was lost. The site owner needs to connect again.
                 -     RATE_LIMIT_EXHAUSTED: Google was still rate limiting after the queue used up its retries.
                 -     UPLOAD_UNVERIFIED: The change may or may not have reached Google, and the queue chose not to risk a duplicate by trying again. Additions only.  Unlike every other reason here, this doesn't say anything is wrong with the photo. It says the outcome couldn't be confirmed. Word it for the site owner that way: "we couldn't confirm this photo was added", not "this photo was rejected".
        - name: createdDate | type: string | description: Date and time the change was queued.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the change was last updated.  | read-only: true | validation: format date-time
        - name: revision | type: string | description: Revision number, incremented on every update.  | read-only: true 
  - name: bulkActionMetadata | type: BulkActionMetadata | description: How many items succeeded and failed.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MEDIA_UPLOAD_INVALID_SOURCE_URL | Description: none


```

### Examples

### Queue a logo, a cover, and a gallery photo for one location
Queues three additions and returns immediately, without calling Google. Poll List Media Uploads to follow progress.

```curl
curl -X POST \
'https://www.wixapis.com/gbp/v1/bulk/media-uploads/create' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "mediaUploads": [
    {
      "locationId": "locations/8117348495523092385",
      "slotKey": "logo",
      "sourceUrl": "https://static.wixstatic.com/media/bakery-logo.png",
      "category": "LOGO",
      "format": "PHOTO",
      "operation": "CREATE"
    },
    {
      "locationId": "locations/8117348495523092385",
      "slotKey": "cover",
      "sourceUrl": "https://static.wixstatic.com/media/bakery-storefront.jpg",
      "category": "COVER",
      "format": "PHOTO",
      "operation": "CREATE"
    },
    {
      "locationId": "locations/8117348495523092385",
      "slotKey": "photo:a3f8c112",
      "sourceUrl": "https://static.wixstatic.com/media/bakery-counter.jpg",
      "category": "INTERIOR",
      "format": "PHOTO",
      "operation": "CREATE"
    }
  ],
  "returnEntity": true
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.gbp.mediaUploads.bulkCreateMediaUploads(mediaUploads, options)
 Description: 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.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  mediaUploads
 Method parameters: 
   param name: mediaUploads | type: array<array> | description: Photo changes to queue. All must share one `locationId` and one `operation`.  Per item set `locationId`, `operation`, `slotKey`, and then either `sourceUrl`, `category` and `format` to add, or `mediaKey` to remove. Every other field is assigned by the server and ignored if you send it.  Up to 52 items: 50 gallery photos plus a logo and a cover. | required: true | validation: minItems 1, maxItems 52
              - name: locationId | type: string | description: GUID of the location this change applies to. This is Google's location identifier.  | validation: minLength 1, maxLength 255, immutable
              - name: slotKey | type: string | description: Your own key for this photo: `logo`, `cover`, or `photo:<id>`.  Set it to something stable and meaningful to you. It's how a failure is matched back to the photo that caused it, and it's part of what makes a repeated submission a duplicate rather than a second change.  | validation: maxLength 255
              - name: sourceUrl | type: string | description: Publicly reachable URL Google fetches the image from. Additions only.  Keep it reachable well beyond the upload itself. A failure report renders this URL as a thumbnail, possibly weeks later.  | validation: maxLength 2048
              - name: category | type: MediaCategory | description: Where the photo appears on the profile. Additions only.  
                     - enum:
                     -     COVER: The banner image at the top of the profile. One per location.
                     -     PROFILE: The profile image shown alongside the business name.
                     -     LOGO: The business's logo. One per location.
                     -     EXTERIOR: The outside of the premises, including the storefront.
                     -     INTERIOR: The inside of the premises.
                     -     PRODUCT: A product the business sells.
                     -     AT_WORK: The team at work, such as staff serving customers.
                     -     FOOD_AND_DRINK: Food or drink the business serves.
                     -     MENU: The menu, for a business that serves food or drink.
                     -     COMMON_AREA: A shared space, such as a lobby or a waiting area.
                     -     ROOMS: Guest rooms, for accommodation businesses.
                     -     TEAMS: The people who work at the business.
                     -     ADDITIONAL: Anything that doesn't fit the other categories. This is the default for a gallery photo.
              - name: format | type: MediaFormat | description: Media type of the photo. Additions only.  
                     - enum: PHOTO, VIDEO
              - name: operation | type: MediaUploadOperation | description: Whether this change adds a photo to the profile or removes one.  
                     - enum:
                     -     CREATE: Add a photo to the profile.
                     -     DELETE: Remove a photo from the profile.
              - name: mediaKey | type: string | description: Google's identifier for the photo to remove. Removals only.  | validation: maxLength 255
   param name: options | type: BulkCreateMediaUploadsOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return each queued item in `results.item`.  
 Return type: PROMISE<BulkCreateMediaUploadsResponse>
  - name: results | type: array<BulkCreateMediaUploadResult> | description: Results in the order the items were sent. An item that was already queued is reported as a success carrying the existing item's `id`.  | validation: minItems 1, maxItems 52
     - name: itemMetadata | type: ItemMetadata | description: Whether this item was queued, and why not if it wasn't.  
        - name: _id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: MediaUpload | description: The queued item. Returned only when `returnEntity` is `true`.  
        - name: _id | type: string | description: Queued change GUID.  | read-only: true | validation: format GUID
        - name: locationId | type: string | description: GUID of the location this change applies to. This is Google's location identifier.  | validation: minLength 1, maxLength 255, immutable
        - name: batchId | type: string | description: Groups the changes queued by one Bulk Create Media Uploads call. Useful for troubleshooting, since one save can produce more than one batch.  | read-only: true | validation: format GUID
        - name: slotKey | type: string | description: Your own key for this photo: `logo`, `cover`, or `photo:<id>`.  Set it to something stable and meaningful to you. It's how a failure is matched back to the photo that caused it, and it's part of what makes a repeated submission a duplicate rather than a second change.  | validation: maxLength 255
        - name: sourceUrl | type: string | description: Publicly reachable URL Google fetches the image from. Additions only.  Keep it reachable well beyond the upload itself. A failure report renders this URL as a thumbnail, possibly weeks later.  | validation: maxLength 2048
        - name: category | type: MediaCategory | description: Where the photo appears on the profile. Additions only.  
             - enum:
             -     COVER: The banner image at the top of the profile. One per location.
             -     PROFILE: The profile image shown alongside the business name.
             -     LOGO: The business's logo. One per location.
             -     EXTERIOR: The outside of the premises, including the storefront.
             -     INTERIOR: The inside of the premises.
             -     PRODUCT: A product the business sells.
             -     AT_WORK: The team at work, such as staff serving customers.
             -     FOOD_AND_DRINK: Food or drink the business serves.
             -     MENU: The menu, for a business that serves food or drink.
             -     COMMON_AREA: A shared space, such as a lobby or a waiting area.
             -     ROOMS: Guest rooms, for accommodation businesses.
             -     TEAMS: The people who work at the business.
             -     ADDITIONAL: Anything that doesn't fit the other categories. This is the default for a gallery photo.
        - name: format | type: MediaFormat | description: Media type of the photo. Additions only.  
             - enum: PHOTO, VIDEO
        - name: operation | type: MediaUploadOperation | description: Whether this change adds a photo to the profile or removes one.  
             - enum:
             -     CREATE: Add a photo to the profile.
             -     DELETE: Remove a photo from the profile.
        - name: sequence | type: integer | description: Position in the order the queue applies changes, assigned by the server.  Every removal comes before every addition, because Google rejects new photos on a profile that's already at its limit, so the old ones have to go first. Additions then follow as logo, cover, and gallery in the order given.  | read-only: true 
        - name: state | type: MediaUploadState | description: Whether this change is waiting, being applied, or has failed.  | read-only: true 
             - enum:
             -     PENDING: Waiting its turn in the queue.
             -     UPLOADING: Being applied to Google now. A change that stays here isn't one that never ran: its outcome isn't known yet.
             -     FAILED: Failed, and won't be retried. Kept until replaced or dismissed.
        - name: attempts | type: integer | description: How many times this change has been attempted.  | read-only: true 
        - name: mediaKey | type: string | description: Google's identifier for the photo to remove. Removals only.  | validation: maxLength 255
        - name: failure | type: MediaUploadFailure | description: Why this change failed. Present only when `state` is `FAILED`.  | read-only: true 
           - name: reason | type: MediaUploadFailureReason | description: Why the change failed, in terms you can show a site owner.  
                 - enum:
                 -     IMAGE_TOO_SMALL: Below Google's minimum dimensions.
                 -     ASPECT_RATIO_REJECTED: Cover/logo ratio outside Google's accepted range.
                 -     FORMAT_UNSUPPORTED: File type Google will not accept.
                 -     SOURCE_UNREACHABLE: Google could not fetch the image URL.
                 -     PERMISSION_REVOKED: Access to the Google account was lost. The site owner needs to connect again.
                 -     RATE_LIMIT_EXHAUSTED: Google was still rate limiting after the queue used up its retries.
                 -     UPLOAD_UNVERIFIED: The change may or may not have reached Google, and the queue chose not to risk a duplicate by trying again. Additions only.  Unlike every other reason here, this doesn't say anything is wrong with the photo. It says the outcome couldn't be confirmed. Word it for the site owner that way: "we couldn't confirm this photo was added", not "this photo was rejected".
        - name: _createdDate | type: Date | description: Date and time the change was queued.  | read-only: true 
        - name: _updatedDate | type: Date | description: Date and time the change was last updated.  | read-only: true 
        - name: revision | type: string | description: Revision number, incremented on every update.  | read-only: true 
  - name: bulkActionMetadata | type: BulkActionMetadata | description: How many items succeeded and failed.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MEDIA_UPLOAD_INVALID_SOURCE_URL | Description: none


```

### Examples

### Queue a logo, a cover, and a gallery photo for one location
Returns immediately without calling Google. Poll List Media Uploads to follow progress.

```javascript
import { mediaUploads } from "@wix/gbp";

async function bulkCreateMediaUploads() {
  const response = await mediaUploads.bulkCreateMediaUploads(
    [
      {
        locationId: "locations/8117348495523092385",
        slotKey: "logo",
        sourceUrl: "https://static.wixstatic.com/media/bakery-logo.png",
        category: "LOGO",
        format: "PHOTO",
        operation: "CREATE",
      },
      {
        locationId: "locations/8117348495523092385",
        slotKey: "cover",
        sourceUrl: "https://static.wixstatic.com/media/bakery-storefront.jpg",
        category: "COVER",
        format: "PHOTO",
        operation: "CREATE",
      },
      {
        locationId: "locations/8117348495523092385",
        slotKey: "photo:a3f8c112",
        sourceUrl: "https://static.wixstatic.com/media/bakery-counter.jpg",
        category: "INTERIOR",
        format: "PHOTO",
        operation: "CREATE",
      },
    ],
    { returnEntity: true },
  );
}

/* Promise resolves to:
 * {
 *   "results": [
 *     {
 *       "itemMetadata": {
 *         "_id": "c41d9f7e-5a02-4be6-9d18-7f2b1c0e34aa",
 *         "originalIndex": 0,
 *         "success": true
 *       },
 *       "item": {
 *         "_id": "c41d9f7e-5a02-4be6-9d18-7f2b1c0e34aa",
 *         "locationId": "locations/8117348495523092385",
 *         "batchId": "e0b2745c-9f31-4a8d-b6c7-1d4e58a9f302",
 *         "slotKey": "logo",
 *         "sourceUrl": "https://static.wixstatic.com/media/bakery-logo.png",
 *         "category": "LOGO",
 *         "format": "PHOTO",
 *         "operation": "CREATE",
 *         "sequence": 1000,
 *         "state": "PENDING",
 *         "attempts": 0,
 *         "_createdDate": "2026-08-24T09:15:22.481Z",
 *         "_updatedDate": "2026-08-24T09:15:22.481Z",
 *         "revision": "1"
 *       }
 *     },
 *     {
 *       "itemMetadata": {
 *         "_id": "7b6a2e10-84cf-4d95-a0e3-52c9b7d16f48",
 *         "originalIndex": 1,
 *         "success": true
 *       },
 *       "item": {
 *         "_id": "7b6a2e10-84cf-4d95-a0e3-52c9b7d16f48",
 *         "locationId": "locations/8117348495523092385",
 *         "batchId": "e0b2745c-9f31-4a8d-b6c7-1d4e58a9f302",
 *         "slotKey": "cover",
 *         "sourceUrl": "https://static.wixstatic.com/media/bakery-storefront.jpg",
 *         "category": "COVER",
 *         "format": "PHOTO",
 *         "operation": "CREATE",
 *         "sequence": 1001,
 *         "state": "PENDING",
 *         "attempts": 0,
 *         "_createdDate": "2026-08-24T09:15:22.481Z",
 *         "_updatedDate": "2026-08-24T09:15:22.481Z",
 *         "revision": "1"
 *       }
 *     }
 *   ],
 *   "bulkActionMetadata": {
 *     "totalSuccesses": 3,
 *     "totalFailures": 0,
 *     "undetailedFailures": 0
 *   }
 * }
 */

```

### bulkCreateMediaUploads (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { mediaUploads } from '@wix/gbp';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { mediaUploads },
  // Include the auth strategy and host as relevant
});


async function bulkCreateMediaUploads(mediaUploads,options) {
  const response = await myWixClient.mediaUploads.bulkCreateMediaUploads(mediaUploads,options);
};
```

---