Skip to main content
POST
/
v1
/
dm
/
conversations
Create DM conversation
curl --request POST \
  --url https://api.magne.app/v1/dm/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "recipientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "recipientUsername": "<string>",
  "recipientDisplayName": "<string>",
  "recipientAvatar": "<string>",
  "recipientStatus": "<string>",
  "lastMessage": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "senderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "content": "<string>",
    "attachments": {},
    "replyToId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "editedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "senderName": "<string>",
    "senderAvatar": "<string>",
    "senderBadges": [
      "<string>"
    ],
    "reactions": {}
  },
  "unreadCount": 123,
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
userId
string<uuid>
required

Response

Success

id
string<uuid>
recipientId
string<uuid>
recipientUsername
string
recipientDisplayName
string
recipientAvatar
string | null
recipientStatus
string
lastMessage
object
unreadCount
integer<int64>
createdAt
string<date-time>