POST api/employees/messages/create

Creates a new employee message.

Request Information

URI Parameters

None.

Body Parameters

CreateEmployeeMessageInput
NameDescriptionTypeAdditional information
ToEmployeeId

integer

None.

Message

string

None.

IsBroadcast

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "ToEmployeeId": 1,
  "Message": "sample string 1",
  "IsBroadcast": true
}

application/xml, text/xml

Sample:
<CreateEmployeeMessageInput xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CWI.Mobile.Domain.DTO.ActionInputs">
  <IsBroadcast>true</IsBroadcast>
  <Message>sample string 1</Message>
  <ToEmployeeId>1</ToEmployeeId>
</CreateEmployeeMessageInput>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CreateEmployeeMessageInput'.

Response Information

Resource Description

An Http response message with the following status codes: 200 = success (returns the EmployeeMeesageId of the created message), 204 = success (no content; is used for broadcast) 400 = bad request (the request is malformed or with invalid data), 403 = forbidden (the employee does not currently have messaging activated), 500 = something went wrong (the request was not processed).

EmployeeMessageIdPair
NameDescriptionTypeAdditional information
NewEmployeeMessageId

integer

None.

ReadEmployeeMessageId

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "NewEmployeeMessageId": 1,
  "ReadEmployeeMessageId": 1
}

application/xml, text/xml

Sample:
<EmployeeMessageIdPair xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CWI.Mobile.Domain.DTO">
  <NewEmployeeMessageId>1</NewEmployeeMessageId>
  <ReadEmployeeMessageId>1</ReadEmployeeMessageId>
</EmployeeMessageIdPair>