Close a UserChat

Close a particular UserChat

Parameter

Accessible via URL https://api.channel.io/open/v4/user-chats/{userChatId}/close and HTTP PATCH

ParameterExampleRequiredDescriptionParameter type
userChatId5e65fa8bc2409f0c1fd3RequiredID of UserChatPath
botNamechannelBotRequiredName of the removing botQuery

Example

PATCH https://api.channel.io/open/v4/user-chats/5e65fa8bc2409f0c1fd3/close

Response

{
  "userChat": {
    "id": "string",
    "channelId": "string",
    "appUserKey": "string",
    "state": "closed",
    "managed": true,
    "userId": "string",
    "name": "string",
    "description": "string",
    "handling": "waiting",
    "supportBot": {
      "id": "string",
      "revisionId": "string",
      "sectionPath": [
        "string"
      ]
    },
    "marketing": {
      "type": "string",
      "id": "string",
      "enableSupportBot": true,
      "supportBotId": "string"
    },
    "pluginId": "string",
    "sourcePage": "string",
    "messengerType": "string",
    "messengerId": "string",
    "managerIds": [
      "string"
    ],
    "assigneeId": "string",
    "tags": [
      "string"
    ],
    "firstOpenedAt": 1624414657416,
    "openedAt": 1624414657416,
    "createdAt": 1624414657416,
    "frontMessageId": "string",
    "frontUpdatedAt": 1624414657416,
    "deskMessageId": "string",
    "deskUpdatedAt": 1624414657417,
    "firstAssigneeIdAfterOpen": "string",
    "firstRepliedAtAfterOpen": 1624414657416,
    "oneStop": true,
    "waitingTime": 0,
    "avgReplyTime": 0,
    "totalReplyTime": 0,
    "replyCount": 0,
    "resolutionTime": 0,
    "operationWaitingTime": 0,
    "operationAvgReplyTime": 0,
    "operationTotalReplyTime": 0,
    "operationReplyCount": 0,
    "operationResolutionTime": 0,
    "askedAt": 1624414657416,
    "closedAt": 1624414657416,
    "snoozedAt": 1624414657422,
    "expiresAt": 1624414657422,
    "version": 0
  },
  "message": {
    "chatKey": "string",
    "id": "string",
    "mainKey": "string",
    "threadKey": "string",
    "root": true,
    "channelId": "string",
    "chatType": "string",
    "chatId": "string",
    "personType": "string",
    "personId": "string",
    "requestId": "string",
    "language": "string",
    "createdAt": 1624414655810,
    "version": 0,
    "blocks": [
      {
        "type": "bullets",
        "language": "string",
        "value": "string",
        "blocks": [
          null
        ]
      }
    ],
    "plainText": "string",
    "updatedAt": 1624414655811,
    "buttons": [
      {
        "title": "string",
        "colorVariant": "cobalt",
        "url": "string"
      }
    ],
    "files": [
      {
        "id": "string",
        "type": "string",
        "name": "string",
        "size": 0,
        "contentType": "string",
        "duration": 0,
        "width": 0,
        "height": 0,
        "orientation": 0,
        "animated": true,
        "bucket": "string",
        "key": "string",
        "previewKey": "string",
        "channelId": "string",
        "chatType": "string",
        "chatId": "string"
      }
    ],
    "webPage": {
      "id": "string",
      "url": "string",
      "title": "string",
      "description": "string",
      "imageUrl": "string",
      "videoUrl": "string",
      "publisher": "string",
      "author": "string",
      "width": 0,
      "height": 0,
      "bucket": "string",
      "previewKey": "string",
      "logo": "string",
      "name": "string"
    },
    "log": {
      "action": "changeName",
      "values": [
        "string"
      ],
      "triggerType": "string",
      "triggerId": "string"
    },
    "reactions": [
      {
        "emojiName": "string",
        "personKeys": [
          "string"
        ]
      }
    ],
    "profileBot": [
      {
        "id": "string",
        "key": "string",
        "type": "string",
        "name": "string",
        "value": {
          "s": "string",
          "n": "string",
          "b": {
            "short": 0,
            "char": "string",
            "int": 0,
            "long": 0,
            "float": 0,
            "double": 0,
            "direct": true,
            "readOnly": true
          },
          "m": {},
          "l": [
            null
          ],
          "ss": [
            "string"
          ],
          "ns": [
            "string"
          ],
          "bs": [
            {
              "short": 0,
              "char": "string",
              "int": 0,
              "long": 0,
              "float": 0,
              "double": 0,
              "direct": true,
              "readOnly": true
            }
          ],
          "null": true,
          "bool": true
        }
      }
    ],
    "state": "sending",
    "options": [
      "actAsManager"
    ],
    "marketing": {
      "type": "string",
      "id": "string",
      "advertising": true,
      "exposureType": "fullScreen"
    },
    "supportBot": {
      "id": "string",
      "revisionId": "string",
      "sectionId": "string",
      "stepIndex": 0,
      "buttons": [
        {
          "text": "string",
          "nextSectionId": "string"
        }
      ],
      "submitButtonIndex": 0
    },
    "threadMsg": true,
    "broadcastedMsg": true,
    "rootMessageId": "string"
  },
  "bookmark": {
    "key": "string",
    "chatId": "string",
    "chatKey": "string",
    "bookmarkKey": "string",
    "channelId": "string",
    "version": 0,
    "chatType": "string",
    "personType": "string",
    "personId": "string"
  },
  "session": {
    "key": "string",
    "chatId": "string",
    "chatKey": "string",
    "updatedKey": "string",
    "unreadKey": "string",
    "channelId": "string",
    "alert": 0,
    "unread": 0,
    "watch": "all",
    "readAt": 1624414654060,
    "receivedAt": 1624414654060,
    "postedAt": 1624414654060,
    "updatedAt": 1624414654046,
    "createdAt": 1624414654035,
    "version": 0,
    "id": "string",
    "chatType": "string",
    "personType": "string",
    "personId": "string"
  },
  "user": {
    "id": "string",
    "channelId": "string",
    "memberId": "string",
    "veilId": "string",
    "unifiedId": "string",
    "name": "string",
    "profile": {
      "name": "string",
      "empty": true,
      "email": "string",
      "avatarUrl": "string",
      "mobileNumber": "string",
      "additionalProp1": {},
      "additionalProp2": {},
      "additionalProp3": {}
    },
    "profileOnce": {
      "name": "string",
      "empty": true,
      "email": "string",
      "avatarUrl": "string",
      "mobileNumber": "string",
      "additionalProp1": {},
      "additionalProp2": {},
      "additionalProp3": {}
    },
    "tags": [
      "string"
    ],
    "alert": 0,
    "unread": 0,
    "popUpChatId": "string",
    "blocked": true,
    "unsubscribeEmail": true,
    "unsubscribeTexting": true,
    "hasChat": true,
    "hasPushToken": true,
    "language": "string",
    "country": "string",
    "city": "string",
    "latitude": 0,
    "longitude": 0,
    "web": {
      "device": "string",
      "os": "string",
      "osName": "string",
      "browser": "string",
      "browserName": "string",
      "sessionsCount": 0,
      "lastSeenAt": 1624414657951
    },
    "mobile": {
      "device": "string",
      "os": "string",
      "osName": "string",
      "appName": "string",
      "appVersion": "string",
      "sessionsCount": 0,
      "lastSeenAt": 1624414657951
    },
    "sessionsCount": 0,
    "lastSeenAt": 1624414655762,
    "createdAt": 1624414655787,
    "updatedAt": 1624414655762,
    "version": 0,
    "managedKey": 0,
    "member": true,
    "email": "string",
    "avatarUrl": "string",
    "mobileNumber": "string",
    "systemLanguage": "string"
  },
  "userSession": {
    "key": "string",
    "chatId": "string",
    "chatKey": "string",
    "updatedKey": "string",
    "unreadKey": "string",
    "channelId": "string",
    "alert": 0,
    "unread": 0,
    "watch": "all",
    "readAt": 1624414654060,
    "receivedAt": 1624414654060,
    "postedAt": 1624414654060,
    "updatedAt": 1624414654046,
    "createdAt": 1624414654035,
    "version": 0,
    "id": "string",
    "chatType": "string",
    "personType": "string",
    "personId": "string"
  },
  "userOnline": {
    "channelId": "string",
    "personType": "string",
    "personId": "string",
    "id": "string"
  },
  "chatTags": [
    {
      "id": "string",
      "channelId": "string",
      "colorVariant": "red",
      "name": "string",
      "key": "string",
      "description": "string",
      "followerIds": [
        "string"
      ],
      "createdAt": 1624414654079
    }
  ]
}