[API] Assign a conversation to a user

Start with the why

Trying to automate some of the support work, it would be useful to have an LLM automatically assign the incoming email to the person most suitable for it (eg. support request → support lead, purchase orders → business lead, etc.).

Move to what

For that, we would need to have API to assign a conversation to a specific user. In docs (Update or restore threads) it seems like you can only open/close thread or delete it, but not assign it to a specific person. I tried below but it doesn’t work.

def assign_thread_to(thread_id: str, asignee_id: str) :

dic = {

‘assignedTo’: asignee_id

}

return send_req(‘PATCH’, f’/conversations/v3/conversations/threads/{thread_id}', data=json.dumps(dic))

Returns

{“status”:“error”,“message”:“Failed to update object. The body of the request is empty.”,“correlationId”:“[some_id]”,“category”:“VALIDATION_ERROR”,“subCategory”:“ConversationsApiError.EMPTY_UPDATE_REQUEST_BODY”}

So this might be more of a feature request. It would be PITA to develop a selenium webdriver that scraps/interacts with the hubspot webapp, but it might be the only path if you want to have full access, which is unfortunate.

Hey, @ErikK :waving_hand: Thanks for the interesting request. I agree with you that the Conversations inbox and messages APIs (BETA) documentation doesn’t list this feature as an option at this time.

Your instinct to make a feature request in the Ideas Forum is a great next step. If you link your post here, I’ll be happy to give it an upvote to get the ball rolling.

Best,

Jaycee

Hi Jaycee, I just created an Idea here :slightly_smiling_face:

Hey, any update?

This is the single feature that prevents us from fully automating a chatflow via api. Really hope HubSpot decides to add this simple feature.

Any update on this? I really need to be posible to assign a different user.