How can I get the contacts of ticket using api, if I know ticket_id?

At the page you can se contacts at right side https://app.hubspot.com/contacts/{{portal_id}}/ticket/{{ticket_id}}/

How can I get the contacts of ticket using api, if I know ticket_id?

Hey @olejekg,

When looking to get the contact id and contact information associated to a ticket based on the ticket id, you can first use the CRM Associations API, specifically the - Get associations for a CRM object endpoint to pull the IDs of contacts associated to a ticket. An example of the request url:

https://api.hubspot.com/crm-associations/v1/associations/{{ticket id}}/HUBSPOT_DEFINED/16?hapikey={{your hapikey}}

Once you’ve the contact id, you can use this endpoint Get a contact by vid to get the contact information.

Hope this helps to shed some light! Let me know if you’d like further clarification on this.

Oh thank you! That’s what I need.