Assign Chat
Assigns a chat to a user — the way an integration hands a conversation to a person.
Request
PUT /v2/chats/5a0da3c3-4882-3352-8db9-8fc47e14111f/assign HTTP/1.1
Authorization: Bearer oauth_token
Content-Type: application/json
{
"assignedTo": 154870
}
Path Parameters
/v2/chats/{chatId}/assign
Request Body
| Name | Type | Description |
|---|---|---|
assignedTo |
Number |
The id of the user to assign the chat to. Required. |
An id is all that is needed — Help Scout resolves the user and checks that they can access the chat’s inbox.
Reassigning a chat held by somebody else is allowed, and the caller does not have to be the current holder. Assigning to the user who already holds it changes nothing.
Say something before you hand over
Assignment is silent to the visitor. A chat that changes hands with no message reads as being ignored, so send a message first, then assign.
Nothing checks whether that person is available
Assigning to a user who is not currently available succeeds. The visitor is then waiting on somebody who is not there, and the API does not warn about it. If your integration escalates to a person, confirm they are around before choosing them.
Response
Every write answers with the chat, in the same shape Get Chat returns — so a caller sees the result of what it just did without a follow-up read.
HTTP/1.1 200 OK
Content-Type: application/hal+json
{
"id": "5a0da3c3-4882-3352-8db9-8fc47e14111f",
"beaconId": "ed8e9fe0-acf4-4b44-b1fc-a5bff956e7a8",
"mailboxId": 2599,
"createdAt": "2020-07-03T07:03:29.982028Z",
"assignee": { "id": 4440, "type": "agent", "first": "Jack", "last": "Sprout" },
"customer": { "id": 498746, "type": "customer", "first": "Vernon", "last": "Bear" },
"_embedded": {
"events": [ "..." ]
},
"_links": {
"self": { "href": "..." }
}
}
The full field reference is on Get Chat.
Errors
| Status | When |
|---|---|
403 |
The caller cannot use chat or cannot access the chat’s inbox |
404 |
No such chat, the chat belongs to another company, or the chat has ended |
422 |
assignedTo is missing, is not a user id, or names a user who cannot access the inbox |