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

# Send message to conversation

Reply within a conversation

POST
/`api`/`messages`/`conversations`/`{conversationId}`/`messages`

## Authorization

Authorization Bearer <token>

In: `header`

## Path Parameters

conversationId integer
Format `int64`

## Request Body

content?string
replyToId?integer
Format `int64`

## Response Body

###

    curl -X POST "https://www.open-isle.com/api/messages/conversations/0/messages" \  -H "Content-Type: application/json" \  -d '{}'

    {
      "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
        }
      ]
    }

Get conversation GET

Previous Page

Mark conversation read POST

Next Page

    curl -X POST "https://www.open-isle.com/api/messages/conversations/0/messages" \
      -H "Content-Type: application/json" \
      -d '{}'