Attachments

Get an attachment download URL

Generates a presigned, time-limited download URL for the attachment; expiry is configurable via the expiresIn query parameter.

GET
/v1/attachments/{id}/download-url

Generates a presigned, time-limited download URL for the attachment; expiry is configurable via the expiresIn query parameter.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Query Parameters

expiresIn?number|null

Response Body

Success

application/json
  1. response
url*string
expiresAt*string
attachment*
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.attachments.downloadUrl({  "id": "example"});
Example Response
{  "url": "string",  "expiresAt": "string",  "attachment": {    "id": "string",    "messageId": "string",    "organizationId": "string",    "filename": "string",    "contentType": "string",    "size": 0,    "contentId": "string",    "isInline": true,    "createdAt": "string"  }}

Related documentation