connection between tickets and conversation

I would like to know if I can somehow get all the conversations included in a ticket and how to do this, or vice versa, can I get by the id of the conversation which ticket it is attached to?

Hi, @PKondratiew :waving_hand: Welcome to the community. Have you tried the Associations API? You can make a request to get the typeIDs for Tickets > Conversations and Conversations > Tickets. These are separate calls, as Associations in HubSpot are omnidirectional. Once you have those, you can use your Ticket ID to make requests to the Associations endpoints to get back records. We also have the
Conversations inbox and messages APIs (BETA) endpoints, which are worth exploring as you work with conversations more.

Example:

Request

https://api.hubapi.com/crm/v4/associations/Conversation/Ticket/labels

Response

{
 "results": [
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 31,
 "label": null
 },
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 277,
 "label": null
 }
 ]
}

Best,

Jaycee