Conversation

Catalog


GET All

Request path:

https://server.kahla.app/Conversation/All

Request example:

https://server.kahla.app/Conversation/All

Try

Possible Response:

{
  "items": [
    {
      "displayName": "an example string.",
      "displayImagePath": "an example string.",
      "latestMessage": {
        "id": "f09c7902-50c7-4d6e-8240-316ffca6d288",
        "conversationId": 0,
        "ats": [
          {
            "targetUserId": "an example string."
          }
        ],
        "senderId": "an example string.",
        "sender": {
          "markEmailPublic": true,
          "themeId": 0,
          "email": "an example string.",
          "enableEmailNotification": true,
          "enableEnterToSendMessage": true,
          "enableInvisiable": true,
          "listInSearchResult": true,
          "isOnline": true,
          "id": "an example string.",
          "bio": "an example string.",
          "nickName": "an example string.",
          "sex": "an example string.",
          "iconFilePath": "an example string.",
          "preferedLanguage": "an example string.",
          "accountCreateTime": "2023-10-01T22:26:05.1285837Z",
          "emailConfirmed": true
        },
        "sendTime": "2023-10-01T22:26:05.1287221Z",
        "content": "an example string.",
        "read": true,
        "groupWithPrevious": true
      },
      "unReadAmount": 0,
      "conversationId": 0,
      "discriminator": "an example string.",
      "userId": "an example string.",
      "aesKey": "an example string.",
      "muted": true,
      "someoneAtMe": true,
      "online": true
    }
  ],
  "code": 0,
  "message": "an example string.",
  "protocolVersion": "0.0.0.0"
}

Possible Response:

{
  "code": -1,
  "message": "Some error.",
  "protocolVersion": "7.0.2.0"
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!",
  "protocolVersion": "7.0.2.0"
}

GET Get message

Request path:

https://server.kahla.app/Conversation/GetMessage

Request example:

https://server.kahla.app/Conversation/GetMessage?id=0&take=0&skipFrom=yourskipFrom

Try

Request arguments:

Name Required Type
id Required Number
take Not required Number
skipFrom Not required Text

Possible Response:

{
  "items": [
    {
      "id": "8b521219-9cd9-4db5-91d9-df39f5e34191",
      "conversationId": 0,
      "ats": [
        {
          "targetUserId": "an example string."
        }
      ],
      "senderId": "an example string.",
      "sender": {
        "markEmailPublic": true,
        "themeId": 0,
        "email": "an example string.",
        "enableEmailNotification": true,
        "enableEnterToSendMessage": true,
        "enableInvisiable": true,
        "listInSearchResult": true,
        "isOnline": true,
        "id": "an example string.",
        "bio": "an example string.",
        "nickName": "an example string.",
        "sex": "an example string.",
        "iconFilePath": "an example string.",
        "preferedLanguage": "an example string.",
        "accountCreateTime": "2023-10-01T22:26:05.1416472Z",
        "emailConfirmed": true
      },
      "sendTime": "2023-10-01T22:26:05.1418526Z",
      "content": "an example string.",
      "read": true,
      "groupWithPrevious": true
    }
  ],
  "code": 0,
  "message": "an example string.",
  "protocolVersion": "0.0.0.0"
}

Possible Response:

{
  "code": -1,
  "message": "Some error.",
  "protocolVersion": "7.0.2.0"
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!",
  "protocolVersion": "7.0.2.0"
}

POST Send message

Request path:

https://server.kahla.app/Conversation/SendMessage

Request example:

https://server.kahla.app/Conversation/SendMessage?Id=0&Content=yourContent&At[0]=yourAt&At[1]=yourAt&At[2]=yourAt&MessageId=yourMessageId

Request content type:

application/x-www-form-urlencoded

Form content example:

Id=0&Content=yourContent&At[0]=yourAt&At[1]=yourAt&At[2]=yourAt&MessageId=yourMessageId 

Request form:

Name Required Type
Id Required Number
Content Required Text
At Not required Text Collection
MessageId Required Text

Possible Response:

{
  "value": {
    "id": "ad40382f-e19f-4a2e-8d61-51d256acfda8",
    "conversationId": 0,
    "ats": [
      {
        "targetUserId": "an example string."
      }
    ],
    "senderId": "an example string.",
    "sender": {
      "markEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "enableInvisiable": true,
      "listInSearchResult": true,
      "isOnline": true,
      "id": "an example string.",
      "bio": "an example string.",
      "nickName": "an example string.",
      "sex": "an example string.",
      "iconFilePath": "an example string.",
      "preferedLanguage": "an example string.",
      "accountCreateTime": "2023-10-01T22:26:05.1470768Z",
      "emailConfirmed": true
    },
    "sendTime": "2023-10-01T22:26:05.1471556Z",
    "content": "an example string.",
    "read": true,
    "groupWithPrevious": true
  },
  "code": 0,
  "message": "an example string.",
  "protocolVersion": "0.0.0.0"
}

Possible Response:

{
  "code": -1,
  "message": "Some error.",
  "protocolVersion": "7.0.2.0"
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!",
  "protocolVersion": "7.0.2.0"
}

GET Conversation detail

Request path:

https://server.kahla.app/Conversation/ConversationDetail

Request example:

https://server.kahla.app/Conversation/ConversationDetail?id=0

Try

Request arguments:

Name Required Type
id Required Number

Possible Response:

{
  "value": {
    "users": [
      {
        "id": 0,
        "joinTime": "2023-10-01T22:26:05.1518747Z",
        "muted": true,
        "userId": "an example string.",
        "user": {
          "markEmailPublic": true,
          "themeId": 0,
          "email": "an example string.",
          "enableEmailNotification": true,
          "enableEnterToSendMessage": true,
          "enableInvisiable": true,
          "listInSearchResult": true,
          "isOnline": true,
          "id": "an example string.",
          "bio": "an example string.",
          "nickName": "an example string.",
          "sex": "an example string.",
          "iconFilePath": "an example string.",
          "preferedLanguage": "an example string.",
          "accountCreateTime": "2023-10-01T22:26:05.1531131Z",
          "emailConfirmed": true
        },
        "groupId": 0,
        "readTimeStamp": "2023-10-01T22:26:05.1535015Z"
      }
    ],
    "groupImagePath": "an example string.",
    "groupName": "an example string.",
    "listInSearchResult": true,
    "hasPassword": false,
    "ownerId": "an example string.",
    "id": 0,
    "discriminator": "an example string.",
    "aesKey": "an example string.",
    "maxLiveSeconds": 0,
    "conversationCreateTime": "2023-10-01T22:26:05.1549063Z",
    "displayName": "an example string.",
    "displayImagePath": "an example string."
  },
  "code": 0,
  "message": "an example string.",
  "protocolVersion": "0.0.0.0"
}

Possible Response:

{
  "code": -1,
  "message": "Some error.",
  "protocolVersion": "7.0.2.0"
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!",
  "protocolVersion": "7.0.2.0"
}

GET File history

Request path:

https://server.kahla.app/Conversation/FileHistory

Request example:

https://server.kahla.app/Conversation/FileHistory?id=0&skipDates=0

Try

Request arguments:

Name Required Type
id Required Number
skipDates Required Number

Possible Response:

{
  "showingDateUTC": "an example string.",
  "siteName": "an example string.",
  "rootPath": "an example string.",
  "items": [
    {
      "fileName": "an example string.",
      "fileSize": 0,
      "uploadTime": "2023-10-01T22:26:05.1641371Z"
    }
  ],
  "code": 0,
  "message": "an example string.",
  "protocolVersion": "0.0.0.0"
}

Possible Response:

{
  "code": -1,
  "message": "Some error.",
  "protocolVersion": "7.0.2.0"
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!",
  "protocolVersion": "7.0.2.0"
}

POST Update message life time

Request path:

https://server.kahla.app/Conversation/UpdateMessageLifeTime

Request example:

https://server.kahla.app/Conversation/UpdateMessageLifeTime?Id=0&NewLifeTime=0

Request content type:

application/x-www-form-urlencoded

Form content example:

Id=0&NewLifeTime=0 

Request form:

Name Required Type
Id Required Number
NewLifeTime Required Number

Possible Response:

{
  "code": -1,
  "message": "Some error.",
  "protocolVersion": "7.0.2.0"
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!",
  "protocolVersion": "7.0.2.0"
}