Goals
In HubSpot, goals are used to create user-specific quotas for their sales and services teams based on templates provided by HubSpot. The goals API allow you to retrieve goals data in your HubSpot account.
Learn more about using goals in HubSpot.
Please note: only the endpoints listed below are currently available and supported:
GET
all goalsGET
a specific goalPOST
search request to request a goal with filtersGET
associations of a specific goalGET
goals in batches
Goals cannot be edited or deleted through the API.
You can retrieve an individual goal or all goals in your account.
- To request a list of all goals, make a
GET
request to/crm/v3/objects/goal_targets
. - To retrieve an individual goal, make a
GET
request to/crm/v4/objects/goal_targets/{goalTargetId}/
.
For example, to retrieve a goal with an ID of 44027423340
, then the request URL would be the following:
https://api.hubapi.com/crm/v4/objects/goal_targets/44027423340/
When making a GET
request to the Goals API, you can also request specific goal properties:
- hs_goal_name: This is a string that denotes the name of a goal.
- hs_target_amount: Number that denotes the goal target value.
- hs_start_datetime: Goal's start date as a UTC timestamp.
- hs_end_datetime: Goal's end date as a UTC timestamp.
- hs_created_by_user_id: HubSpot UserId of the person who created the goal, not the one assigned to a goal.
For example, if you wanted to include all properties listed above, the request URL may resemble the following:
https://api.hubapi.com/crm/v4/objects/goal_targets/44027423340?properties=hs_goal_name,hs_target_amount,hs_start_datetime,hs_end_datetime,hs_created_by_user_id
The response may look similar to the JSON excerpt below:
Thank you for your feedback, it means a lot to us.