Skip to content

Create Direct Message

Request

Sends a direct message to one user, opening the direct conversation if it does not exist yet. The response's chat_message.conversation_uid addresses that conversation for later messages and reads.

Operation ID: chat_create_direct_message

Security
BearerAuth
Query
metaArray of strings

Add metadata to the response by invoking meta functions. Documentation for meta functions is available. Not all meta functions are available at every endpoint.

Bodyapplication/jsonrequired
userobject(UserReference)required

The user to message.

messagestringrequired

The plain-text content of the message.

curl
curl -i -X POST \
  https://api.synqly.com/v1/chat/direct-messages \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "user": {},
    "message": "string"
  }'

Responses

Bodyapplication/json
resultobject(ocsfv1.8.0chatmessageactivityChatMessageActivity)required

The message that was written.

messagesobject or null(MessagesResponse)

Additional messages from the service response that may be helpful to the client.

metaobject or null(MetaResponse)

Various metadata about the results organized by group, then type, then field.

Response
{ "result": { "activity_id": 0, "activity_name": "string", "actor": { … }, "category_name": "string", "category_uid": 0, "chat_message": { … }, "class_uid": 0, "count": 0, "duration": 0, "end_time": 0, "end_time_dt": "2019-08-24T14:15:22Z", "enrichments": [ … ], "message": "string", "metadata": { … }, "observables": [ … ], "raw_data": "string", "raw_data_hash": { … }, "raw_data_size": 0, "severity": "string", "severity_id": 0, "start_time": 0, "start_time_dt": "2019-08-24T14:15:22Z", "status": "string", "status_code": "string", "status_detail": "string", "status_id": 0, "time": 0, "time_dt": "2019-08-24T14:15:22Z", "timezone_offset": 0, "type_name": "string", "type_uid": 0, "unmapped": {} }, "messages": { "problems": [ … ] }, "meta": { "stats": { … }, "api": { … }, "mapping": { … } } }