API Callbacks
WellcomeMat can notify your server when events happen to your media. Callbacks are HTTP GET requests sent to URLs you provide, with event data passed as query parameters.
There are four callback types, each triggered at a different stage of the media lifecycle:
| Callback | Trigger | Delivery |
|---|---|---|
callback_uploaded | Upload completes (or fails) | Browser redirect (302) |
callback_location | Upload completes (or fails) | Server-to-server GET |
callback_processed | Encoding completes (or fails) | Server-to-server GET |
callback_changed | A media property changes | Server-to-server GET |
Setting Up Callbacks
Per-upload callbacks
Pass callback_uploaded and/or callback_location as query parameters when uploading via the API. The Toolset supports callback_location only.
https://www.wellcomemat.com/embed/uploader?key=<KEY>&secret=<SECRET>&callback_location=https://example.com/wm/locationPer-media callbacks
callback_processed and callback_changed are stored on the media record. Set them via the Media API when creating or updating a media item.
callback_uploaded
Triggered when a media upload completes or fails. Delivered as a browser redirect (HTTP 302), so this callback only works when the upload happens in a browser context.
Success
GET https://example.com/wm/uploaded?success=1&hash=a1b2c3d4e5f6&error=&key=yourApiKey| Parameter | Type | Description |
|---|---|---|
success | "1" | Upload succeeded. |
hash | string | The media hash identifier. |
error | empty string | No error. |
key | string | Your API key. Only included on success. |
Error
GET https://example.com/wm/uploaded?success=0&hash=&error=No+file+was+uploaded| Parameter | Type | Description |
|---|---|---|
success | "0" | Upload failed. |
hash | empty string | No media was created. |
error | string | Human-readable error message. |
Note: The
keyparameter is not included in error callbacks.
callback_location
Triggered when a media upload completes or fails. Delivered as a server-to-server GET request, so your server receives it regardless of browser context.
On success, the full media object is included as a JSON-encoded media query parameter. Because the full media payload is URL-encoded in the query string, the resulting URL can be long. Ensure your server and any intermediary proxies or load balancers accept URLs of at least 8,000 characters.
Success
GET https://example.com/wm/location?success=1&key=yourApiKey&error=&media=%7B...%7D| Parameter | Type | Description |
|---|---|---|
success | "1" | Upload succeeded. |
key | string | Your API key. Only included on success. |
error | empty string | No error. |
media | JSON string | URL-encoded JSON object with the full media payload (see below). |
Success media payload example
The media parameter is a URL-encoded JSON string. When decoded, it contains the full media object:
{
"media_id": 123456,
"hash": "a1b2c3d4e5f6",
"isDefaultForListing": true,
"created": "2026-05-06 14:30:00",
"replaced": null,
"data_updated": "2026-05-06 14:30:00",
"status_code": "queued_for_encoding",
"status_message": "Queued For Encoding",
"status_group": "processing",
"is_ready": false,
"user_id": 789,
"title": "123 Main Street Virtual Tour",
"keywords": "real estate, virtual tour, Denver",
"customid": "MLS-12345678",
"original_file": "123-main-street.mp4",
"original_size_bytes": 157286400,
"original_size_readable": "150.00 MB",
"source": "toolset",
"traffic_url": "https://example.com/listing/MLS-12345678",
"slideshow": 0,
"video_type": 1,
"price": 450000,
"location": {
"address": "123 Main Street",
"city": "Denver",
"state_province": "CO",
"postal_code": "80202",
"latitude": "39.7392",
"longitude": "-104.9903"
},
"video": null,
"preview": null,
"image": null,
"photos": {
"https_url": "https://f9d1f107e6c5b1517a51-aaf17496434b6d0932e6009b64e8d8e3.ssl.cf1.rackcdn.com",
"seconds": {}
},
"links": {
"base": "https://www.wellcomemat.com/video/a1b2c3d4e5f6",
"embed": "https://www.wellcomemat.com/embed/a1b2c3d4e5f6",
"share": "https://www.wellcomemat.com/s/a1b2c3d4e5f6",
"unbranded_base": "https://www.wellcomemat.com/mls/a1b2c3d4e5f6",
"unbranded_embed": "https://www.wellcomemat.com/embed/a1b2c3d4e5f6?mls=1"
}
}After encoding completes, fields like video, preview, image, photos.seconds, is_ready, and status_code will be populated. At upload time, encoding has not started yet, so video-related fields are null.
Note: The callback payload is built by a separate code path from the Media API response. Some fields differ in type or format - for example,
status_codeuses descriptive strings (e.g."queued_for_encoding") rather than numeric codes, and numeric fields likeuser_id,slideshow, andvideo_typeare returned as numbers rather than strings. Do not assume callback payloads match the Media API response schema.
Error
GET https://example.com/wm/location?success=0&hash=&error=No+file+was+uploaded| Parameter | Type | Description |
|---|---|---|
success | "0" | Upload failed. |
hash | empty string | No media was created. |
error | string | Human-readable error message. |
Note: The
keyandmediaparameters are not included in error callbacks.
callback_processed
Triggered when encoding completes (successfully or with an error). Delivered as a server-to-server GET request.
Example
GET https://example.com/wm/processed?hash=a1b2c3d4e5f6&status=Completed| Parameter | Type | Description |
|---|---|---|
hash | string | The media hash identifier. |
status | string | The encoding result. See values below. |
Status values
| Value | Meaning |
|---|---|
Completed | Encoding finished successfully. The video is ready. |
Error | Encoding encountered an error. |
Failed | Encoding failed permanently. |
callback_changed
Triggered when a tracked property on a media record changes. Delivered as a server-to-server GET request.
This callback is delta-only: it includes the media hash for identification plus only the fields that changed. It does not send the full media payload.
Example
GET https://example.com/wm/changed?hash=a1b2c3d4e5f6&isDefaultForListing=true| Parameter | Type | Description |
|---|---|---|
hash | string | The media hash identifier. |
isDefaultForListing | true or false | Whether this media is now the default video for its listing. |
Currently, isDefaultForListing is the only field sent via callback_changed. Additional fields may be added in the future, but callback_changed will always be delta-only (only changed fields, never a full payload).
Notes
- All callbacks are sent as HTTP GET requests with data in query parameters.
- For server-to-server callbacks (
callback_location,callback_processed,callback_changed), your endpoint should return an HTTP 2xx status code to acknowledge receipt. Non-2xx responses are logged as errors on our side, but callbacks are not retried. This does not apply tocallback_uploaded, which is a browser redirect - WellcomeMat does not observe your endpoint’s response in that case. callback_uploadedis a browser redirect and is only useful when the upload happens in a browser. For server-to-server notifications, usecallback_locationinstead.- To verify that callback requests originate from WellcomeMat, contact support for our current server IP ranges. The
keyparameter included on success callbacks is your API key (not a secret), so it should not be used as the sole means of authentication.