Clarification on messages API

Hi, I have an inbox, which i would like to send and recieve messages using the API

The API I’m using is:

https://api.hubapi.com/conversations/v3/conversations/threads/{thread_id}/messages

I’m using a private app, with the relavant scopes’s api-key to send out these requests.

When I send from hubspot user to visitor, it works perfectly:

Request:

{
 "type": "MESSAGE",
 "text": "Message from Hubspot",
 "recipients": [
 {
 "actorId": "V-159626167486"
 }
 ],
 "senderActorId": "A-62822953",
 "channelId": "1000",
 "channelAccountId": "997975494"
}

Response 201: Created

However when I want to reponsd to that message on the same thread (from user to hubspot), reversing the sender and reciever with this request:

{
 "type": "MESSAGE",
 "text": "Message from User",
 "recipients": [
 {
 "actorId": "A-62822953"
 }
 ],
 "senderActorId": "V-159626167486",
 "channelId": "1000",
 "channelAccountId": "997975494"
}

I get errors:

{
 "status": "error",
 "message": "Multiple errors validating request.",
 "correlationId": "4dba105c-0db2-48b8-8ddc-894d9ed57b64",
 "errors": [
 {
 "subCategory": "ConversationsApiError.CHANNEL_ACCOUNT_CANNOT_SEND_MESSAGE_ON_THREAD",
 "message": "Channel 1000 is not eligible to send message on thread 9619400934",
 "context": {
 "channelId": [
 "1000"
 ],
 "threadId": [
 "9619400934"
 ]
 }
 },
 {
 "subCategory": "ConversationsApiError.UNSUPPORTED_ACTOR_TYPE",
 "message": "Actor type VISITOR is not supported for sending",
 "context": {
 "actorType": [
 "VISITOR"
 ],
 "operation": [
 "sending"
 ]
 }
 },
 {
 "subCategory": "ConversationsApiError.INVALID_ARGUMENT_TYPE",
 "message": "Invalid actorId type",
 "context": {
 "parameter": [
 "actorId"
 ]
 }
 },
 {
 "subCategory": "ConversationsApiError.UNSUPPORTED_ACTOR_TYPE",
 "message": "Actor type AGENT is not supported for receiving",
 "context": {
 "actorType": [
 "AGENT"
 ],
 "operation": [
 "receiving"
 ]
 }
 }
 ],
 "category": "VALIDATION_ERROR"
}

How can I reverse the roles, so I can send from both sides.

Or atleast make visitor able to send messages to actors

Hey, @ApiGuyWasTaken :waving_hand: Can you clarify your goal a bit more, please? Are you asking if you can reply as the “visitor”?

Thanks for the additional information! — Jaycee

Hi Jaycee Lewis, thanks for the quick response. To clarify, I need to be able to send messages from User (That is created as a contact on HubSpot) to Hubspot inbox

^

This is the issue I’m facing

I also need to send messages from HubSpot account to User (This is no problem currently).

So I can create 2-way communication between a HubSpot account and a visitor