# Enable Reminder Task via API

**URL:** <https://community.hubspot.com/t/enable-reminder-task-via-api/80743>\
**Category:** APIs & Integrations\
**Created:** [May 8, 2023, 1:16pm UTC](https://community.hubspot.com/t/enable-reminder-task-via-api/80743 "2023-05-08T13:16:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [May 9, 2023, 5:18am UTC](https://community.hubspot.com/t/enable-reminder-task-via-api/80743/2 "2023-05-09T05:18:15Z")

</div>

Hello @MG2023

To update the reminder for an engagement/task in HubSpot using the updated API endpoint, you can use the “Engagements API” which allows you to update an engagement/task by its ID.

Here is an example code snippet on how to update an engagement/task’s reminder from “No Reminder” to “1 day before”

```lia-code-sample
const engagementId = "ENGAGEMENT_ID_HERE";
const updateData = {
 engagements: [
 {
 id: engagementId,
 metadata: {
 taskReminder: {
 type: "OFFSET",
 offset: {
 amount: 1,
 unit: "DAY",
 },
 },
 },
 },
 ],
};

const options = {
 method: "PATCH",
 headers: {
 "Content-Type": "application/json",
 Authorization: `Bearer ${YOUR_ACCESS_TOKEN}`,
 },
 body: JSON.stringify(updateData),
};

fetch(`https://api.hubapi.com/engagements/v1/engagements/modify`, options)
 .then((response) => response.json())
 .then((data) => console.log(data))
 .catch((error) => console.log(error));

```

Replace “ENGAGEMENT\_ID\_HERE” with the actual ID of the engagement/task you want to update, and replace “YOUR\_ACCESS\_TOKEN” with your actual HubSpot API access token.

This code sends a PATCH request to the “Engagements API” endpoint with the ID of the engagement/task you want to update, and the metadata object that specifies the taskReminder as an offset of 1 day before the due date. This will update the task’s reminder to 1 day before the due date.

---

_[View the full topic](https://community.hubspot.com/t/enable-reminder-task-via-api/80743)._
