Home Guides API reference What's New Developer Discussion


Communities can be configured to allow users to attach files to posts . Community Admin has settings to control the maximum count of attachments, the file size, and file types accepted on posts.

Note: Attachment queries must be constrained by a message.id. For example: SELECT * FROM attachments WHERE message.id = '292'

See the following sections for which fields, functions, constraints, sorts, and HTTP calls this collection supports.

Open beta (subject to change)
Closed beta. If you are not in the closed beta program, do not use this field in your custom code.


The table below lists and describes fields in this collection. Fields in this table are supported in the SELECT statement of a LiQL query unless otherwise noted.

Field Description Datatype Released
 content_type The content type of the attachment string 14.10
 filename The filename of the attachment string 14.10
 filesize The file size of the attachment long 14.10
 href The relative href of the Attachment resource. This is the canonical path to the resource relative to the REST API root. string 14.10
 id The unique ID of the attachment. The ID is displayed in the format: m_.
Example: m283_picture.jpg
string 14.10
 message The message to which the attachment was uploaded message 14.10
 position The position of the attachment in the list of attachments associated with the attachment. For example, if there were three attachments associated with a message, and this was the first attachment uploaded based on date/time, the attachment's position would be 1. int 14.10
 url The URL of the attachment string 14.10


This collection has no functions


The following table lists the constraints supported by this collection in the WHERE clause of a LiQL query.

Constraint Notes Operators Released
 message.id Filter attachments by message ID
Operator Datatype
= string
SELECT id FROM attachments WHERE message.id = '292'


No fields supported in the ORDER BY clause

Create (HTTP POST)

Create (HTTP POST) is not allowed

Update (HTTP PUT)

Update (HTTP PUT) is not allowed


Delete (HTTP DELETE) is not allowed


This collection has no subcollections