# How to log a call via API

**URL:** <https://community.hubspot.com/t/how-to-log-a-call-via-api/23684>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [August 2, 2020, 1:17pm UTC](https://community.hubspot.com/t/how-to-log-a-call-via-api/23684 "2020-08-02T13:17:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Convolo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alex_convolo/32/102945_2.png) [@Alex\_Convolo](https://community.hubspot.com/u/Alex_Convolo)\
**Post date:** [August 2, 2020, 1:17pm UTC](https://community.hubspot.com/t/how-to-log-a-call-via-api/23684/1 "2020-08-02T13:17:27Z")

</div>

Hi everyone!  
Is it a way to log a call via api? Or add to custom timeline event action/properties to act like call log?  
When I try to get list of event types, I only get my custom events. (Both with v1 and v3)

Thanks in advance for your reply.

---

<div class="post-metadata">

**Author:** ![jackcoldrick](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jackcoldrick/32/5119_2.png) [@jackcoldrick](https://community.hubspot.com/u/jackcoldrick)\
**Post date:** [August 2, 2020, 1:48pm UTC](https://community.hubspot.com/t/how-to-log-a-call-via-api/23684/2 "2020-08-02T13:48:17Z")

</div>

Hi [@Alex\_Convolo](https://community.hubspot.com/t5/user/viewprofilepage/user-id/140599),

Thanks for the post. If you’re trying to create a call engagment on a CRM record I’d suggest using our “[Engagements API](https://legacydocs.hubspot.com/docs/methods/engagements/engagements-overview)”. Specifically the “[Create an Engagement](https://legacydocs.hubspot.com/docs/methods/engagements/create_engagement)” endpoint.

For instance the following POST request with payload:

`https://api.hubapi.com/engagements/v1/engagements?hapikey={{INSERT_API_KEY_HERE}}`

```auto
{
 "engagement": {
 "active": true,
 "ownerId": 22294961,
 "type": "CALL",
 "timestamp": 1596375786617,
 "activityType": "Pre-qualification"
 },
 "associations": {
 "contactIds": [
 389101
 ],
 "companyIds": [],
 "dealIds": [],
 "ownerIds": [],
 "ticketIds": []
 },
 "attachments": [
 {}
 ],
 "metadata": {
 "toNumber": "5618769964",
 "fromNumber": "(857) 829-5489",
 "status": "COMPLETED",
 "durationMilliseconds": 38000,
 "recordingUrl": "https://api.twilio.com/2010-04-01/Accounts/AC890b8e6fbe0d989bb9158e26046a8dde/Recordings/RE3079ac919116b2d22",
 "body": "This is a description of the call. It could be anything you like.",
 "disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7"
 }
}

```

Would result in the following engagement on the contact record in HubSpot:

![]()

Alternatively you could create your own custom timeline events using our "[Timeline API"](https://legacydocs.hubspot.com/docs/methods/timeline/timeline-overview). I’ve included a [short video](https://embed.vidyard.com/share/tXNbrt5qFrNcpKhdSysTzb) of how this works.

I hope this helps!

Jack

---

<div class="post-metadata">

**Author:** ![Vimal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/vimal/32/61905_2.png) [@Vimal](https://community.hubspot.com/u/Vimal)\
**Post date:** [September 28, 2020, 1:10pm UTC](https://community.hubspot.com/t/how-to-log-a-call-via-api/23684/3 "2020-09-28T13:10:33Z")

</div>

Hi @jackcoldrick

Thanks! I can able to create a activity with fromNumber, toNumber and Duration.  
But i see that Contacted, Date and Time fields missing while adding the fromNumber, toNumber and Duration. Please suggest me if any field i missing from API request.
