POST

Create Media


Developer Preview

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

Adds a media item to a location.

Specify sourceUrl, a publicly reachable URL that Google fetches the image from. The URL has to stay reachable until Google has fetched it. Returns the created item, including the media key needed to delete it.

Two things to plan for:

  • Google doesn't deduplicate by URL. Calling this twice with the same sourceUrl creates two media items, so track what you've already added.
  • Google allows about 10 edits per minute per Business Profile, and that budget covers every write to the profile: adding and deleting media, but also Update Google Location and Update Location Attributes. Interleaving those with media writes brings the 429 closer, so pace the profile as a whole rather than each method separately. Treat a 429 as worth retrying after a delay rather than as a rejection of the image.

Errors:

  • NOT_FOUND: the location isn't recorded for this site. Google isn't called.
  • GOOGLE_API_CALL_FAILED: the call to Google failed. Google's status and response are in the error payload.
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/locations/{locationId}/media

Errors
500Internal

There is 1 error with this status code.

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

Did this help?