# Get Contact Vid from Ticket Webhook

**URL:** <https://community.hubspot.com/t/get-contact-vid-from-ticket-webhook/14511>\
**Category:** Tickets & Conversations\
**Tags:** help-desk\
**Created:** [May 23, 2019, 8:30pm UTC](https://community.hubspot.com/t/get-contact-vid-from-ticket-webhook/14511 "2019-05-23T20:30:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrestenOE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/krestenoe/32/98997_2.png) [@KrestenOE](https://community.hubspot.com/u/KrestenOE)\
**Post date:** [May 23, 2019, 8:30pm UTC](https://community.hubspot.com/t/get-contact-vid-from-ticket-webhook/14511/1 "2019-05-23T20:30:27Z")

</div>

When a ticket reaches a certain stage, I use a workflow to fire a webhook which I catch with Zapier.

In the body of the webhook from the workflow, the _created\_by_ property does not exist, so I can’t get the email of the associated contact from the Contacts API subsequently. If I send a GET to the ticket from Postman with _properties=created\_by_ as parameters, I only get the following response:

```auto
{
 "objectType": "TICKET",
 "portalId": myPortal,
 "objectId": ticketID,
 "properties": {},
 "isDeleted": false
}

```

_\*myPortal & ticketID are the actual values_

How can this be? I see the associated contact on the ticket just fine in the UI and this property is mandatory when creating the ticket right?

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [May 27, 2019, 12:48pm UTC](https://community.hubspot.com/t/get-contact-vid-from-ticket-webhook/14511/2 "2019-05-27T12:48:19Z")

</div>

Hi @KrestenOE

Taking a look into this, I can confirm that the Associated Contact is not a value that is being pulled with this request when defining ticket properties i.e _ **&properties=created\_by** _

Instead, I have tested this from my end and have used the Associations Endpoint here:

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fmethods%2Fcrm-associations%2Fget-associations)**

If we know the value of the Ticket we’re attempting to get the associations for, we can insert the **_T__icket\_id_** as the associations and as per the association types attached below, we will define the _ **Definition\_id** _ as 16 (Ticket to Contact):

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fmethods%2Fcrm-associations%2Fcrm-associations-overview)**

This gives us the following request:

```auto
https://api.hubapi.com/crm-associations/v1/associations/TICKET_ID/HUBSPOT_DEFINED/16?hapikey=xxxxxx

```

Giving us a response of:

```auto
{
 "results": [
 10001
 ],
 "hasMore": false,
 "offset": 10001
}

```

The results here listing the contact\_vid(s).

Let me know if you have any questions here.

Thanks,

Matt
