Skip to main content
Retrieve a message attachment

Authorizations

Authorization
string
header
required

A Tightknit admin API key, sent as Authorization: Bearer <key>.

Path Parameters

message_id
string
required

The message's id.

Pattern: ^msg_[a-zA-Z0-9]{12}$
file_id
string
required

The id of the attached file.

Pattern: ^file_[a-zA-Z0-9]{12}$

Query Parameters

expand

Repeatable. Returns the named relation inline. One of: file.

Available options:
file

Response

Success

object
enum<string>
required

Always message_attachment.

Available options:
message_attachment
id
string
required

The attached file’s id, which keys the attachment within its message.

Example:

"file_2b3c4d5e6f7g"

message_id
string
required

The id of the message the file is attached to.

Example:

"msg_9f2b8c1d4e5a"

file_id
string
required

The id of the attached file.

Example:

"file_2b3c4d5e6f7g"

position
integer
required

Where the file sits among the message’s attachments, counting from zero.

Required range: x >= 0
created_at
string<date-time>
required

When the attachment was last written, which an edit to the message’s body or images resets.

file
object

A file the community stored, uploaded or generated.