Connect Mediabriz to your system so it can receive file submissions, download the files and save them against the correct customer or case.
Before you begin: complete General webhook requirements for connection security, shared fields, responses and duplicate prevention.
1. Understand the delivery
A SEND_FILES delivery contains file details and download links. Your system downloads the files separately. File contents and conversation messages are not included.
- Files: 1 to 10 successfully prepared files, up to 15 MB (15,728,640 bytes) each.
- Unavailable files: expired, oversized, unavailable or Guard-blocked files are omitted and reported to the agent. If none can be prepared, no delivery is sent.
- Do not assume file order. File-sharing time, a separate media-type field and link-expiry timestamp are not supplied.
- No order fields:
items,requestedDeliveryDate,metadata.agentModifiedFields,purchaseOrderNumberandnotesare absent.
2. Read the fields and identify the customer
The shared guide defines the envelope, agent, customer, queue and custom fields. These rules are specific to file deliveries:
| Field | Meaning |
|---|---|
action.type | Always SEND_FILES. |
customer.customerReference | Always present and null on real deliveries. Match using customer.externalContactId, customer.channelAddress or a configured customer/case custom field. |
files | Always present. Contains the prepared files described below. |
Customer matching: on email, the name and address belong to the sender, or the recipient if your organization started the thread. Anonymous Web Messaging may have no address. WhatsApp may provide a business-scoped identifier instead of a phone number.
File information included in the delivery
Fields below are present; nullable values remain present as null. Within schema version 1, ignore additional fields you do not recognize.
| Field | Type and presence | Meaning |
|---|---|---|
files[].mediaId | string; always | Genesys Cloud media ID; unchanged when the same file is sent again. |
files[].fileName | string; always | Name used as a label and download filename, up to 255 characters. Slashes, backslashes, double quotes and control characters are removed. |
files[].contentType | string; always | Lowercase MIME type without parameters. Guard scan type when Guard is active; otherwise Genesys-served type. application/octet-stream when unknown. |
files[].sizeBytes | number or null | Exact byte size, up to 15,728,640; null only for an empty file. |
files[].sourceMessageId | string or null | Originating message ID; email message ID for email attachments. null if unavailable. |
files[].senderParty | string or null | customer, agent or bot; null if unavailable. |
files[].downloadUrl | string; always | Per-file secret download link, valid for 24 hours from preparation. US: https://api.mediabriz.com/prod/actions/files/<token>; EU: https://eu.api.mediabriz.com/prod/actions/files/<token>. Each attempt carries new links. |
Generated filenames: unnamed files use their kind (image, audio, video, document or file), UTC sending date and minute, and MIME extension, for example image-2026-10-06-1120.jpg. Unknown extensions are omitted. Repeated generated names receive -2, -3, etc. Original names may repeat.
Example: one file
{
"schemaVersion": 1,
"eventId": "7d1f0c3a-2b4e-4c5d-9e8f-0a1b2c3d4e5f",
"action": {
"type": "SEND_FILES",
"actionId": "act_8a1e2f3c",
"label": "Save to CRM"
},
"organizationId": "your-genesys-org-guid",
"conversationId": "c0ffee00-1111-2222-3333-444455556666",
"metadata": {
"agent": {
"id": "agent-user-guid",
"name": "Dana Levi",
"email": "dana.levi@example.com"
},
"submittedAt": "2026-10-06T11:20:33.000Z",
"source": "mediabriz-agent"
},
"customer": {
"externalContactId": null,
"name": "David Cohen",
"channelType": "whatsapp",
"channelAddress": "15551234567",
"customerReference": null
},
"queue": {
"id": "q-guid",
"name": "Support"
},
"customFields": {
"case_number": "CS-20931",
"document_type": "invoice"
},
"files": [
{
"mediaId": "a1b2c3d4-0000-4000-8000-000000000001",
"fileName": "invoice-0915.pdf",
"contentType": "application/pdf",
"sizeBytes": 184320,
"sourceMessageId": "msg-guid-1",
"senderParty": "customer",
"downloadUrl": "https://api.mediabriz.com/prod/actions/files/<token>"
}
]
}Here, case_number is agent-entered and document_type is a Dropdown option key. Each file has its own secret download token.
3. Download and store the files
- Save the delivery details.
- Respond to Mediabriz within the configured timeout (3 to 20 seconds). Do not wait for the downloads.
- Download each file using HTTPS
GETand itsdownloadUrl. Do not send an Authorization header, API key or cookies. The link itself gives access. - Follow the
302redirect immediately. The address inLocationworks for only 60 seconds. Do not save that address or send an Authorization header to it. - Save the file in your system. The filename is included in
Content-Disposition.
Note:
- Download links expire 24 hours after file preparation.
- Keep download links private. Anyone with a valid link can download the file. Do not share full links or include them in logs. Each link gives access to one file in your organization.
If a download fails
| Response | What to do |
|---|---|
404 | The link has expired, is invalid, or the file is no longer marked safe by Guard. Send the file again if it is still available in Genesys Cloud. |
503 | Wait briefly, then try the download again. |
Download example
curl -L -o invoice-0915.pdf "https://api.mediabriz.com/prod/actions/files/<token>"4. Respond and handle retries
Send a response
Return 2xx with JSON: {"success":true,"referenceId":"CS-20931"}. Agents see Files sent and the reference returned by your system.
| Response | Result |
|---|---|
2xx, success true or omitted | Accepted; reference shown if supplied. |
2xx, non-JSON body | Accepted without a reference. |
2xx, success false | Failed. |
3xx, 4xx or 5xx | Failed. Redirects are not followed; 4xx/5xx bodies are ignored. |
| Timeout or connection error | Failed, although your system may have processed it. |
Limits: First 64 KB read; referenceId 200 characters; message 300.
On failure, the agent sees Your system did not accept the files or could not be reached. Try again.
Handle retries and repeated sends
Mediabriz does not retry automatically. Use eventId for agent retries and new sends:
| Case | How to handle it |
|---|---|
Already accepted eventId | Return success and the original reference. Do not save again. Continue unfinished downloads. |
| Retry without changes | Same ID, new links. File preparation failures may reduce the file count, never increase it. |
| Changed files or custom fields | New ID. Treat separately; the earlier attempt may already have reached you. |
| New send | New ID, even for previously sent files. For one copy per conversation, also check conversationId and mediaId. |
5. Allow outbound downloads
If outbound traffic is restricted, allow HTTPS port 443 to both hosts for your region:
| Region | Download host | Storage host |
|---|---|---|
| US | api.mediabriz.com | *.s3.us-east-1.amazonaws.com |
| EU | eu.api.mediabriz.com | *.s3.eu-west-1.amazonaws.com |
6. Next step
Follow the next step in the setup guide.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article