Retrieve media▾
Retrieve media
Get metadata and a short-lived download URL, including for inbound media.
Inbound messages carry a media id, not a URL. Call this to get a signed url, valid for five minutes, then download it yourself — the URL requires no auth header, so treat it as a secret.
GET
/v1/media/{id}Path parameters
idstringrequiredMedia id from an upload or an inbound message.
curl -X GET https://api.sendport.tech/v1/media/{id} \
-H "Authorization: Bearer $SENDPORT_KEY"Responses
200OK
{
"object": "media",
"id": "med_01JZQ8T0X5K2M4P6R8T0V2XACE",
"mime_type": "image/jpeg",
"sha256": "9d4c2f1a7b8e0d3c6a5f4e2b1c0d9a8f7e6b5c4d3a2f1e0b9c8d7a6f5e4b3c2d",
"file_size": 184320,
"filename": "receipt-A-4417.jpg",
"expires_at": "2026-10-06T09:14:22.114Z",
"url": "https://media.sendport.tech/d/med_01JZQ8T0X5?sig=9f2c…",
"url_expires_at": "2026-09-06T09:19:22.114Z",
"created_at": "2026-09-06T09:14:22.114Z"
}401Unauthorized
{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "No API key provided.",
"doc_url": "https://sendport.tech/docs/errors#missing_api_key",
"request_id": "req_9f3c2a7b41de08c5b2e6"
}
}Try itsandbox