# Contact Activity

**URL:** <https://community.hubspot.com/t/contact-activity/88604>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [August 30, 2023, 11:42am UTC](https://community.hubspot.com/t/contact-activity/88604 "2023-08-30T11:42:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AOsmanov](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AOsmanov](https://community.hubspot.com/u/AOsmanov)\
**Post date:** [August 30, 2023, 11:42am UTC](https://community.hubspot.com/t/contact-activity/88604/1 "2023-08-30T11:42:52Z")

</div>

Hi! I’m trying to add activity log like this (with instructions from whom)

 ![photo_2023-08-30 17.32.28.jpeg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/8/807644d0138015dc2198651b944205733df12b9f.jpeg)

I have already tried doing it through /crm/v3/objects/Communications endpoint  
request body:

`{'associactions': { 'to': { 'id': {contact_id} }, 'types': [{ 'associationCategory': 'HUBSPOT_DEFINED', 'associationTypeId': 81 }]},'properties': { 'hs_communication_channel_type': 'WHATS_APP', 'hs_communication_logged_from': 'CRM', 'hs_communication_body': text, 'hs_timestamp': {str timestamp}, 'hubspot_owner_id': {owner_id}}}`

But in this endpoint there is no parameter “From” and it doesn’t work for me (“From” not filled). I got the result:

 ![AOsmanov_0-1693395604762.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/7/17599ea37f27d66a732bfbb975eaa1d7304505fd.png)

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 30, 2023, 12:47pm UTC](https://community.hubspot.com/t/contact-activity/88604/2 "2023-08-30T12:47:23Z")

</div>

Hi @AOsmanov,

You should be able to do this by passing through a valid owner ID in your request (which you seem to be doing). I was successfully able to do so. See below:

```lia-code-sample
POST https://api.hubapi.com/crm/v3/objects/communications
BODY
{
 "properties": {
 "hs_communication_channel_type": "WHATS_APP",
 "hs_communication_logged_from": "CRM",
 "hs_communication_body": "This was created via the API",
 "hs_timestamp": "2023-08-30T13:40:00Z",
 "hubspot_owner_id": 1147024111
 },
 "associations": [
 {
 "to": {
 "id": 101
 },
 "types": [
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 81
 }
 ]
 }
 ]
}
RESPONSE
{
 "id": "19847492314",
 "properties": {
 "hs_all_owner_ids": "1147024111",
 "hs_body_preview": "This was created via the API",
 "hs_body_preview_html": "<html>\n <head></head>\n <body>\n This was created via the API\n </body>\n</html>",
 "hs_body_preview_is_truncated": "false",
 "hs_communication_body": "This was created via the API",
 "hs_communication_channel_type": "WHATS_APP",
 "hs_communication_logged_from": "CRM",
 "hs_createdate": "2023-08-30T12:41:39.482Z",
 "hs_lastmodifieddate": "2023-08-30T12:41:39.482Z",
 "hs_object_id": "19847492314",
 "hs_object_source": "INTEGRATION",
 "hs_object_source_id": "1914406",
 "hs_timestamp": "2023-08-30T13:40:00Z",
 "hs_user_ids_of_all_owners": "4592290",
 "hubspot_owner_assigneddate": "2023-08-30T12:41:39.482Z",
 "hubspot_owner_id": "1147024111"
 },
 "createdAt": "2023-08-30T12:41:39.482Z",
 "updatedAt": "2023-08-30T12:41:39.482Z",
 "archived": false
}

```

The value supplied to “hubspot\_owner\_id” can be retrieved by using the [Owners API](https://developers.hubspot.com/). Specifically GET /crm/v3/owners (see below):

```lia-code-sample
GET https://api.hubapi.com/crm/v3/owners/
RESPONSE
{
 "results": [
 {
 "id": "1147024111",
 "email": "jackcoldrick90@gmail.com",
 "firstName": "Jack",
 "lastName": "Coldrick",
 "userId": 4592290,
 "createdAt": "2023-07-17T14:35:51.734Z",
 "updatedAt": "2023-08-28T20:42:50.533Z",
 "archived": false
 }
 ]
}

```

Notice in the response above the presence of both an “id” and a “userId” attribute. You must use the “id” attribute to create the communication. If you use the “userId” it will not work. The final output can be seen below:

 ![Screenshot 2023-08-30 at 13.44.30.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/d/bdec726200dab0aeb4c315848b964f13aa03a398.png)

If you are still facing issues can you please share the response that you get back from HubSpot?

I hope this helps!
