Skip to main content
GET
Get an attachment
  • Credential: an API key. A trial key returns 401 unauthorized. An API key reads the attachments that its account created, and the files received on the inbound messages of its lines.
  • Line-scoped keys: the list of a line-scoped key is not applied: such a key reads every attachment the account can read.
  • Events: none.
  • Personal data: filename and the file behind download_url can hold personal data. Request them only when needed, do not copy them into logs, tickets or other tools, and refer to a contact by an id of your own. Treat download_url as a secret for as long as it is valid.
  • Download URL: download_url is set only when status is ready, and is valid until download_expires_at, 15 minutes later. Call the operation again for a new URL. See Downloading a file.
  • Waiting: iSnap checks for an uploaded file every 30 seconds. Read this operation until status is ready before you send the attachment. See Statuses.

Errors

The errors that every operation shares are in Errors.

Authorizations

Authorization
string
header
required

An API key created in the iSnap dashboard, or a trial key, sent as Authorization: Bearer <key>. An API key starts with isnap_live_ or isnap_test_; both act on the same account, lines and billing. A trial key acts on its trial only.

Path Parameters

id
string
required

Attachment id: att_ followed by 25 letters or digits.

Response

The attachment, with a new download_url when its status is ready.

success
enum<boolean>
required

Always true on a success response.

Available options:
true
data
object
required

A file sent or received with a message. Timestamps are ISO 8601 in UTC.

trace_id
string
required

Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap.

request_id
string
required

Id of the request that produced this response: req_ followed by 25 letters or digits.