Message Resource

A message is a generic container for content shared between people, a group, or a network.

Changelog

1.0.7
  • Support for an array of recipients (write-context).
1.0.8
  • Application EID (write-context).
  • Localizable body for multi-language messages.
1.0.10
  • Added appData property.
1.0.11
  • Added bubble property.
1.0.16
  • Added numAttachments and numLikes properties.
  • Added _user.hasLiked and _user.hasRecentlyCommented properties.
  • Added like and likes relation.
1.0.17
  • Added embeds property.
1.0.18
  • Added announcement message type.
  • Added data property.
  • Added event property.
1.0.19
  • Added mentions property.
1.0.24
  • Added file.hasSubfolders and file.path properties.
1.0.26
  • Added numRecipients property.
  • Added _user.permissions property.
1.1.14
  • Added lastEditor relation, lastModified, lastEdited and status fields.
  • Added htmlBody
  • Added headerBackground
1.3
  • Added superseeded property.
1.3.1
  • Added _user.subscribed property.
1.3.6
  • Added dimensions object for image files.
1.4
  • Deprecated attachments relation for update type messages.
  • Added numFiles property.
  • Added files relation for update type messages.
  • Added numImages property.
  • Added images relation for update type messages.
  • Added numVideos property.
  • Added videos relation for update type messages.
1.5
  • Renamed event property to announcement.
  • Added event message type.
  • Added event property.
  • Added responderCounts property.
1.5.1
  • Added cancel relation for event type messages.
  • Added reinstate relation for event type messages.
  • Added rsvp relation for event type messages.
1.5.6
  • Added reason property to Bubble object.
1.6.6
  • Added numVideoViews for file message type

Endpoints

Representations

JSON Properties

NameTypeDescription
announcement
(before 1.5 named event)
stringSince 1.0.18 Announcement event type: participant_joinedparticipant_lefttitle_changed or icon_changed
appDatastringSince 1.0.10 Optional data provided by the app that generated the message
bodystringMessage body
bubbleobjectSince 1.0.11 Bubbled message properties
bubble.bubbleddatetimeRead-only Last time bubbling took place
bubble.numRecentCommentersbooleanRead-only Number of commenters since message was last bubbled
bubble.reasonstringSince 1.5.6 Read-only Reason why the message bubbled: new_commentdate_time_changedlocation_changed or details_changed
commentablebooleanWhether or not comments may be posted on the message
createddatetimeRead-only Date the message was created (ISO 8601 compliant)
datadatetimeSince 1.0.18 Read-only Data relevant to the announcement
deletedBystringSince 1.0 Read-only If applicable, information on the user that deleted the message
EIDEIDUnique entity identifier
embedsarraySince 1.0.17 List of embedded URLs
eventobjectSince 1.5 Event details event
fileobjectRead-only Optional file information (in case of messageType ``file) <file>
headerBackgroundUrlstringSince 1.1.14 Read-only URL of the header background
htmlBodystringSince 1.1.14 HTML5 body (only for news messageType). Note that the body and htmlBody fields are mutually exclusive in a write context. When retrieving, the HTML body is converted to plain text in the body field for backward compatibility
lastModifieddatetimeSince 1.1.14 Read-only When the message was last modified (only for messageType news and update)
lastEditeddatetimeSince 1.1.14 Read-only When content of the message was last edited (only for messageType news and update)
localizableBodyobjectSince 1.0.8 Localizable message body
localizableBody.localestringBody in the language of the RFC 5646/4647 
mentionsarraySince 1.0.17 List of mentions
messageTypestringRead-only Message type: updatecommentfilenewsprivate eventapp_update or announcement
numRecipientsnumberSince 1.0.26 Read-only Number of recipients
numAttachmentsnumberSince 1.0.16 Read-only Number of attachments
numCommentsnumberRead-only Number of comments
numFilesnumberSince 1.4 Read-only Number of attached files
numImagesnumberSince 1.4 Read-only Number of attached images
numLikesnumberSince 1.0.16 Read-only Number of likes
numVideosnumberSince 1.4 Read-only Number of attached videos
numVideoViewsnumberSince 1.6.6 Read-only Number of video views
statusstringSince 1.1.14 For news messages, this can be draft or published
superseededbooleanSince 1.3 Read-only This only applies in the context of an edit-history and signifies that this is not the latest version
teaserThumbnailUrlURIFile URL to news teaser image thumbnail
titlestringNews message title
typestring"message"

Event Properties (since 1.5)

NameTypeDescription
allDaybooleanWhether or not the event lasts all day
endobjectExclusive! end date/time of an event
end.datestringEnd date (ISO 8601 YYYY-MM-DD)
end.timestringEnd time (ISO 8601 hh:mm) of non-all-day event
end.timeZonestringEnd time zone (IANA zone name) of non-all-day event
end.timeZoneOffsetstringRead-only Time zone offset at end date/time (±hh:mm)
startobjectStart date/time of an event
start.datestringStart date (ISO 8601 YYYY-MM-DD)
start.timestringStart time (ISO 8601 hh:mm) of non-all-day event
start.timeZonestringStart time zone (IANA zone name) of non-all-day event
start.timeZoneOffsetstringRead-only Time zone offset at start date/time (±hh:mm)
locationobjectLocation
location.descriptionstringHuman-readable description of the location
responderCountsobjectUsers that RSVP'ed (counts per answer option)
responderCounts.yesnumberNumber of users that responded they will attend the event
responderCounts.maybenumberNumber of users that said they might attend the event
responderCounts.nonumberNumber of users that said they won't attend the event
responderCounts.unspecifiednumberNumber of users that did not yet respond to the event

Embedded URL Properties (since 1.0.17)

NameTypeDescription
desktopThumbnailUrlURIFile URL to thumbnail
metadatastringMeta-data to describe the embed
urlURIURL used for linking the embed

Mention Properties (since 1.0.19)

NameTypeDescription
EIDEIDUnique entity identifier of the mentioned user
lengthintegerString length of the mention
offsetintegerOffset of the mention in the message body
typestringMentioned type ('user')

File Properties

NameTypeDescription
file.displayUrlsobjectURLs for different file formats
file.displayUrls.profileImagestringPreview for use on profile page (Retina)
file.displayUrls.thumbnailstringGeneric web thumbnail (Retina)
file.displayUrls.timelinePreviewSmallstringPreview for use with timeline (small, non-Retina)
file.displayUrls.timelinePreviewLargestringPreview for use with timeline (large, non-Retina)
file.extensionstringThe file's extension (without leading dot)
file.filenamestringFilename
file.hasSubfoldersbooleanSince 1.0.24 Whether there are subfolders in this folder
file.mimeTypestringMIME type ("inode/directory" for folders)
file.namestringName of the file (typically, but not necessarily, this is the same as the filename without extension)
file.numChildrenintegerNumber of direct children
file.patharraySince 1.0.24 List of folders.
file.sizeintegerFile size in bytes
file.trashedbooleanWhether or not the file has been removed
file.typestringFile type: avatarbackground_imagedocumentemblemfilefoldericonimageinline_imagenews_background_imageprofile_background_imageteaser_image or video
file.urlURIURL to the (original) attachment
file.dimensionsobjectDimensions (only for image files uploaded since API version 1.3.6)
file.dimensions.widthintegerSince 1.3.6 Width in pixels
file.dimensions.heightintegerSince 1.3.6 Height in pixels
file.dimensions.aspectRatiostringSince 1.3.6 Aspect ratio of the image (not guaranteed)
RelationResourceDescription
appappSince 1.0.8 The app that posted the message (optional)
attachmentsmessageDeprecated for update type since 1.4 Attached file messages.
authoruserUser that posted the message
childrenmessageChildren of a file message
commentsmessageComments on this message
conversationconversationConversation the message is part of
filesmessageSince 1.4 Attached files
headerBackgroundmessageSince 1.1.14 File message containing the news header background (only for messageType news)
imagesmessageSince 1.4 Attached images. Thumbnails will automatically be generated for preview purposes
lastEditoruserSince 1.1.14 User who last edited the message
likeactionSince 1.0.16 Like action
likersuserSince 1.0.16 Users that liked the message
mentionedUsersuserSince 1.0.19 Users that were mentioned in the message
parentmessageParent message in case of a comment
parentFoldermessageParent folder in case of folders
recentCommentersuserAuthors of recent comments on the message. A comment is considered recent when it caused or is placed after the most recent bubble event of the message.
recipientmixedThe network, group or people (in a conversation) that have received the message
teaserImagemessageTeaser image for news items
videosmessageSince 1.4 Attached video. These will be automatically transocded for streaming playback

End-user Metadata (read-only)

NameTypeDescription
hasLikedbooleanSince 1.0.16 Whether the logged in user has liked the message
hasRecentlyCommentedbooleanSince 1.0.16 Whether the logged in user has recently commented on the message. A comment is considered recent when it caused or is placed after the most recent bubble event of the message.
permissionsstringSince 1.0.26 Comma-separated list of permissions the logged in user has
readbooleanWhether a message has been read or not (only for news items)
rsvpstringSince 1.5 RSVP response to an event by the logged in user: yesmaybeno or unspecified
subscribedbooleanSince 1.3.1 Whether the logged in is subscribed to the message c.q. receives notifications

Example - Update Message

{
    "_links": {
        "self": {
            "href": "/networks/fedcba0987654321/messages/1234567890abcdef/"
        },
        "author": {
            "href": "/networks/fedcba0987654321/users/abcdef0123456789/"
        },
        "comments": {
            "href": "/networks/fedcba0987654321/messages/?parent=1234567890ABCDEF"
        },
        "videos": {
            "href": "/networks/fedcba0987654321/messages/0123456789fedcba/"
        },
        "files": [
            { "href": "/networks/fedcba0987654321/messages/a1b2c3d4e5f67890/" },
            { "href": "/networks/fedcba0987654321/messages/09876f5e4d3c2b1a/" }
        ],
        "recipient": {
            "type": "network",
            "href": "/networks/fedcba0987654321/"
        }
    },
    "_user": {
        "hasRecentlyCommented": true,
        "hasLiked": false
    },
    "EID": "1234567890abcdef",
    "body": "Hello world!",
    "created": "2013-04-12T17:10:10.123+01:00",
    "commentable": true,
    "messageType": "update",
    "numFiles": 2,
    "numVideos": 1
}

Example - Non-all-day Event

{
    "_links": {
        "self": {
            "href": "/networks/fedcba0987654321/messages/1234567890abcdef/"
        }
    },
    "EID": "1234567890abcdef",
    "messageType": "event",
    "title": "Friday drinks",
    "htmlBody": "Cheers!",
    "event": {
        "allDay": false,
        "location": {
            "description": "Spiazzo"
        },
        "start": {
            "date": "2017-07-07",
            "time": "18:00",
            "timeZone": "Europe/Amsterdam",
            "timeZoneOffset": "+02:00"
        },
        "end": {
            "date": "2017-07-08",
            "time": "00:00",
            "timeZone": "Europe/Amsterdam",
            "timeZoneOffset": "+02:00"
        }
    }
    "created": "2017-06-27T13:03:51.123+02:00",
    "commentable": false
}

Example - comment with attachment

{
    "_links": {
        "self": {
            "href": "/networks/fedcba0987654321/messages/1234567890abcdef/"
        },
        "attachments": [{
            "href": "/networks/fedcba0987654321/messages/a1b2c3d4e5f67890/"
        }],
        "author": {
            "href": "/networks/fedcba0987654321/users/abcdef0123456789/"
        },
        "parent": {
            "href": "/networks/fedcba0987654321/messages/0123456789fedcba/"
        },
        "recipient": {
            "type": "group",
            "href": "/networks/fedcba0987654321/groups/1234567890abcdef/"
        }
    },
    "_user": {
        "hasLiked": false
    },
    "EID": "1234567890abcdef",
    "body": "Check out my curriculum vitae",
    "created": "2013-04-12T17:10:10.123+01:00",
    "messageType": "comment",
    "numAttachments": 1
}

Example - file message

{
    "_links": {
        "self": {
            "href": "/networks/fedcba0987654321/messages/a1b2c3d4e5f67890/"
        },
        "author": {
            "href": "/networks/fedcba0987654321/users/abcdef0123456789/"
        }
    },
    "EID": "a1b2c3d4e5f67890",
    "commentable": false,
    "created": "2013-04-12T21:41:15.123+01:00",
    "file": {
        "extension": "doc",
        "filename": "cv.doc",
        "mimeType": "application/msword",
        "name": "cv",
        "path": [
            { "name": "HR", "EID": "9876543210abcdef" },
            { "name": "Résumés", "EID": "abcdef0987654321" }
        ],
        "type": "document",
        "url": "http://vault.speakap.com/file/1234567890abcdef"
    },
    "messageType": "file",
    "type": "message"
}

Example - Announcement

{
    "_links": {
        "originator": {
            "href": "/networks/fedcba0987654321/users/a1b2c3d4e5f67890/"
        },
        "conversation": {
            "href": "/networks/fedcba0987654321/conversations/abcdef0123456789/"
        },
        "participants":  [{
            "href": "/networks/fedcba0987654321/users/1234567890abcdef/",
            "href": "/networks/fedcba0987654321/users/4567890abcdef123/"
        }]
    },
    "EID": "1234567890abcdef",
    "created": "2013-04-12T17:10:10.123+01:00",
    "event": "participant_joined",
    "messageType": "announcement"
}