# Access ticket attachments via API

**URL:** <https://community.hubspot.com/t/access-ticket-attachments-via-api/78605>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [April 3, 2023, 3:51pm UTC](https://community.hubspot.com/t/access-ticket-attachments-via-api/78605 "2023-04-03T15:51:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ITsyhankov](https://avatars.discourse-cdn.com/v4/letter/i/f475e1/32.png) [@ITsyhankov](https://community.hubspot.com/u/ITsyhankov)\
**Post date:** [April 3, 2023, 3:51pm UTC](https://community.hubspot.com/t/access-ticket-attachments-via-api/78605/1 "2023-04-03T15:51:19Z")

</div>

Hello, I have connected my mail to ‘inbox’ and it is creating new ticket each time I have a new email.  
I see new ticket has attachments coming from email and it is retrieved on UI via ‘api/sales-views/v1/attachments/ticket/1165556725’.  
Endpoints I have tried and **unable** to get attachments:  
[https://api.hubapi.com/crm/v3/objects/tickets/1165556725](https://api.hubapi.com/crm/v3/objects/tickets/1165556725)  
[https://api.hubapi.com/crm/v3/objects/tickets/1165556725/associations/attachments](https://api.hubapi.com/crm/v3/objects/tickets/1165556725/associations/attachments)  
gives: “message”: “Unable to infer object type from: attachments”  
[https://api.hubapi.com/crm/v3/objects/emails](https://api.hubapi.com/crm/v3/objects/emails)

[https://api.hubapi.com/crm/v3/objects/tickets/1165556725/associations/engagements](https://api.hubapi.com/crm/v3/objects/tickets/1165556725/associations/engagements)

gives me an assoc object, but I’m unable to get engagement by that id by calling [https://api.hubapi.com/crm/v3/engagements/16726117613](https://api.hubapi.com/crm/v3/engagements/16726117613)

Good way to solve this is to set Ticket property automatically (on create ticket from email flow).  
Please give ideas, Thanks
