Using Callback URLs
Callback URLs provide a convenient way to receive real-time updates on the status of your orders. Instead of polling our API to check for updates, you can register a callback URL, and we'll notify you whenever there's a change in the order's status.
Setting up Callback URLs
When placing an order, include the callback_url parameter with a valid URL where you want to receive status updates.
Securing Callback URLs
3Play calls the exact URL you specify. To verify a request is from 3Play, put an expiring token in the URL and check it on receipt:
https://partner.example.com/3play/callback?token=abcd-1234
The callback arrives when the order completes, so the token must still be valid then. There is no fixed completion time: it varies by service, package, and turnaround, so err on the long side. A non-expiring token is less secure and not recommended.
Handle incoming requests
Ensure that your server is set up to handle POST requests at the specified callback URL. Our API will send status updates to this URL whenever the order changes.
Callback Payload
3Play sends one POST per order when it reaches complete, failed, or cancelled. Nothing fires on intermediate status changes. The body is the same envelope a read of the order returns: code, data holding the full order, and meta. Every order in data carries:
| Field | What it is |
|---|---|
id | ID of the service, the value the List endpoint's id filter takes |
media_file | The media file the order was placed on. See below |
status | complete, failed, or cancelled |
type | Which service fired: captions, descriptions, subs, or dubs |
package | Resolved quality tier |
turnaround | Resolved speed tier |
downloads | Download links, one entry per file. null unless status is complete |
media_file is an object:
| Field | What it is |
|---|---|
id | ID of the media file |
name | Name of the media file. Can be null |
language | Language code of the media |
external_source_id | Your own key for the media, echoed from the request |
folder_name | Folder the media is filed under |
Captions and descriptions orders on the launch package add score, which is null until the score exists.
Subs and dubs add target_language. A subs callback looks like:
{
"code": 200,
"data": {
"id": 987,
"media_file": {
"id": 123456,
"name": "Episode 12",
"language": "en-US",
"external_source_id": "master-s02e12",
"folder_name": null
},
"type": "subs",
"target_language": "fr-FR",
"package": "refine",
"turnaround": "standard",
"status": "complete",
"downloads": [
{
"type": "srt",
"format_name": "SRT",
"mime_type": "application/x-subrip",
"url": "https://api.3playmedia.com/v3/downloads/abc123",
"expires_at": "2026-11-01T12:00:00Z"
}
]
},
"meta": {}
}Each ordering guide documents its exact payload: Order Captions, Order Descriptions, Order Subs, Order Dubs.
Retrieving Completed Assets
A complete callback carries the downloads: one entry per file, with type, format_name, mime_type, a signed url valid for 8 hours, and expires_at. For fresh links after the URLs expire, read the order again with the List endpoint for its type, filtered by id: List Captions, List Descriptions, List Subs, or List Dubs.
Updated 6 days ago
