Skype for Business - sendMessage Resource

sendMessage

  • JSON
  • XML

Sends an instant message to the participants in a conversation.

Web link

For more on web links, see Web Links.

Name Description
relThe resource that this link points to. In JSON, this is the outer container.
hrefThe location of this resource on the server, and the target of an HTTP operation.

Resource description

Applications can use sendMessage to compose an outgoing instant message. This link is available only when the messaging modality is connected.

Properties

None

Links

None

Operations

  • POST

Passes an HTML body to the server, and starts a message operation in the event channel.

Query parameters

Click here to see the input values.

Name Description Required?
operationId An application-supplied identifier to track the message resource created by the server. Yes

Request body

Click here to see the input values.

Name Description Required?
operationId An application-supplied identifier to track the message resource created by the server. Yes

Response body

Item Description
message Represents an instant message sent or received by the local participant.

Synchronous errors

The errors below (if any) are specific to this resource. Generic errors that can apply to any resource are covered in Generic synchronous errors.

Error Code Subcode Description
ServiceFailure500CallbackChannelError
Conflict409AlreadyExists
Conflict409TooManyGroups
Conflict409None

Examples

Only server-supplied query parameters, if any, are shown in the request sample.

Request

Post https://fe1.contoso.com:443//v1/applications/970/communication/conversations/314/messaging/sendMessage HTTP/1.1
Authorization: Bearer cwt=PHNhbWw6QXNzZXJ0aW9uIHhtbG5...uZm8
Host: fe1.contoso.com
Content-Type: text/html
Content-Length: 12
<h>Hello</h>
  

JSON Response

This sample is given only as an illustration of response syntax. The semantic content is not guaranteed to correspond to a valid scenario.

HTTP/1.1 201 Created
Location: //v1/applications/970/communication/conversations/314/messaging/messages/740

  

Request

Post https://fe1.contoso.com:443//v1/applications/970/communication/conversations/314/messaging/sendMessage HTTP/1.1
Authorization: Bearer cwt=PHNhbWw6QXNzZXJ0aW9uIHhtbG5...uZm8
Host: fe1.contoso.com
Content-Type: text/html
Content-Length: 12
<h>Hello</h>
  

XML Response

This sample is given only as an illustration of response syntax. The semantic content is not guaranteed to correspond to a valid scenario.

HTTP/1.1 201 Created
Location: //v1/applications/970/communication/conversations/314/messaging/messages/740