Create a new top-level message in the specified conversation.

post

/social/api/v1/conversations/{conversationID}/messages

Request

Supported Media Types
Path Parameters
Body ()
The request body defines the details of the request.
Root Schema : XV1ConversationMessageCreateInfo
Type: object
V1 Conversation Message Create Information.
Show Source

Response

Supported Media Types

200 Response

Successful operation.
Body ()
V1 Message Information DTO.
Root Schema : XV1MessageInfo
Type: object
V1 Message Information DTO.
Show Source
Nested Schema : comments
Type: array
The comments on this message.
Show Source
Nested Schema : XV1MessageModerationState
Type: object
Show Source
  • Allowed Values: [ "APPROVED", "DRAFT", "REJECTED", "REPLACED" ]
    V1 Moderation state of messages in a conversation.
Nested Schema : XV1MessageType
Type: object
Show Source
  • Allowed Values: [ "SYSTEM_ANNOTATION_CLOSED", "SYSTEM_ANNOTATION_OPENED", "SYSTEM_ARTIFACT_COPIED", "SYSTEM_ARTIFACT_CREATED", "SYSTEM_ARTIFACT_NAME_CHANGED", "SYSTEM_ARTIFACT_STATE_CHANGED", "SYSTEM_CONVERSATION_ATTRIBUTES_CHANGED", "SYSTEM_CONVERSATION_DISCOVERABLE_CHANGED", "SYSTEM_CONVERSATION_FORKED_NEXT", "SYSTEM_CONVERSATION_FORKED_PREVIOUS", "SYSTEM_CONVERSATION_MEMBERSHIP_CHANGED", "SYSTEM_CONVERSATION_NAME_CHANGED", "SYSTEM_CONVERSATION_STATE_CLOSED_CHAINED", "SYSTEM_CONVERSATION_STATE_CLOSED_DISABLED", "SYSTEM_CONVERSATION_STATE_CLOSED_DROPPED", "SYSTEM_CONVERSATION_STATE_CLOSED_RESOLVED", "SYSTEM_CONVERSATION_STATE_OPEN_ACTIVE", "SYSTEM_CONVERSATION_TYPE_FIELDS_CHANGED", "SYSTEM_GENERIC", "SYSTEM_RTC_CONFERENCE", "SYSTEM_RTC_CONFERENCE_RECORDING_AVAILABLE", "SYSTEM_UPLOAD_GROUP", "SYSTEM_VERSION_ADDED", "SYSTEM_WIDGET", "SYSTEM_WIDGET_CREATED", "SYSTEM_WIDGET_REMOVED", "USER_ANNOTATION", "USER_ANNOTATION_GROUP", "USER_CHAT", "WEBHOOK_CHAT" ]
    V1 Message Types.

Examples

The following example shows how to create a new top-level message in the specified conversation by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -X POST -c mycookies.jar -b mycookies.jar -H 'X-Waggle-RandomID:b97554e5a31e50a734899ee4f79218bd' -H 'Content-Type: application/json' -d '{"message" : "New message goes here", "extrnalID" : "" }' https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/conversations/22006/messages

Example of Request Body

The following shows an example of the request document in JSON format.

{
  "message": "A new message goes here",
  "externalID": "oracle.psr.conv.ext0002AA ",
}

Example of Response Body

The following shows an example of the response JSON document.

{
  "id" : "24021",
  "objectType" : "waggle/chat",
  "createdByID" : "11001",
  "createdByUserName" : "jeff.pringle@example.com",
  "createdByUserDisplayName" : "jeff.pringle@example.com",
  "createdByURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/people/11001",
  "createdDate" : 1455328345045,
  "modifiedByID" : "11001",
  "modifiedByUserName" : "jeff.pringle@example.com",
  "modifiedByUserDisplayName" : "jeff.pringle@example.com",
  "modifiedByURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/people/11001",
  "modifiedDate" : 1455328345045,
  "isRemoved" : false,
  "url" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/messages/24021",
  "conversationURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/conversations/22006",
  "ordinal" : 2,
  "type" : "USER_CHAT",
  "richText" : "New message goes here",
  "plainText" : "New message goes here",
  "version" : 1,
  "isSystem" : false,
  "nComments" : 0,
  "followupsURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/messages/24021/followups",
  "likesURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/messages/24021/likes",
  "starsURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/messages/24021/stars"
}