Conversation / Add

In the Ozeki Chat Client, the Conversation / Add API request plays a pivotal role in facilitating real-time communication by enabling users to upload new messages to ongoing conversations. By invoking the conversation add action, users seamlessly contribute to the conversation flow, ensuring that their messages are visible to other participants. Upon successful upload, the API returns pertinent data regarding the uploaded message, enhancing transparency and facilitating smooth interaction within the chat environment.

Conversation add message request

Method: POST
URL: ?srv=chatserver&api=chatconversation
Request headers: Content-Type: application/json
Ozeki-Signature: signature
Ozeki-Station: stationId
Ozeki-User: userId
POST data:
{
  "action": "add",
  "conversationid": "8ca16186c36a4e0a1ef2096e6c60b613",
  "instance": "PqjfKSn7V8",
  "message": "{
	  \"ID\":\"fc2515cb-e483-4f64-936b-98f680565c96\",
	  \"Type\":\"Message\",
	  \"Created\":\"2024-03-08 14:12:48\",
	  \"ValidUntil\":\"2024-03-15 14:12:48\",
	  \"Data\":\"lAfhx6hm...yRvIa28=\"}",
  "clientversioncode": 3,
  "timestamp": "2024-03-08 14:12:48"
}

Conversation add message response

Response headers Content-Type: application/json
Response data:
{
  "status": "OK",
  "errormessage": "",
  "message": {
    "ID": "fc2515cb-e483-4f64-936b-98f680565c96",
    "Type": "Message",
    "Created": "2024-03-08 14:12:48",
    "ValidUntil": "2024-03-15 14:12:48"
  }
}

Request parameters

userid: This parameter contains the user id of the user. This field can be calculated by taking the md5 checksum of the user's e-mail address. For example: md5("alice@ozeki.hu") = "aa68d2204cb2bb85f2de3b9aad0d86d7";

timestamp: yyyy-MM-dd hh:mm:ss format, in UTC timezone, it's the client's responsibility to convert it into the local timezone.

More information