# create activity within a lead via api

**URL:** <https://community.hubspot.com/t/create-activity-within-a-lead-via-api/113789>\
**Category:** APIs & Integrations\
**Tags:** starter\
**Created:** [August 5, 2024, 2:40pm UTC](https://community.hubspot.com/t/create-activity-within-a-lead-via-api/113789 "2024-08-05T14:40:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PPina3](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@PPina3](https://community.hubspot.com/u/PPina3)\
**Post date:** [August 5, 2024, 2:40pm UTC](https://community.hubspot.com/t/create-activity-within-a-lead-via-api/113789/1 "2024-08-05T14:40:13Z")

</div>

Hello, I’m new to using the Hubspot API, I’m reading the documentation and encountering some difficulties, if anyone can give me some guidance, I’ll be very happy and I’m also available to help with anything I can.

I need to make a login request to receive the token and then create an activity within a specific business that I will have its ID, but I couldn’t find the endpoint to receive the access token or the endpoint to create an activity within the specific business.

Thank you for your help, have a great day

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 6, 2024, 6:31pm UTC](https://community.hubspot.com/t/create-activity-within-a-lead-via-api/113789/2 "2024-08-06T18:31:02Z")

</div>

Hey, @PPina3 👋 For question one — you can handle auth by creating a [Public App](https://developers.hubspot.com/docs/api/working-with-oauth) or using a [Private App](https://developers.hubspot.com/docs/api/private-apps) generated for a specific portal. For question two — are you looking to create Engagements? Like a Note, Meeting, or Task, for example? If so, you can create the Engagement from its specific endpoint — [Engagements](https://developers.hubspot.com/docs/api/crm/tasks#associations:~:text=Objects-,Engagements,-Calls). You can also do the association in the same call — [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/tasks#associations)

Best,

Jaycee
