Chat messages

POST /api/groups/:group_id/chat_messages
create a new chat message

Success Response Code: 201

Params

Param name Description
group_id
optional

ID of the Group to submit the chat message to


Value: Must be a Integer
chat_message
optional

Value: Must be a Hash
chat_message[body]
required

chat message's body


Value: Must be a String
chat_message[client_provided_guid]
optional

the client-provided unique identifier for the message, if any. Used for duplicate detection/post aggregation etc.


Value: Must be a String
chat_message[url]
optional

external URL for this chat message


Value: Must be a String
chat_message[attachment_id]
optional

array of existing attachment ids to attach to the chat message


Value: Must be an array of Integer

Response Fields

id id of the chat message Integer
user the user who created the chat message User
title chat message's title String
body chat 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 chat message posted String
icon url for the icon image for this message_type String
url url to interact with this chat message String
permalink_url chat message's permalink page String
external_url external URL for shared links, bookmarks, etc. String
created_at time the chat message was created DateTime
updated_at time the chat message was last updated DateTime
likes likes attached to this chat message Array<Like>
likes_count number of likes for this chat message Integer
commentable can the current user create comments on this chat message (this will always be false) Boolean
comments comments attached to this chat message Array<Comment>
comments_count number of comments for this chat message Integer
external_resources url links associated with this chat message, which can include oembed data. Array<ExternalResource>
extensions extensions associated with this chat 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 chat message be shared (this will always be false) Boolean
share_count number of times the message has been shared publicly Integer
shared_message shared message referenced by this chat message. Contains all Message response fields except likes, comments, shared_message Hash

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" -H "Accept: application/json" "https://demo.socialcast.com/api/groups/12/chat_messages" -H "Content-Type: application/json" -d '{"chat_message":{"body":"New chat message!"}}'

GET /api/groups/:group_id/chat_messages
get a list of chat messages for a group

Success Response Code: 200

Params

Param name Description
group_id
required

ID of the group for which to retrieve the chat messages


Value: Must be a Integer
chat_message_id
optional

ID of a chat message for which to retrieve pages of results in ascending order. Ignored if page is provided


Value: Must be a Integer

Response Fields

chat_messages chat messages selected Array<Message>
chat_messages_next_page next page number for :chat_messages. Null if next page would not have any results Integer
chat_messages_current_page current page number for :chat_messages Integer

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/12/chat_messages.json