- Returning.AI
- Auth
- User
- Server
- Category
- Role
- Channel
- Language Setting
- Leaderboard
- Badge
- Gamification
- Api Token
- Custom Userfields
- Integration
post dm message to channel
Developing
POST
/server/{serverId}/{topicId}/dm
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
serverId
string
required
topicId
string
required
Header Params
genesiv-key
string
optional
genesiv-password
string
optional
Body Params application/json
sender
integer
required
recipient
integer
required
text
string
required
tabName
string
optional
class
string
required
fileName
string
optional
fileUri
string
optional
unread
integer
required
msgReplyof
object
required
Example
{
"sender": 42,
"recipient": 64,
"text": "test message",
"tabName": "",
"class": "yellow",
"fileName": "",
"fileUri": "",
"unread": 1,
"msgReplyof": {}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/server///dm' \
--header 'genesiv-key;' \
--header 'genesiv-password;' \
--header 'Content-Type: application/json' \
--data-raw '{
"sender": 42,
"recipient": 64,
"text": "test message",
"tabName": "",
"class": "yellow",
"fileName": "",
"fileUri": "",
"unread": 1,
"msgReplyof": {}
}'
Responses
🟢200Success
application/json
Body
success
boolean
required
data
object
required
isRead
boolean
required
isDeleted
boolean
required
parent
string
required
reactions
array[string]
required
pinned
boolean
required
_id
string
required
sender
object
required
recipient
object
required
text
string
required
tabName
string
required
class
string
required
fileName
string
required
fileUri
string
required
unread
integer
required
date
string
required
__v
integer
required
Example
{
"success": true,
"data": {
"isRead": true,
"isDeleted": false,
"parent": "0",
"reactions": [],
"pinned": false,
"_id": "651d93b6a81f2328e880746f",
"sender": {
"server_roles": [
"6108d1c9e9971223cbce43f8",
"61123a0b5eb6684efa2fad21"
],
"sid": [],
"id": "42",
"avatar": "https://s3.us-east-2.amazonaws.com/chartsnapshot/forexUser/123/d699286e08f6794b8fdbb784b2678f5.jfif",
"email": "des@genesif.com",
"name": "Desmond Leong",
"nicename": "des",
"displayname": "Desmond222"
},
"recipient": {
"server_roles": [
"6108d1c9e9971223cbce43f8",
"6119a592163be113b273cb62"
],
"sid": [],
"id": "64",
"avatar": "https://s3.us-east-2.amazonaws.com/chartsnapshot/forexUser/123/7ac8d8abeb7bc38a9af14302e83b3b4.png",
"email": "kay@genesif.com",
"name": "Kaylene Lee",
"nicename": "kaylenelee"
},
"text": "test message",
"tabName": "",
"class": "yellow",
"fileName": "",
"fileUri": "",
"unread": 1,
"date": "2023-10-04T16:32:54.403Z",
"__v": 0
}
}
Modified at 2024-07-28 16:27:51