Skip to main content

Upload Customer Review Media (v1)

Method & Path

POST /api/v1/workspace/:workspaceId/storefront/content-pages/:pageId/customer-review-media

Actual backend path: /v1/workspace/:workspaceId/storefront/content-pages/:pageId/customer-review-media

Description

Upload an image or video for a storefront customer-reviews content page (e.g. WhatsApp screenshot testimonials). The file is stored in workspace storage and a public URL is returned. Add the returned url and kind to the page’s customerReviewGallery via PATCH on the same content page (replace or extend the array as needed).

Authentication

Required: Workspace JWT (Authorization: Bearer …).

Persona / permissions

  • Workspace Owner and Staff with permission store.manage may call this endpoint.

Headers

HeaderRequiredDescription
AuthorizationYesBearer workspace token
Content-TypeYesmultipart/form-data

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace id
pageIdstringYesContent page id (must be type customer-reviews)

Request Body

Multipart form field:

FieldTypeRequiredDescription
filefileYesImage (PNG, JPEG, WebP, max 5 MB after validation) or video (MP4, WebM, QuickTime, AVI, max 100 MB)

Response 201 Created

{
"url": "https://storage.googleapis.com/bucket/workspaces/.../review-image-....webp",
"kind": "image"
}

For video uploads, kind is "video" and url points to the uploaded video file.

Common Errors

  • 400 Bad Request: Missing file; page is not customer-reviews; invalid page id
  • 401 Unauthorized: Missing or invalid token
  • 403 Forbidden: Missing store.manage
  • 404 Not Found: Content page or store not found
  • 413 Payload Too Large: File exceeds size limit
  • 415 Unsupported Media Type: MIME type not allowed (multer / service validation)
  • 422 Unprocessable Entity: Image/video validation failed (e.g. oversized image)
  • 500 Internal Server Error: Storage or processing failure