Get a file link

GET/v1/attachments/{attachment_id}

A link to the file of a message, valid 15 minutes, as a 302 redirect or as JSON with format=json.

download=1 makes the browser save it.

Scope messages:read

Path parameters

attachment_idstring, uuidRequired

Query parameters

formatstring
downloadboolean
Default false

Response

  • 200The link as JSON
  • 302Success
Response fields
urlstringRequired
expires_atstring, date-timeRequired
mime_typestringRequired
May be null
file_namestringRequired
May be null
size_bytesintegerRequired
May be null

Errors

  • 401unauthorized. The key is missing, unknown or revoked
  • 403insufficient_scope. The key lacks the scope above
  • 404not_found. no such attachment, or not stored yet
  • 422validation_error. details.fields names each field at fault
  • 503unavailable. media storage is not configured

Every error has the same shape. See Errors.