Upload an image (multipart 'file' or JSON base64) on behalf of an installed app.
POST
/apps/media/uploads
const url = 'https://your-store.myciqra.com/apps/media/uploads';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contentBase64":"example","fileName":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-store.myciqra.com/apps/media/uploads \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contentBase64": "example", "fileName": "example" }'Required scope: write_media — an installation token without it receives 403.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
contentBase64
required
null | string
fileName
required
null | string
Examplegenerated
{ "contentBase64": "example", "fileName": "example"}object
contentBase64
required
null | string
fileName
required
null | string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
contentType
required
string
fileName
required
string
height
required
null | integer | string format: int32
mediaAssetId
required
string format: uuid
sizeBytes
required
integer | string format: int64
storageKey
required
string
url
required
string
width
required
null | integer | string format: int32
Examplegenerated
{ "contentType": "example", "fileName": "example", "height": 1, "mediaAssetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sizeBytes": 1, "storageKey": "example", "url": "example", "width": 1}Bad Request
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}Conflict
Payload Too Large
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}