Invite to a UserChat

Invite a manager to a particular UserChat

Parameter

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

๐Ÿ“˜

Present parameters in query string.

ParameterExampleRequiredDescriptionParameter type
userChatId5e65fa8bc2409f0c1fd3RequiredID of UserChatPath
botNamechannelBotRequiredName of the inviting botQuery
managerIds1231RequiredManager IDQuery

Example

PATCH https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/invite?botName=channelBot&managerIds=141241&managerIds=1231

Response

Returns UserChat object along with related information

{
   "userChat":{
      "id":"string",
      "channelId":"string",
      "contactKey":"string",
      "contactOrder":1656032152515,
      "contactMediumType":"string",
      "state":"closed",
      "managed":true,
      "userId":"string",
      "name":"string",
      "description":"string",
      "handling":{
         "type":"string"
      },
      "source":{
         "page":"string",
         "marketing":{
            "id":"string",
            "type":"string"
         },
         "supportBot":{
            "id":"string",
            "revisionId":"string",
            "sectionPath":[
               "string"
            ]
         }
      },
      "managerIds":[
         "string"
      ],
      "assigneeId":"string",
      "teamId":"string",
      "tags":[
         "string"
      ],
      "goalEventName":"string",
      "goalEventQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "goalCheckedAt":1656032152525,
      "firstOpenedAt":1656032152526,
      "openedAt":1656032152526,
      "createdAt":1656032152527,
      "frontMessageId":"string",
      "frontUpdatedAt":1656032152527,
      "deskMessageId":"string",
      "deskUpdatedAt":1656032152529,
      "firstAssigneeIdAfterOpen":"string",
      "firstRepliedAtAfterOpen":1656032152526,
      "oneStop":true,
      "waitingTime":0,
      "avgReplyTime":0,
      "totalReplyTime":0,
      "replyCount":0,
      "resolutionTime":0,
      "operationWaitingTime":0,
      "operationAvgReplyTime":0,
      "operationTotalReplyTime":0,
      "operationReplyCount":0,
      "operationResolutionTime":0,
      "firstAskedAt":1656032152526,
      "askedAt":1656032152526,
      "closedAt":1656032152526,
      "snoozedAt":1656032152525,
      "expiresAt":1656032152537,
      "version":0,
      "goalState":"achieved"
   },
   "campaign":{
      "id":"string",
      "channelId":"string",
      "name":"string",
      "state":"draft",
      "sendMedium":"appAlimtalk",
      "userQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "triggerEventName":"string",
      "triggerEventQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "waitingTime":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      },
      "filterEventName":"string",
      "filterEventQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "filterMatch":"positive",
      "goalEventName":"string",
      "goalEventQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "goalEventDuration":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      },
      "advertising":true,
      "sendToOfflineXms":true,
      "sendToOfflineEmail":true,
      "cooldown":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      },
      "sendMode":"always",
      "sendTimeRanges":{
         "timeRanges":[
            {
               "dayOfWeeks":[
                  "mon"
               ],
               "from":0,
               "to":0
            }
         ]
      },
      "startAt":1656032152400,
      "endAt":1656032152400,
      "draft":{
         "campaign":{
            
         },
         "msgs":[
            {
               "vanilla":{
                  "id":"string",
                  "campaignId":"string",
                  "channelId":"string",
                  "name":"string",
                  "sendMedium":"appAlimtalk",
                  "settings":{
                     "type":"string"
                  },
                  "createdAt":1656032152405,
                  "updatedAt":1656032152405,
                  "sent":0,
                  "view":0,
                  "goal":0,
                  "click":0
               }
            }
         ]
      },
      "createdAt":1656032152405,
      "updatedAt":1656032152405,
      "sent":0,
      "view":0,
      "goal":0,
      "click":0,
      "userChatExpireDuration":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      },
      "managerId":"string"
   },
   "bookmark":{
      "key":"string",
      "chatId":"string",
      "chatKey":"string",
      "bookmarkKey":"string",
      "channelId":"string",
      "version":0,
      "personType":"string",
      "personId":"string",
      "chatType":"string"
   },
   "session":{
      "key":"string",
      "chatId":"string",
      "chatKey":"string",
      "updatedKey":"string",
      "unreadKey":"string",
      "channelId":"string",
      "alert":0,
      "unread":0,
      "watch":"all",
      "allMentionImportant":true,
      "readAt":1656032152418,
      "receivedAt":1656032152418,
      "postedAt":1656032152418,
      "updatedAt":1656032152427,
      "createdAt":1656032152427,
      "version":0,
      "id":"string",
      "personType":"string",
      "personId":"string",
      "chatType":"string"
   },
   "userSession":{
      "key":"string",
      "chatId":"string",
      "chatKey":"string",
      "updatedKey":"string",
      "unreadKey":"string",
      "channelId":"string",
      "alert":0,
      "unread":0,
      "watch":"all",
      "allMentionImportant":true,
      "readAt":1656032152418,
      "receivedAt":1656032152418,
      "postedAt":1656032152418,
      "updatedAt":1656032152427,
      "createdAt":1656032152427,
      "version":0,
      "id":"string",
      "personType":"string",
      "personId":"string",
      "chatType":"string"
   },
   "chatTags":[
      {
         "id":"string",
         "channelId":"string",
         "colorVariant":"red",
         "name":"string",
         "key":"string",
         "description":"string",
         "followerIds":[
            "string"
         ],
         "createdAt":1656032152405
      }
   ],
   "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":1656032152433,
      "version":0,
      "blocks":[
         {
            "type":"bullets",
            "language":"string",
            "value":"string",
            "blocks":[
               null
            ]
         }
      ],
      "plainText":"string",
      "updatedAt":1656032152427,
      "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"
            ]
         }
      ],
      "form":{
         "inputs":[
            {
               "value":{
                  
               },
               "readOnly":true,
               "type":"text",
               "label":"string",
               "dataType":"string",
               "bindingKey":"string"
            }
         ],
         "submittedAt":1656032153409,
         "type":"string"
      },
      "state":"sending",
      "options":[
         "actAsManager"
      ],
      "marketing":{
         "type":"string",
         "id":"string",
         "advertising":true,
         "sendToOfflineXms":true,
         "sendToOfflineEmail":true,
         "exposureType":"fullScreen"
      },
      "supportBot":{
         "id":"string",
         "revisionId":"string",
         "sectionId":"string",
         "stepIndex":0,
         "buttons":[
            {
               "text":"string",
               "nextSectionId":"string"
            }
         ],
         "submitButtonIndex":0
      },
      "action":{
         "type":"select",
         "buttons":[
            {
               "key":"string",
               "text":"string"
            }
         ]
      },
      "submit":{
         "id":"string",
         "key":"string"
      },
      "threadMsg":true,
      "broadcastedMsg":true,
      "rootMessageId":"string"
   },
   "oneTimeMsg":{
      "id":"string",
      "channelId":"string",
      "name":"string",
      "state":"draft",
      "sendMedium":"appAlimtalk",
      "settings":{
         "type":"string"
      },
      "userQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "goalEventName":"string",
      "goalEventQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "goalEventDuration":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      },
      "advertising":true,
      "sendToOfflineXms":true,
      "sendToOfflineEmail":true,
      "startAt":1656032152400,
      "draft":{
         "oneTimeMsg":{
            
         }
      },
      "createdAt":1656032152405,
      "updatedAt":1656032152405,
      "sent":0,
      "view":0,
      "goal":0,
      "click":0,
      "userChatExpireDuration":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      }
   },
   "userOnline":{
      "channelId":"string",
      "personType":"string",
      "personId":"string",
      "id":"string"
   },
   "supportBot":{
      "id":"string",
      "channelId":"string",
      "botName":"string",
      "name":"string",
      "order":0,
      "pageQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "userQuery":{
         "key":"string",
         "type":"boolean",
         "operator":{
            
         },
         "values":[
            {
               
            }
         ],
         "and":[
            null
         ],
         "or":[
            null
         ]
      },
      "draft":{
         "supportBot":{
            
         },
         "sections":[
            {
               "name":"string",
               "actions":[
                  {
                     "type":"string"
                  }
               ],
               "id":"string",
               "steps":[
                  {
                     "message":{
                        "blocks":[
                           {
                              "type":"bullets",
                              "language":"string",
                              "value":"string",
                              "blocks":[
                                 null
                              ]
                           }
                        ],
                        "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"
                        },
                        "form":{
                           "inputs":[
                              {
                                 "value":{
                                    
                                 },
                                 "readOnly":true,
                                 "type":"text",
                                 "label":"string",
                                 "dataType":"string",
                                 "bindingKey":"string"
                              }
                           ],
                           "submittedAt":1656032153409,
                           "type":"string"
                        }
                     }
                  }
               ],
               "type":"string"
            }
         ]
      },
      "revisionId":"string",
      "state":"draft",
      "runMode":"always",
      "start":0,
      "stop":0,
      "chatOpen":0,
      "createdAt":1656032152405,
      "updatedAt":1656032152405,
      "userChatExpireDuration":{
         "seconds":0,
         "nano":0,
         "negative":true,
         "zero":true,
         "units":[
            {
               "dateBased":true,
               "timeBased":true,
               "duration":{
                  "seconds":0,
                  "nano":0,
                  "negative":true,
                  "zero":true
               },
               "durationEstimated":true
            }
         ]
      },
      "managerId":"string"
   },
   "user":{
      "id":"string",
      "channelId":"string",
      "memberId":"string",
      "veilId":"string",
      "unifiedId":"string",
      "type":"member",
      "name":"string",
      "mobileNumberQualified":true,
      "emailQualified":true,
      "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":1656032153127
      },
      "mobile":{
         "device":"string",
         "os":"string",
         "osName":"string",
         "appName":"string",
         "appVersion":"string",
         "sessionsCount":0,
         "lastSeenAt":1656032153127
      },
      "sessionsCount":0,
      "lastSeenAt":1656032153129,
      "createdAt":1656032153129,
      "updatedAt":1656032153129,
      "version":0,
      "managedKey":0,
      "member":true,
      "email":"string",
      "avatarUrl":"string",
      "mobileNumber":"string",
      "systemLanguage":"string"
   }
}