Media

Get a media download URL

Generates a presigned, time-limited download URL for a ready media object. Use this endpoint to get a media download URL through the Samva email API.

GET
/v1/media/{id}/url

Generates a presigned, time-limited download URL for a ready media object.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^media_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

MediaDownloadUrl

application/json
  1. response
url*string
expiresAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.media.downloadUrl({  "id": "example"});
Example Response
{  "url": "string",  "expiresAt": "string"}

Related documentation