Docs menu

Download an attachment

GET/v1/attachments/{attachment_id}

  • Scope messages:read

Answers 302 to a short-lived download link for a photo or file on a message. Ask again for a new link; don't store it. The first download of a file can take a few seconds.

Parameters

Path

  • attachment_idstringrequired

    The attachment (att_…), from a message's attachments.

Response

302 FoundLocation is the download link.

Follow Location to the file; the link expires after a few minutes.

Errors

StatusCodeMeans
404attachment_missingThe file is no longer there.
413attachment_too_largeThe file is larger than attachments may be.
503line_unavailableThe line is having trouble right now.
503upload_mismatchA file didn't arrive whole.
400validation_failedA field is missing or invalid.
401unauthorizedThe API key is missing, unknown or revoked.
403insufficient_scopeThe API key lacks the scope this needs.
404not_foundNo such object, or the key can't see it.

Every error is { "error": { "code", "message" } }. All error codes.

Keys come with your first line.

Request an invite and we'll set up a line for your team. API access is part of every plan.

Request an invite