PUT /api/messages/:message_id

update a message

Success Response Code: 200


Param name Description

message to update

Value: Must be a Integer

Value: Must be a Hash

message's body

Value: Must be a String

external URL for this message

Value: Must be a String

file to attach to the message

Value: Must be a File

array of existing attachment ids to attach to the message

Value: Must be an array of Integer

submit this message to a group

Value: Must be a Integer

embed a flash player hosted at this URL. If player_url is specified, thumbnail_url must also be specified

Value: Must be a String

display the image located at this URL before embedding the flash player

Value: Must be a String

pass these FlashVars to the embedded flash player

Value: Must be a String

id of the message to be shared. Note that the message to be shared should have shareable=true in its API response

Value: Must be a Integer

Response Fields

id id of the message Integer
user the user who created the message User
title message's title String
body message's body String
action text to construct a sentence from the title (e.g. "asked a question") String
verb text to construct a sentence with the user's name (e.g. "User thanked") String
message_type a description of the type of message posted (e.g. "status_message", "chat") String
icon url for the icon image for this message_type String
url url to interact with this message String
permalink_url message's permalink page String
external_url external URL for shared links, bookmarks, etc. String
created_at time the message was created DateTime
updated_at time the message was last updated DateTime
likes likes attached to this message Array<Like>
likes_count number of likes for this message Integer
commentable can the current user create comments on this message Boolean
comments comments attached to this message Array<Comment>
comments_count number of comments for this message Integer
external_resources url links associated with this message, which can include oembed data. Array<ExternalResource>
extensions extensions associated with this message, which can include group, thanks, challenges, project or town_hall data Array<Extension>
recipients users and groups that are @ mentioned, or groups that are referenced by group_id Array<User or Group>
shareable can this message be shared. There are some restrictions on which messages can be shared based on message type and visibility. See shared_message_id parameter for create Message and Remark Boolean
share_count number of times the message has been shared publicly Integer
shared_message shared message referenced by this message. Contains all Message response fields except likes, comments, shared_message Hash
client_provided_guid the client-provided unique identifier for the message, if any. Used for duplicate detection/post aggregation etc. String

Example Curl Commands

curl -X PUT -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/443.json" -H "Content-Type: application/json" -d '{"message":{"body":"Updated message!"}}'


PUT /api/messages/3.json
  "message": {
    "title": "updated"
  "message": {
    "id": 3,
    "user": {
      "id": 21,
      "first_name": "J'øhn19",
      "last_name": "D'øe19",
      "name": "J'øhn19 D'øe19",
      "html_name": "J&#39;øhn19 D&#39;øe19",
      "url": "https://socialcast.socialcast.test/users/21-j%C3%B8hn19d%C3%B8e19",
      "avatars": {
        "is_system_default": true,
        "id": null,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
      "username": "Jøhn19Døe19",
      "active": true,
      "terminated": false,
      "inactive": false,
      "role": "member",
      "type": "User",
      "title": null,
      "out_of_office": false,
      "out_of_office_on": null,
      "back_in_office_on": null,
      "company_login": null
    "title": "updated",
    "body": "quux **bold**",
    "html_body": "<div class=\"markdown-body\"><p>quux <strong>bold</strong></p></div>",
    "action": "",
    "verb": null,
    "message_type": "status_message",
    "icon": null,
    "url": "https://socialcast.socialcast.test/api/messages/3",
    "permalink_url": "https://socialcast.socialcast.test/messages/3",
    "external_url": null,
    "created_at": "2017-06-23T19:00:42+00:00",
    "updated_at": "2017-06-23T19:00:48+00:00",
    "attachments": [],
    "media_files": [],
    "contains_url_only": null,
    "external_resources": [],
    "tags": [],
    "last_interacted_at": 1498244442,
    "group": {},
    "category_id": null,
    "recipients": [],
    "thumbnail_url": null,
    "player_url": null,
    "player_params": null,
    "likable": false,
    "ratable": false,
    "rating": null,
    "ratings_average": null,
    "ratings_count": null,
    "editable": true,
    "deletable": true,
    "watchable": false,
    "watch": null,
    "flag": null,
    "source": null,
    "poll": null,
    "embed": null,
    "hidden": null,
    "subscribed": null,
    "groups": [],
    "extensions": [],
    "new_group_id": null,
    "new_group_archived_at": null,
    "days_of_stickiness": 0,
    "sticky_for_current_user": false,
    "shareable": false,
    "share_count": 0,
    "client_provided_guid": null,
    "comments_count": 0,
    "comments": [],
    "likes": [],
    "likes_count": 0,
    "shared_message": null,
    "commentable": true