Skip to content
Documentation/OPEN API

Events & webhooks

Subscribe to folder events and send in-app notifications.

Last updated

Subscribe to folders

Endpoint: /folder-subscribe

Method: POST

Description: Subscribe to or unsubscribe from folder content updates.

Request parameters:

ParameterTypeRequiredDescription
-OpenApiSubReqYesSubscription parameters

OpenApiSubReq fields:

FieldTypeRequiredDescription
folderIdsList<Long>YesFolder IDs to subscribe to
callbackUrlStringYesCallback URL
eventTypeStringNoCallback event type; default FOLDER_CONTENT_UPDATE
operationStringNoADD to subscribe, DELETE to unsubscribe; default ADD

Response fields:

ParameterTypeDescription
-BooleanWhether the operation succeeded

Example:

Request example:

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/folder-subscribe' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"folderIds": [100, 101, 102],
"callbackUrl": "https://example.com/api/callback",
"eventType": "FOLDER_CONTENT_UPDATE",
"operation": "ADD"
}'

Response example:

json
{
"code": "0",
"message": "OK",
"result": true,
"traceId": "1753698709474457484"
}

Callback events

When a subscribed folder changes, the service sends a POST request to the callback URL with the following fields:

FieldTypeRequiredDescriptionNotes / example
eventTypeStringYesFolder content change event identifierDefault: FOLDER_CONTENT_UPDATE
folderIdLongYesChanged folder IDe.g. 123456789
eventTimeStringYesEvent timeISO8601 recommended: 2026-03-05T12:34:56+08:00
typeStringYesChange typeADD, UPDATE or DELETE
assetsList<MaterialCallbackDTO>YesAssets affected by the changeDELETE may contain only identifiers; other events should include full details
orgIdLongNoOrganization ID identifying the event sourcee.g. 10001; may be optional when inferable from context

MaterialCallbackDTO fields

FieldTypeRequiredDescriptionNotes / example
idLongYesAsset IDe.g. 987654321
parentIdsList<Long>YesParent folder path, from root to current parente.g. [1, 23, 456]
userIdStringYesUser who triggered the changee.g. "10001"
nameStringYesOriginal filenamee.g. "brand-poster_v1.psd"
downloadUrlStringYesAuthorized direct or temporary download URLe.g. https://example.com/download/xxx
sourceIntegerYesAsset source1 web, 2 upload, 3 copy
linkStringNoRelated source webpage or external URLe.g. a landing page or original webpage
extensionStringYesExtension without a leading dote.g. jpg, mp4, psd
durationLongNoVideo/audio duration in seconds120 means 120 seconds; other files may return null or 0
sizeLongYesFile size in KB2048 is approximately 2 MB
widthIntegerNoMedia width in pixelse.g. 1920; may be null for other file types
heightIntegerNoMedia height in pixelse.g. 1080; may be null for other file types
descriptionStringNoAsset description or notese.g. Spring 2026 campaign visual
scoreIntegerNoAsset ratingUsually 1–5; confirm the agreed range
createUserStringNoOriginal creator, which may differ from the event initiatorOriginal uploader user ID

Callback example:

json
{
"eventType": "FOLDER_CONTENT_UPDATE",
"folderId": 23102,
"eventTime": "1753946835010",
"type": "UPDATE",
"assets": [
{
"id": 6906970,
"parentIds": [],
"userId": "1673603133161799680",
"name": "Ocean predators: dolphins chasing fish",
"downloadUrl": null,
"source": 2,
"link": null,
"extension": "rm",
"duration": null,
"size": null,
"width": null,
"height": null,
"description": "11",
"score": null,
"createUser": "1673603133161799680"
}
]
}

Subscribe to asset events

Note: This is separate from folder subscriptions (folder-subscribe / FOLDER_CONTENT_UPDATE). Subscribe at organization level; events are delivered asynchronously via POST to callbackUrl. Notifications do not block or modify asset ingestion.

List available event types

Endpoint: /material-automation-event-types

Method: GET

Description: Return available event types and whether the current API Key subscribes to each type.

Response: A list with these fields:

FieldTypeDescription
codeStringEvent code to use in eventTypes
descStringDescription in Chinese
needsConfigBooleanWhether config is required; false for currently available events
subscribedBooleanWhether this API Key has an active subscription

Request example:

bash
curl --location --request GET 'https://open.musedam.ai/api/muse/material-automation-event-types' \
--header 'Authorization: Bearer your_api_key'

Subscribe or unsubscribe

Endpoint: /material-automation-subscribe

Method: POST

Request parameters:

FieldTypeRequiredDescription
callbackUrlStringYesWebhook callback URL
eventTypesList<String>YesEvent types from the table below; multiple types supported
operationStringNoADD to subscribe (default), DELETE to unsubscribe

Available eventTypes:

eventTypeDescription
MATERIAL_INBOUND_COMPLETEDSent after successful asset ingestion; does not intercept ingestion
MATERIAL_ADDED_TO_FOLDERAssets added to folders through uploads or in-app/API actions; existing relationships do not trigger duplicate notifications
MATERIAL_METADATA_UPDATEDName, description, tags, owner or custom metadata changed
MATERIAL_VERSION_CHANGEDVersions added, set as cover or removed
MATERIAL_DELETEDAssets moved to the recycle bin or permanently deleted

Response: Boolean

Request example (subscribe):

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/material-automation-subscribe' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"callbackUrl": "https://your.app/webhook/material-events",
"eventTypes": [
"MATERIAL_INBOUND_COMPLETED",
"MATERIAL_ADDED_TO_FOLDER",
"MATERIAL_METADATA_UPDATED",
"MATERIAL_VERSION_CHANGED",
"MATERIAL_DELETED"
],
"operation": "ADD"
}'

Unsubscribe: Set operation to DELETE. Subscriptions are identified by the current API Key, callbackUrl and eventType; no subscriptionId is required.

Webhook callback: The service sends a POST request to callbackUrl with this body:

FieldTypeDescription
eventIdStringIdempotency event ID
eventTypeStringEvent type from the table above
eventTimeStringTimestamp in milliseconds, encoded as a string
payloadObjectEvent-specific payload; see below

Payload by event type:

eventTypePayload fields
MATERIAL_INBOUND_COMPLETEDsource (UPLOAD_ASSETS / PENDING_INBOUND_CONFIRM), initiatorUserId. Completed uploads: uploadResults, materialIds. Confirmed pending ingestion: pendingInboundIdToMaterialId
MATERIAL_ADDED_TO_FOLDERmaterialIds: cover asset IDs for newly created relationships; folderIds: destination folders
MATERIAL_METADATA_UPDATEDchangeType (BASIC / VALIDITY / TAGS / OWNER / METADATA / CUSTOM_FIELD), materialIds, materials[] containing only changed fields for this type; see below
MATERIAL_VERSION_CHANGEDcoverMaterialId, newMaterialId, action (ADD / SET_COVER / REPLACE_COVER_ON_UPLOAD / REMOVE); optional version. For REMOVE, coverMaterialId is the removed asset and newMaterialId is the latest asset remaining in that version chain. Optional removeType (ADD: move into the current folder; DELETE: move to recycle bin) and versionGroupDissolved
MATERIAL_DELETEDmaterialIds; deleteAction (RECYCLE / PERMANENT); optional top-level folderIds for folders deleted in the same batch; materials[] snapshots before deletion (name / materialType / extension / tagIds / tagNames / folderIds / ownerUserId / createUserId)

MATERIAL_METADATA_UPDATED materials[] by changeType:

changeTypeFields in each materials entry (included when populated)
BASICmaterialId; name / description / score / link supplied in this update
VALIDITYmaterialId;validityStatus;validityStatusName;daysToExpire;startTime;endTime;isPermanent
TAGSmaterialId;tagIds;tagNames
OWNERmaterialId (new asset ID after transfer); ownerUserId
METADATAmaterialId; optional recordId; metadata containing only custom fields created or updated in this operation
CUSTOM_FIELDmaterialId;customFields:[{ "templateId": ... }]

Callback examples: Each example is a complete POST body. Missing fields indicate unavailable values; allow optional fields rather than enforcing a fixed set of required properties.

MATERIAL_INBOUND_COMPLETED (upload successfully ingested):

json
{
"eventId": "evt_1753946835010_a1b2",
"eventType": "MATERIAL_INBOUND_COMPLETED",
"eventTime": "1753946835010",
"payload": {
"source": "UPLOAD_ASSETS",
"initiatorUserId": 10001,
"materialIds": [20001, 20002],
"uploadResults": [
{
"id": 20001,
"name": "spring-campaign.jpg",
"extension": "jpg",
"size": 204800,
"width": 1920,
"height": 1080,
"uploadStatus": 1
}
]
}
}

MATERIAL_ADDED_TO_FOLDER:

json
{
"eventId": "evt_1753946900001_c3d4",
"eventType": "MATERIAL_ADDED_TO_FOLDER",
"eventTime": "1753946900001",
"payload": {
"materialIds": [20001, 20002],
"folderIds": [30001]
}
}

MATERIAL_METADATA_UPDATED (changeType = BASIC; name, description and rating):

json
{
"eventId": "evt_1753947000002_e5f6",
"eventType": "MATERIAL_METADATA_UPDATED",
"eventTime": "1753947000002",
"payload": {
"changeType": "BASIC",
"materialIds": [20001],
"materials": [
{
"materialId": 20001,
"name": "spring-campaign_v2.jpg",
"description": "Spring 2026 key visual",
"score": 5
}
]
}
}

MATERIAL_METADATA_UPDATED (changeType = TAGS):

json
{
"eventId": "evt_1753947050003_g7h8",
"eventType": "MATERIAL_METADATA_UPDATED",
"eventTime": "1753947050003",
"payload": {
"changeType": "TAGS",
"materialIds": [20001],
"materials": [
{
"materialId": 20001,
"tagIds": [10837, 10838],
"tagNames": ["Product category", "Clothing and footwear"]
}
]
}
}

MATERIAL_VERSION_CHANGED (new version):

json
{
"eventId": "evt_1753947100004_i9j0",
"eventType": "MATERIAL_VERSION_CHANGED",
"eventTime": "1753947100004",
"payload": {
"coverMaterialId": 20001,
"newMaterialId": 20088,
"action": "ADD",
"version": 3
}
}

MATERIAL_DELETED (moved to recycle bin):

json
{
"eventId": "evt_1753947200005_k1l2",
"eventType": "MATERIAL_DELETED",
"eventTime": "1753947200005",
"payload": {
"materialIds": [20001],
"deleteAction": "RECYCLE",
"folderIds": [30001],
"materials": [
{
"materialId": 20001,
"name": "spring-campaign_v2.jpg",
"materialType": 1,
"extension": "jpg",
"tagIds": [10837, 10838],
"tagNames": ["Product category", "Clothing and footwear"],
"folderIds": [30001],
"ownerUserId": 10001,
"createUserId": 10001
}
]
}
}

Notes:

  • Events notify only; they do not intercept ingestion. Only the eventTypes listed above are available publicly.
  • The organization must have this subscription capability enabled; otherwise subscription fails.
  • Folder subscriptions can coexist with asset subscriptions. Subscribing to both may produce both notification types.
  • MATERIAL_DELETED may first report RECYCLE, then PERMANENT after permanent deletion of the same asset.

Receiver implementation guidance

Deduplicate asset events using eventId and dispatch by eventType. Folder callbacks and asset events use separate protocols; do not mix their fields. Persist events before processing expensive tasks asynchronously. Agree on retry and signature verification behavior with the service provider.

The source specification contains differences between folder callback tables and examples for time formats, duration and size units. Confirm these with the service provider and handle nullable fields. Do not assume upload endpoints use the same units.

MuseDAM Developer PlatformAPI · Integrations · MCP
    Events & webhooks | MuseDAM Developers