There's a new version of the HubSpot API
As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.
Please note: all calendar API endpoints are being sunset and are no longer supported. These APIs will no longer function, and data from the marketing calendar will no longer be available via API. These APIs will be removed on August 31, 2023.
HTTP Methods:
GET
Response Format:
json
Requires Authentication?
Yes
Rate Limited?
Headers
Get a specific calendar task by its ID.
Required Parameters | How to use | Description |
---|---|---|
OAuth access token or private app access token | Authorization: Bearer {token} header | Used to authenticate the request. Please see this page for more details about authentication. |
taskId | Used in the request URL | Unique identifier for a task |
Field name | Type | Description |
---|---|---|
id | string | The unique id of the task |
portalId | string | The hub id |
eventDate | long | When the task is set to be due, in milliseconds since the epoch |
eventType | string | Type of calendar event; for tasks this is always PUBLISHING_TASK |
category | string | type of task; one of BLOG_POST, EMAIL, LANDING_PAGE, CUSTOM |
categoryId | integer | numeric value corresponding to the type of task; one of 3 (BLOG_POST), 2 (EMAIL), 1 (LANDING_PAGE), 0 (CUSTOM) |
contentId | long | id value of the COS content object associated with the task, null if nothing associated |
state | string | value of TODO or DONE |
campaignGuid | string | value of campaign GUID associated with Task |
contentGroupId | long | The ID of the content group (aka blog) that the associated Blog Post belongs to, if any. Otherwise null. Only populated for single task GETs and for Blog Post Tasks. |
topicIds | list of longs | The list of ids of topics associated with the associated Blog Post, if any. Otherwise null. Only populated for single task GETs and for Blog Post Tasks. |
name | string | Name of Task |
description | string | description of Task |
url | string | Reserved |
ownerId | long | HubSpot id of the user that the task is assigned to |
createdBy | long | HubSpot id of the user that the task was created by |
previewKey | string | Reserved |
socialUserName | string | Reserved |
socialDisplayName | string | Reserved |
avatarUrl | string | Reserved |
recurring | boolean | is the task recurring |