Create A thread on a ticket

I have a form on my website which allows a customer to send us a support request. I am using ‘crm/v3/objects/tickets’ to create the ticket.

I would like to add a message to the ticket so that it can be seen easily in helpdesk.

I see there is ‘/conversations/v3/conversations/threads/:threadId/messages’ which will let me add a message once I have the threadId.

After creating the ticket via the api, how do I create the thread so I can send messages to it?

Thanks,

StevenKlein

Hi @StevenDaVinci ,

If I’m not mistaken, you should be able to use the following endpoint: https://api.hubapi.com/conversations/v3/conversations/threads/{threadId}

It’s the ‘Get a single thread’ endpoint in the docs.

Or you can retirve ticket with its associated objects using this api :

https://api.hubapi.com/crm/v3/objects/tickets/{ticketId}

For reference take a look into this :

:white_check_mark: Did my answer solve your issue? Help the community by marking it as the solution.

Hello @Bhupendra_Kumar ,

Thank you for the response.

I saw the ‘Get A Single Thread’ api, and it would work if I had the thread ID.

When I first create the ticket and then run https://api.hubapi.com/crm/v3/objects/tickets/{ticketId}?associations=conversations, there no associated conversations, and therefor I have no way of getting the threadID.

Any idea on how to get the thread ID on a newly created ticket from the api?

Thanks,

Steven

Hi @StevenDaVinci
I think there is a solution already to it , you can take reference from here :

https://community.hubspot.com/t5/APIs-Integrations/Get-thread-ID-for-a-conversation-from-a-ticket/m-p/1022835#M75585

:check_mark: Did my answer solve your issue? Help the community by marking it as the solution.

Hello @Bhupendra_Kumar

I created a ticket using

POST https://api.hubapi.com/crm/v3/objects/tickets/

I then tried getting the threadID using

https://api.hubapi.com/crm/v3/objects/tickets/:ID?properties=hs_conversations_originating_thread_id

The response was

{
 "id": "16680216397",
 "properties": {
 "createdate": "2024-11-20T13:17:47.745Z",
 "hs_conversations_originating_thread_id": null,
 "hs_lastmodifieddate": "2024-11-20T13:17:49.100Z",
 "hs_object_id": "16680216397"
 },
 "createdAt": "2024-11-20T13:17:47.745Z",
 "updatedAt": "2024-11-20T13:17:49.100Z",
 "archived": false
}

It looks like the threadID is null, which I can not post to. Any Idea how to make that not null?

Hi @StevenDaVinci ,

The thread id was generated for conversations and if no conversation is started you will not get thread id .

In your case you created just a ticket not conversation has been started for now thats why it is giving you null .

Hello @Bhupendra_Kumar

How do I start a conversation on and link it to the ticket?

Hi @StevenDaVinci ,
did you actually solve this? The accepted solution is not really a solution, right? :slightly_smiling_face:
Would really appreciate any clues on how to solve this exact problem.
Best,

Anders

Hello @ajinvise

Yeah, I started working on other things and I have no idea how the answer got marked as a solution. The real solution was that I emailed with a rep from hubspot and at the time of this threaad was told that it is impossible. Sorry, that is probably not the answer you were looking for.

My work around was to put all the details in the description of the ticket and link the user who wanted to open the ticket. At that time, someone can email the user from the website and that will start a conversation. Since all the info was in the description, it was ok for my use.

Sorry for the dissapointment,

Steven

Maybe hubspot customer Service has a better answer now? I don’t know. Sorry I don’t have a better answer.