Supported products
Supported products
Required Scopes
Required Scopes
Scope requirements
The following scopes are required to use the campaigns API, based on the endpoints you’re using:marketing.campaigns.read: provides access to view details about marketing campaigns and their associated assets. This scope is required for all endpoints.marketing.campaigns.write: grants access to create, delete, and modify marketing campaigns. This is required for all modification endpoints.marketing.campaigns.revenue.read: provides access to view revenue details and deal amounts attributed to a marketing campaign.
Create a campaign
To create a campaign, make aPOST request to /marketing/campaigns/2026-09-beta. Create a campaign with the given properties and return the campaign object, including the campaignGuid and created properties.
For example, to create a new campaign, you would make a POST request with the following request body. The response will include a campaignGuid, a unique identifier for the campaign. This will be formatted as a UUID. In the following example, the campaignGuid is 12345a-6789b-10111213b.
- Example request body
- Example response
Clone campaigns
Instead of creating a campaign from scratch, you can clone a campaign as a starting point for your new campaign. You can check the available clonable assets for a campaign, clone your campaign, then check the status of the cloned campaign.Retrieve all cloneable assets
Not all assets in an account can be cloned. It is recommended to retrieve a list of cloneable assets before cloning a campaign. To retrieve a list of cloneable assets, make aGET request to /marketing/campaigns/2026-09-beta/clone/asset-types. A list of asset types eligible for cloning within your account will be returned.
Clone a campaign
To clone a campaign, make aPOST request to /marketing/campaigns/2026-09-beta/clone.
After making your request, the response will include the campaignGuid of the newly created campaign and a status of PENDING by default. You can then make a GET request to /marketing/campaigns/2026-09-beta/{campaignGuid} with your new campaignGuid until the operation reaches a final state.
Example cloning request body
Retrieve status of a cloned campaign
After cloning a campaign, to retrieve the status of a cloned campaign, make aGET request to /marketing/campaigns/2026-09-beta/clone/{campaignGuid}/status, using the campaignGuid returned when cloning the campaign.
The response will include the campaignGuid and a status field, which will return one of the following:
PENDINGCOMPLETEFAILEDPARTIAL_FAILURE
Retrieve a campaign
To retrieve the details of an existing campaign, make aGET request to /marketing/campaigns/2026-09-beta/{campaignGuid}.
This endpoint will return the campaign information. Depending on the query parameters used, this can also be used to return information about the assets and the corresponding assets’ metrics. When using this endpoint, you can use the following query parameters.
properties: a comma-separated list of the properties (e.g.,hs_name,hs_campaign_status) to be returned in the response.- If any of the specified properties has an empty value on the requested object, it will be ignored and not returned in response.
- If the parameter is empty, the response will include an empty properties map.
- If you have the Brands add-on and you’ve associated your campaign with a brand, the response will return a
businessUnitsvalue, which will indicate the associated brand.
startDate: the start date to fetch asset metrics, formatted as YYYY-MM-DD. This is used to fetch the metrics associated with the assets for a specified period. If no date is specified, no asset metrics will be retrieved.endDate: the end date to fetch asset metrics, formatted as YYYY-MM-DD. This is used to fetch the metrics associated with the assets for a specified period. If no date is specified, no asset metrics will be retrieved.
GET request with /marketing/campaigns/2026-09-beta/edb9b6c3-d2e2-4ca8-8396-832262aed0d4?properties=hs_name,hs_start_date, this would result in the following response body:
Example retrieve response body
Retrieve campaigns
To search for and retrieve campaigns based on query parameters, make aGET request to /marketing/campaigns/2026-09-beta.
When using this endpoint, you can use the following query parameters to filter your campaigns.
name: return all campaigns whose names contain the specified substring. This allows partial matching of campaign names, returning all campaigns that include the given substring in their name. If this parameter is not provided, the search will return all campaigns.sort: the field by which to sort the results.- Allowed values are:
hs_name,createdAt, andupdatedAt. - An optional hyphen (
-) before the property name will denote descending order. For example, you can use-createdAtto sort your campaigns from newest to oldest. - If the sort order is not specified, the list of campaigns will be sorted in alphabetical order by campaign name.
- Allowed values are:
after: a cursor for pagination. If provided, the results will start after the given cursor. For example, you can use the valueNTI1Cg%3D%3D.limit: define the maximum number of results to return. The allowed values range from 1 to 100. If no limit is specified, it will be set to 50 campaigns by default.properties: a comma-separated list of the properties (e.g.,hs_name,hs_campaign_status) to be returned in the response.- If any of the specified properties has an empty value on the requested object, it will be ignored and not returned in response.
- If the parameter is empty, the response will include an empty
propertiesmap.
Example search response body
Update campaign
To perform a partial update of a campaign identified by the specified campaignGuid, make aPATCH request to /marketing/campaigns/2026-09-beta/{campaignGuid}.
You can use campaigns properties to update your campaign. This will overwrite any existing campaign property values. If your request includes read-only or non-existent properties, you will encounter a 400 error. Learn more about which properties can be used to update campaigns.
- Example request body
- Example response
Delete a campaign
To delete a campaign, make aDELETE request to /marketing/campaigns/2026-09-beta/{campaignGuid}.
This call will always return a 204 No Content response, regardless of whether the campaignGuid corresponds to an existing campaign or not.
Campaign properties
When using theproperties query parameter for your campaign endpoints, you can use the properties below. The first set of properties can be both retrieved and updated, while the second set are read-only.
Read-only properties
Manage campaign assets
Use the following endpoints to review and manage your campaign assets.List campaign asset types
To list all supported campaign asset types, make aGET request to /marketing/campaigns/2026-09-beta/asset-types. This will return a list of asset types that can be used in campaigns. Use this endpoint to review the available options when creating or managing campaign assets.
List assets associated with a campaign
To retrieve the assets associated with a campaign, make aGET request to /marketing/campaigns/2026-09-beta/{campaignGuid}/assets/{assetType}.
This endpoint lists all assets of the campaign by asset type. The assetType parameter is required, and each request can only fetch assets of a single type. The following are required:
campaignGuid: the UUID of the campaign.assetType: the type of asset to be fetched.
after: a cursor for pagination. If provided, the results will start after the given cursor. For example, you can use the valueNTI1Cg%3D%3D.limit: define the maximum number of results to return. The allowed values range from 1 to 100. If no limit is specified, it will be set to 10 assets by default.startDate: the start date to fetch asset metrics, formatted as YYYY-MM-DD. This is used to fetch the metrics associated with the assets for a specified period. If no date is specified, no asset metrics will be retrieved.endDate: the end date to fetch asset metrics, formatted as YYYY-MM-DD. This is used to fetch the metrics associated with the assets for a specified period. If no date is specified, no asset metrics will be retrieved.
Manage asset associations
To associate an asset with a campaign, make aPUT request to /marketing/campaigns/2026-09-beta/{campaignGuid}/assets/{assetType}/{assetId}.
To remove an asset from a campaign, make a DELETE request to /marketing/campaigns/2026-09-beta/{campaignGuid}/assets/{assetType}/{assetId}.
You can use the endpoints above to create and remove associations for the following asset types. For other asset types, learn how to associate assets and content with a campaign in HubSpot.