OpenIsle Docs
API 概览
Send message POST
List conversations GET Find or create conversation POST
Api
Messages
Conversations

# List conversations

Get all conversations of current user

GET
/`api`/`messages`/`conversations`

## Authorization

Authorization Bearer <token>

In: `header`

## Response Body

###

    curl -X GET "https://www.open-isle.com/api/messages/conversations"

    [
      {
        "id": 0,
        "name": "string",
        "channel": true,
        "avatar": "string",
        "lastMessage": {
          "id": 0,
          "content": "string",
          "sender": {
            "id": 0,
            "username": "string",
            "avatar": "string"
          },
          "conversationId": 0,
          "createdAt": "2019-08-24T14:15:22Z",
          "replyTo": {
            "id": 0,
            "content": "string",
            "sender": {
              "id": 0,
              "username": "string",
              "avatar": "string"
            },
            "conversationId": 0,
            "createdAt": "2019-08-24T14:15:22Z",
            "replyTo": {},
            "reactions": [
              {
                "id": 0,
                "type": "LIKE",
                "user": "string",
                "postId": 0,
                "commentId": 0,
                "messageId": 0,
                "reward": 0
              }
            ]
          },
          "reactions": [
            {
              "id": 0,
              "type": "LIKE",
              "user": "string",
              "postId": 0,
              "commentId": 0,
              "messageId": 0,
              "reward": 0
            }
          ]
        },
        "participants": [
          {
            "id": 0,
            "username": "string",
            "avatar": "string"
          }
        ],
        "createdAt": "2019-08-24T14:15:22Z",
        "unreadCount": 0
      }
    ]

Send message POST

Previous Page

Find or create conversation POST

Next Page

    curl -X GET "https://www.open-isle.com/api/messages/conversations"