APIs & Integrations

edubuc1
Member

Create a task with reminder using the API

Hi,

 

I want to create a task with a scheduled date and a reminder.

 

I think the good endpoint is the engagements but I haven't find out how to setup the scheduled date and the reminder?

 

Can you help me please?

2 Replies 2
imaalvarez
Member

Create a task with reminder using the API

Hi @kestrada 

currently is still supported what you mentioned above?

I am not finding a way to add reminder to tasks.

Thanks!

kestrada
HubSpot Moderator
HubSpot Moderator

Create a task with reminder using the API

Hi there @edubuc1,

Thanks for posting your question here.

To create a reminder using the Task API, you can create a reminder by including the "reminders" property in the metadata for the engagement. 

It will look similar to this:

"metadata": {
    "body": "<p>Meeting with HubSpot</p>",
    "status": "NOT_STARTED",
    "subject": "Meeting Title",
    "taskType": "CALL",
    "reminders": [
      1488473100000
    ],
    "sendDefaultReminder": true
  }

Related to the scheduled date, are you referring to the due date? If so, the due date of a task is the timestamp field in the engagement body. 

The structure could be something like this:

{
    "engagement": {
        "active": true,
        "ownerId": 1,
        "type": "TASK",
        "timestamp":1409172644778
 },

I hope this helps you. Let us your comments if you need more help on this.

Also, find more about the Engagements API, here:

https://developers.hubspot.com/docs/methods/engagements/create_engagement 

 

Task Engagement Json FormatTask Engagement Json Format