Prerequisites
- A MediaMagic workspace and API key
- curl, Python, or Node.js installed
- A media file to upload (video, audio, or document)
Step 1: Generate an upload URL
First, generate a presigned URL for uploading your file:
curl -X POST https://mm-midmarket-integrations-api-preview.azurewebsites.net/api/integrations/uploads/url \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"filename": "campaign-video.mp4",
"contentType": "video/mp4"
}'
Response:
{
"uploadUrl": "https://<account>.blob.core.windows.net/assets/<path>?<sas>",
"blobPath": "660e8400-e29b-41d4-a716-446655440000/campaign-video.mp4",
"expiresAt": "2026-06-03T13:00:00Z"
}
The presigned URL expires after one hour. Files larger than 10 MB must use this presigned-URL flow; smaller files can be streamed through POST /api/integrations/uploads/direct instead.
Step 2: Upload your file
Use the presigned URL to upload your file directly to Azure Blob Storage:
curl -X PUT "https://<account>.blob.core.windows.net/assets/<path>?<sas>" \
-H "x-ms-blob-type: BlockBlob" \
--data-binary @campaign-video.mp4
Step 3: Create a submission
Now create a submission with your uploaded asset:
curl -X POST https://mm-midmarket-integrations-api-preview.azurewebsites.net/api/integrations/submissions \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"assets": [
{ "blobPath": "660e8400-e29b-41d4-a716-446655440000/campaign-video.mp4" }
]
}'
Asset objects only accept blobPath (and an optional previousSubmissionId for versioning). Do not send filename or contentType here — those come from the upload step.
Response (201 Created):
{
"submissionId": "550e8400-e29b-41d4-a716-446655440000",
"workflowId": "asset-processing-...",
"ablyChannel": "submission:550e8400-...",
"status": "submitted",
"assets": [
{ "assetId": "a1b2", "versionGroupId": "g1", "versionNumber": 1 }
]
}
Step 4: Check the status
Poll the submission endpoint to see when processing completes. Note there is no /status suffix — you read the status from the submission resource itself:
curl -H "X-API-Key: your-api-key-here" \
https://mm-midmarket-integrations-api-preview.azurewebsites.net/api/integrations/submissions/550e8400-e29b-41d4-a716-446655440000
Status response (200 OK):
{
"submissionId": "550e8400-...",
"workflowId": "asset-processing-...",
"workspaceId": "660e8400-...",
"status": "processing",
"progressPercent": 40,
"createdAt": "2026-06-03T12:00:00Z",
"completedAt": null,
"errorMessage": null,
"assets": [
{
"assetId": "a1b2",
"versionGroupId": "g1",
"versionNumber": 1,
"issueCount": null,
"errorMessage": null,
"errorType": null,
"isRetryable": false,
"retryCount": 0
}
],
"isRetryable": false
}
status is one of uploading, submitted, processing, complete, or failed. Keep polling until it reaches the terminal complete or failed state, then stop. For production workloads, prefer webhooks over tight polling.
Step 5: Get the results
Once the asset reaches complete, retrieve its result by fetching the asset directly (no /results suffix):
curl -H "X-API-Key: your-api-key-here" \
https://mm-midmarket-integrations-api-preview.azurewebsites.net/api/integrations/submissions/550e8400-.../assets/a1b2
Asset result (200 OK):
{
"assetId": "a1b2",
"submissionId": "550e8400-...",
"filename": "campaign-video.mp4",
"mimeType": "video/mp4",
"status": "complete",
"issueCount": 2,
"versionNumber": 1,
"versionGroupId": "g1",
"issues": [
{
"id": "i1",
"referenceNumber": 1,
"ruleCode": "CAP_8.4",
"summary": "Unsubstantiated pricing claim",
"severity": "MAJOR",
"status": "OPEN"
}
]
}
What’s next?