Skip to main content

Update Media

Update metadata of an existing media asset in the authenticated workspace. Only the fields provided in the request will be updated.

Endpoint

POST media/update

Authentication

Include your Enterprise API credentials in the request headers:

sivi-api-key: YOUR_API_KEY

Request Body Example

{
"mId": "w_abc123----photo_001.jpeg",
"touchPosition": {
"center": true,
"bottom": true
},
"imagePreference": {
"crop": true,
"removeBg": true,
"enhancement": false
},
"hueRotations": []
}

Request Parameters

ParameterTypeRequiredDescription
mIdStringYesMedia ID to update
touchPositionObjectNoUpdated touch position flags
touchPosition.leftBooleanNoLeft touch position
touchPosition.rightBooleanNoRight touch position
touchPosition.bottomBooleanNoBottom touch position
touchPosition.topBooleanNoTop touch position
touchPosition.centerBooleanNoCenter touch position
imagePreferenceObjectNoUpdated image processing preferences
imagePreference.cropBooleanNoEnable crop
imagePreference.removeBgBooleanNoEnable background removal
imagePreference.enhancementBooleanNoEnable image enhancement
hueRotationsArrayNoUpdated list of hue rotation values
abstractUserIdStringNoUnique identifier for the user (Enterprise/Super API only)

Response

Success Response (200 OK)

{
"status": 200,
"body": {
"media": {
"mId": "w_abc123----photo_001.jpeg",
"bId": "b_s87vFxpfM0R",
"type": "photo",
"subType": "photograph",
"system": "USER",
"url": "photo_001.jpeg",
"createdOn": 1715000000,
"meta": {
"touchPosition": {
"left": false,
"right": false,
"bottom": true,
"top": false,
"center": true
},
"imagePreference": {
"crop": true,
"removeBg": true,
"enhancement": false
},
"hueRotations": [],
"logoStyle": []
}
}
}
}

Error Responses

Media Not Found (404 Not Found)

{
"status": 404,
"body": {
"message": "Media not found: w_abc123----photo_001.jpeg"
}
}

Unauthorized (401 Unauthorized)

{
"status": 401,
"body": {
"message": "Media does not belong to this workspace: w_abc123----photo_001.jpeg"
}
}

Invalid Input (422 Unprocessable Entity)

{
"status": 422,
"body": {
"message": "Invalid input"
}
}

Server Error (500 Internal Server Error)

{
"status": 500,
"body": {
"message": "Server internal error"
}
}

Usage Notes

  • The media must belong to the authenticated workspace
  • Only provided fields will be updated; omit fields you don't want to change
  • touchPosition and imagePreference are merged with existing values, not replaced entirely