Skip to content

Upload a product image

POST
/api/v1/workspaces/{workspaceId}/media/product-images
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/example/media/product-images \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Returns a URL to put in a product’s media. The format is read from the file.

workspaceId
required
string
Media typemultipart/form-data
object
file
required

JPEG, PNG, WebP or GIF

string format: binary
Media typeapplication/json
object
url
required

Use it as a product media url

string
contentType
required
string
Allowed values: image/jpeg image/png image/webp image/gif
byteSize
required
number

Example

{
"contentType": "image/jpeg"
}