openapi: 3.0.1 info: title: HubSpot Marketing Campaigns Public API description: Basepom for all HubSpot Projects version: 2026-03 x-hubspot-product-tier-requirements: marketing: PROFESSIONAL sales: FREE service: FREE cms: FREE commerce: FREE crmHub: FREE dataHub: FREE servers: - url: https://api.hubapi.com tags: - name: Assets - name: Basic - name: Batch - name: Budget - name: Metrics - name: Spend paths: /marketing/campaigns/2026-03: get: tags: - Basic operationId: get-/marketing/campaigns/2026-03_/marketing/campaigns/v3 parameters: - name: after in: query required: false style: form explode: true schema: type: string - name: limit in: query required: false style: form explode: true schema: type: integer format: int32 - name: name in: query required: false style: form explode: true schema: type: string - name: properties in: query required: false style: form explode: true schema: type: array items: type: string - name: sort in: query required: false style: form explode: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/CollectionResponseWithTotalPublicCampaign' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read post: tags: - Basic operationId: post-/marketing/campaigns/2026-03_/marketing/campaigns/v3 parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/PublicCampaignInput' required: true responses: '201': description: successful operation headers: Location: description: URL of the newly created resource style: simple explode: false schema: type: string content: application/json: schema: $ref: '#/components/schemas/PublicCampaign' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/batch/archive: post: tags: - Batch summary: Delete a batch of campaigns description: "This endpoint deletes a batch of campaigns. \nThe maximum number of items in a batch\ \ request is 50.\nThe response will always be 204 No Content, regardless of whether the campaigns\ \ exist or not, whether they were successfully deleted or not, or if only some of the campaigns\ \ in the batch were deleted." operationId: post-/marketing/campaigns/2026-03/batch/archive parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchInputPublicCampaignDeleteInput' required: true responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/batch/create: post: tags: - Batch summary: Create a batch of campaigns description: 'This endpoint creates a batch of campaigns. The maximum number of items in a batch request is 50. The campaigns in the response are not guaranteed to be in the same order as they were provided in the request.' operationId: post-/marketing/campaigns/2026-03/batch/create parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchInputPublicCampaignInput' required: true responses: '201': description: successful operation content: application/json: schema: $ref: '#/components/schemas/BatchResponsePublicCampaign' '207': description: multiple statuses content: application/json: schema: $ref: '#/components/schemas/BatchResponsePublicCampaignWithErrors' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/batch/read: post: tags: - Batch summary: Read a batch of campaigns description: "This endpoint reads a batch of campaigns based on the provided input data and returns\ \ the campaigns along with their associated assets. \nThe maximum number of items in a batch request\ \ is 50.\nThe campaigns in the response are not guaranteed to be in the same order as they were\ \ provided in the request.\nIf duplicate campaign IDs are provided in the request, duplicates\ \ will be ignored. The response will include only unique IDs and will be returned without duplicates.\n" operationId: post-/marketing/campaigns/2026-03/batch/read parameters: - name: endDate in: query description: 'End date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period. If not provided, no asset metrics will be fetched. Example: 2024-01-27' required: false style: form explode: true schema: type: string - name: properties in: query description: 'A comma-separated list of the properties to be returned in the response. If any of the specified properties has empty value on the requested object(s), they will be ignored and not returned in response. If this parameter is empty, the response will include an empty properties map. Example: hs_name, hs_campaign_status, hs_notes' required: false style: form explode: true schema: type: array items: type: string - name: startDate in: query description: 'Start date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period. If not provided, no asset metrics will be fetched. Example: 2023-01-20' required: false style: form explode: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchInputPublicCampaignReadInput' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/BatchResponsePublicCampaignWithAssets' '207': description: multiple statuses content: application/json: schema: $ref: '#/components/schemas/BatchResponsePublicCampaignWithAssetsWithErrors' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read /marketing/campaigns/2026-03/batch/update: post: tags: - Batch summary: Update a batch of campaigns description: 'This endpoint updates a batch of campaigns based on the provided input data. The maximum number of items in a batch request is 50. If an empty string ("") is passed for any property in the Batch Update, it will reset that property''s value.' operationId: post-/marketing/campaigns/2026-03/batch/update parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchInputPublicCampaignBatchUpdateItem' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/BatchResponsePublicCampaign' '207': description: multiple statuses content: application/json: schema: $ref: '#/components/schemas/BatchResponsePublicCampaignWithErrors' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/{campaignGuid}: get: tags: - Basic summary: Read a campaign description: Get a campaign identified by a specific campaignGuid with the given properties. Along with the campaign information, it also returns information about assets. Depending on the query parameters used, this can also be used to return information about the corresponding assets' metrics. Metrics are available only if startDate and endDate are provided. operationId: get-/marketing/campaigns/2026-03/{campaignGuid} parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string - name: endDate in: query description: 'The end date for fetching asset metrics, in YYYY-MM-DD format. Optional. Example: 2000-01-27' required: false style: form explode: true schema: type: string - name: properties in: query description: "A comma-separated list of properties to include in the response. \n Unrecognized\ \ properties are ignored. Optional. Example: hs_name,hs_budget, hs_notes" required: false style: form explode: true schema: type: array items: type: string - name: startDate in: query description: "The start date for fetching asset metrics, in YYYY-MM-DD format. \nOptional. Example:\ \ 2000-01-20 " required: false style: form explode: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicCampaignWithAssets' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read delete: tags: - Basic summary: 'Delete campaign ' description: 'Delete a specified campaign from the system. This call will return a 204 No Content response regardless of whether the campaignGuid provided corresponds to an existing campaign or not.' operationId: delete-/marketing/campaigns/2026-03/{campaignGuid} parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write patch: tags: - Basic summary: Update campaign description: 'Perform a partial update of a campaign identified by the specified campaignGuid. Provided property values will be overwritten. Read-only and non-existent properties will cause 400 error. If an empty string is passed for any property in the Batch Update, it will reset that property''s value. ' operationId: patch-/marketing/campaigns/2026-03/{campaignGuid} parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PublicCampaignInput' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicCampaign' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/{campaignGuid}/assets/{assetType}: get: tags: - Assets summary: List assets description: '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. Asset metrics can also be fetched along with the assets; they are available only if start and end dates are provided.' operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/assets/{assetType} parameters: - name: assetType in: path description: 'The type of asset to fetch, required Example: MARKETING_EVENT' required: true style: simple explode: false schema: type: string - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string - name: after in: query description: The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. required: false style: form explode: true schema: type: string - name: endDate in: query description: 'End date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period. If not provided, no asset metrics will be fetched. Example: 2024-01-27' required: false style: form explode: true schema: type: string - name: limit in: query description: The maximum number of results to display per page. required: false style: form explode: true schema: type: string - name: startDate in: query description: 'Start date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period. If not provided, no asset metrics will be fetched. Example: 2023-01-20' required: false style: form explode: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/CollectionResponsePublicCampaignAssetForwardPaging' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read /marketing/campaigns/2026-03/{campaignGuid}/assets/{assetType}/{assetId}: put: tags: - Assets summary: Add asset association description: 'Associate a specified asset with a campaign. Using the API, you can create associations for the following asset types: ads, blog posts, calls, case studies, CTAs, CTAs (legacy), external website pages, feedback surveys, forms, files, knowledge base articles, landing pages, marketing email, marketing events, meetings, playbooks, podcast episodes, sales documents, sales emails, sequences, SMS, social posts, static lists, videos, website pages, and workflows. For other asset types, it is recommended to manage your associations directly in the campaign tool in HubSpot.' operationId: put-/marketing/campaigns/2026-03/{campaignGuid}/assets/{assetType}/{assetId} parameters: - name: assetId in: path description: 'The id of asset to disassociate, required Example: 154543' required: true style: simple explode: false schema: type: string - name: assetType in: path description: 'The type of asset to disassociate, required Example: OBJECT_LIST' required: true style: simple explode: false schema: type: string - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write delete: tags: - Assets summary: Remove asset association description: 'Disassociate a specified asset from a campaign. Using the API, you can remove associations for the following asset types: ads, blog posts, calls, case studies, CTAs, CTAs (legacy), external website pages, feedback surveys, forms, files, knowledge base articles, landing pages, marketing email, marketing events, meetings, playbooks, podcast episodes, sales documents, sales emails, sequences, SMS, social posts, static lists, videos, website pages, and workflows. For other asset types, it is recommended to manage your associations directly in the campaign tool in HubSpot.' operationId: delete-/marketing/campaigns/2026-03/{campaignGuid}/assets/{assetType}/{assetId} parameters: - name: assetId in: path description: 'The id of asset to disassociate, required Example: 154543' required: true style: simple explode: false schema: type: string - name: assetType in: path description: 'The type of asset to disassociate, required Example: OBJECT_LIST' required: true style: simple explode: false schema: type: string - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/{campaignGuid}/budget: post: tags: - Budget summary: Add budget item description: Add a new budget item to the campaign operationId: post-/marketing/campaigns/2026-03/{campaignGuid}/budget parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PublicBudgetItemInput' required: true responses: '201': description: successful operation headers: Location: description: URL of the newly created resource style: simple explode: false schema: type: string content: application/json: schema: $ref: '#/components/schemas/PublicBudgetItem' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/{campaignGuid}/budget/totals: get: tags: - Budget summary: Read budget description: 'Retrieve detailed information about the budget and spend items for a specified campaign, including the total budget, total spend, and remaining budget. Budget and Spend items may be returned in any order, but the order field specifies their sequence based on the creation date. The item with order 0 is the oldest, and items with higher order values are newer' operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/budget/totals parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicBudgetTotals' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read /marketing/campaigns/2026-03/{campaignGuid}/budget/{budgetId}: get: tags: - Budget summary: Get budget item description: Get a specific budget item by ID operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/budget/{budgetId} parameters: - name: budgetId in: path description: 'The ID of the budget item, required. Example: 352 ' required: true style: simple explode: false schema: type: integer format: int64 - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicBudgetItem' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read put: tags: - Budget summary: Update budget item description: Update a specific budget item by ID operationId: put-/marketing/campaigns/2026-03/{campaignGuid}/budget/{budgetId} parameters: - name: budgetId in: path description: 'The ID of the budget item, required. Example: 352 ' required: true style: simple explode: false schema: type: integer format: int64 - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PublicBudgetItemInput' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicBudgetItem' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write delete: tags: - Budget summary: Delete budget item description: Delete a specific budget item by ID operationId: delete-/marketing/campaigns/2026-03/{campaignGuid}/budget/{budgetId} parameters: - name: budgetId in: path description: 'The ID of the budget item, required. Example: 352 ' required: true style: simple explode: false schema: type: integer format: int64 - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/{campaignGuid}/reports/contacts/{contactType}: get: tags: - Metrics summary: Fetch contact IDs description: Fetch the list of contact IDs for the specified campaign and contact type operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/reports/contacts/{contactType} parameters: - name: campaignGuid in: path description: The unique identifier of the campaign required: true style: simple explode: false schema: type: string - name: contactType in: path description: The type of contact to filter the list required: true style: simple explode: false schema: type: string - name: after in: query description: The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. required: false style: form explode: true schema: type: string - name: endDate in: query description: "The end date for fetching contact data, in YYYY-MM-DD format. \nOptional.\ \ Example: 2000-01-27 " required: false style: form explode: true schema: type: string - name: limit in: query description: The maximum number of results to display per page. required: false style: form explode: true schema: type: integer format: int32 - name: startDate in: query description: "The start date for fetching contact data, in YYYY-MM-DD format. \nOptional. Example:\ \ 2000-01-20" required: false style: form explode: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/CollectionResponseContactReferenceForwardPaging' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read /marketing/campaigns/2026-03/{campaignGuid}/reports/metrics: get: tags: - Metrics summary: 'Get Campaign Metrics ' description: This endpoint retrieves key attribution metrics for a specified campaign, such as sessions, new contacts, and influenced contacts. operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/reports/metrics parameters: - name: campaignGuid in: path description: The unique identifier of the campaign required: true style: simple explode: false schema: type: string - name: endDate in: query description: 'The end date for fetching attribution data, in YYYY-MM-DD format. Optional. Example: 2000-01-27 ' required: false style: form explode: true schema: type: string - name: startDate in: query description: 'The start date for fetching attribution data, in YYYY-MM-DD format. Optional. Example: 2000-01-20' required: false style: form explode: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/MetricsCounters' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read /marketing/campaigns/2026-03/{campaignGuid}/reports/revenue: get: tags: - Metrics summary: Fetch revenue description: 'Fetch revenue attribution report data for a specified campaign ' operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/reports/revenue parameters: - name: campaignGuid in: path description: The unique identifier of the campaign required: true style: simple explode: false schema: type: string - name: attributionModel in: query description: 'The revenue attribution model used to calculate deal revenue credit. Defaults to LINEAR if not specified. Enum values: LINEAR, FIRST_INTERACTION, LAST_INTERACTION, FULL_PATH, U_SHAPED, W_SHAPED, TIME_DECAY, J_SHAPED, INVERSE_J_SHAPED' required: false style: form explode: true schema: type: string - name: endDate in: query description: End date to fetch attribution data, YYYY-MM-DD required: false style: form explode: true schema: type: string - name: startDate in: query description: Start date to fetch attribution data, YYYY-MM-DD required: false style: form explode: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/RevenueAttributionAggregate' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.revenue.read - oauth2: - marketing.campaigns.revenue.lite.read - oauth2: - marketing.campaigns.revenue.full.read /marketing/campaigns/2026-03/{campaignGuid}/spend: post: tags: - Spend summary: Create campaign spend item description: Create a new campaign spend item operationId: post-/marketing/campaigns/2026-03/{campaignGuid}/spend parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PublicSpendItemInput' required: true responses: '201': description: successful operation headers: Location: description: URL of the newly created resource style: simple explode: false schema: type: string content: application/json: schema: $ref: '#/components/schemas/PublicSpendItem' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write /marketing/campaigns/2026-03/{campaignGuid}/spend/{spendId}: get: tags: - Spend summary: Read campaign spend item description: Read a campaign spend item by its spendId operationId: get-/marketing/campaigns/2026-03/{campaignGuid}/spend/{spendId} parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string - name: spendId in: path description: 'The ID of the spend item, required. Example: 491 ' required: true style: simple explode: false schema: type: integer format: int64 responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicSpendItem' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.read put: tags: - Spend summary: Update campaign spend item description: Update a specific campaign spend item by ID operationId: put-/marketing/campaigns/2026-03/{campaignGuid}/spend/{spendId} parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string - name: spendId in: path description: 'The ID of the spend item, required. Example: 491 ' required: true style: simple explode: false schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/PublicSpendItemInput' required: true responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/PublicSpendItem' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write delete: tags: - Spend summary: Delete campaign spend item description: Delete a specific campaign spend item by ID operationId: delete-/marketing/campaigns/2026-03/{campaignGuid}/spend/{spendId} parameters: - name: campaignGuid in: path description: 'The UUID of the campaign, required Example: 9dbec438-53e2-4b28-8c0f-38f56574a6e8' required: true style: simple explode: false schema: type: string - name: spendId in: path description: 'The ID of the spend item, required. Example: 491 ' required: true style: simple explode: false schema: type: integer format: int64 responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - marketing.campaigns.write components: schemas: BatchInputPublicCampaignBatchUpdateItem: required: - inputs type: object properties: inputs: type: array description: An array of PublicCampaignBatchUpdateItem objects, each containing the ID and properties to update for a specific campaign. items: $ref: '#/components/schemas/PublicCampaignBatchUpdateItem' BatchInputPublicCampaignDeleteInput: required: - inputs type: object properties: inputs: type: array description: An array of PublicCampaignDeleteInput objects, each specifying a campaign to be deleted. Each object must include the campaign's unique identifier. items: $ref: '#/components/schemas/PublicCampaignDeleteInput' BatchInputPublicCampaignInput: required: - inputs type: object properties: inputs: type: array description: An array of PublicCampaignInput objects, each representing the properties of a campaign to be created in the batch. This property is required. items: $ref: '#/components/schemas/PublicCampaignInput' BatchInputPublicCampaignReadInput: required: - inputs type: object properties: inputs: type: array description: An array of PublicCampaignReadInput objects, each containing the ID of a campaign to be read. This property is required. items: $ref: '#/components/schemas/PublicCampaignReadInput' BatchResponsePublicCampaign: required: - completedAt - results - startedAt - status type: object properties: completedAt: type: string description: The date and time when the batch operation was completed, formatted as a date-time string. format: date-time links: type: object additionalProperties: type: string description: A map of related links associated with the batch operation. requestedAt: type: string description: The date and time when the batch operation was requested, formatted as a date-time string. format: date-time results: type: array description: An array of results from the batch operation, each item representing a public campaign. items: $ref: '#/components/schemas/PublicCampaign' startedAt: type: string description: The date and time when the batch operation started, formatted as a date-time string. format: date-time status: type: string description: 'The current status of the batch operation, with possible values: CANCELED, COMPLETE, PENDING, PROCESSING.' enum: - CANCELED - COMPLETE - PENDING - PROCESSING BatchResponsePublicCampaignWithAssets: required: - completedAt - results - startedAt - status type: object properties: completedAt: type: string description: The timestamp when the batch request processing was completed. format: date-time links: type: object additionalProperties: type: string description: A collection of URLs linking to related resources or documentation. requestedAt: type: string description: The timestamp when the batch request was initially made. format: date-time results: type: array description: An array of results from the batch operation, each representing a public campaign with assets. items: $ref: '#/components/schemas/PublicCampaignWithAssets' startedAt: type: string description: The timestamp when the processing of the batch request began. format: date-time status: type: string description: 'The current processing status of the batch operation, with possible values: CANCELED, COMPLETE, PENDING, PROCESSING.' enum: - CANCELED - COMPLETE - PENDING - PROCESSING BatchResponsePublicCampaignWithAssetsWithErrors: required: - completedAt - results - startedAt - status type: object properties: completedAt: type: string description: The date and time when the batch operation was completed. format: date-time errors: type: array description: 'The list of errors for individual campaign reads that failed within the batch (e.g., campaign not found, permission denied). Only included when non-empty. ' items: $ref: '#/components/schemas/StandardError' links: type: object additionalProperties: type: string description: A collection of links related to the batch operation. numErrors: type: integer description: The number of errors that occurred during the batch operation. format: int32 requestedAt: type: string description: The date and time when the batch operation was requested. format: date-time results: type: array description: The list of successfully retrieved campaigns with their associated assets. items: $ref: '#/components/schemas/PublicCampaignWithAssets' startedAt: type: string description: The date and time when the batch operation started. format: date-time status: type: string description: The current status of the batch operation, which can be CANCELED, COMPLETE, PENDING, or PROCESSING. enum: - CANCELED - COMPLETE - PENDING - PROCESSING BatchResponsePublicCampaignWithErrors: required: - completedAt - results - startedAt - status type: object properties: completedAt: type: string description: The date and time when the batch operation was completed. format: date-time errors: type: array description: The list of errors for individual campaign operations that failed within the batch. Only included when non-empty. items: $ref: '#/components/schemas/StandardError' links: type: object additionalProperties: type: string description: URLs linking to resources or documentation related to the batch operation. numErrors: type: integer description: The total number of errors encountered during the batch operation. format: int32 requestedAt: type: string description: The date and time when the batch request was made. format: date-time results: type: array description: 'The list of successfully created or updated campaigns. ' items: $ref: '#/components/schemas/PublicCampaign' startedAt: type: string description: The date and time when the batch operation began. format: date-time status: type: string description: 'The current status of the batch operation. Accepted values are: CANCELED, COMPLETE, PENDING, PROCESSING.' enum: - CANCELED - COMPLETE - PENDING - PROCESSING CollectionResponseContactReferenceForwardPaging: required: - results type: object properties: paging: $ref: '#/components/schemas/ForwardPaging' results: type: array description: An array of contact references, each containing an identifier for a contact. items: $ref: '#/components/schemas/ContactReference' CollectionResponsePublicCampaignAsset: required: - results type: object properties: paging: $ref: '#/components/schemas/Paging' results: type: array description: An array of public campaign assets. Each item in the array is an object representing a campaign asset. items: $ref: '#/components/schemas/PublicCampaignAsset' CollectionResponsePublicCampaignAssetForwardPaging: required: - results type: object properties: paging: $ref: '#/components/schemas/ForwardPaging' results: type: array description: An array of public campaign assets. Each item in the array is a reference to a PublicCampaignAsset object. items: $ref: '#/components/schemas/PublicCampaignAsset' CollectionResponseWithTotalPublicCampaign: required: - results - total type: object properties: paging: $ref: '#/components/schemas/Paging' results: type: array description: An array of PublicCampaign objects, each representing a campaign with its associated properties. items: $ref: '#/components/schemas/PublicCampaign' total: type: integer description: An integer representing the total number of public campaigns available. format: int32 ContactReference: required: - id type: object properties: id: type: string description: Unique identifier for the contact. Error: required: - category - correlationId - message type: object properties: category: type: string description: The error category context: type: object additionalProperties: type: array items: type: string description: Context about the error condition example: '{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}' correlationId: type: string description: A unique identifier for the request. Include this value with any error reports or support tickets format: uuid example: aeb5f871-7f07-4993-9211-075dc63e7cbf errors: type: array description: further information about the error items: $ref: '#/components/schemas/ErrorDetail' links: type: object additionalProperties: type: string description: A map of link names to associated URIs containing documentation about the error or recommended remediation steps message: type: string description: A human readable message describing the error along with remediation steps where appropriate example: An error occurred subCategory: type: string description: A specific category that contains more specific detail about the error description: Represents an error response returned by the API when an operation fails. This component is used in various endpoints to provide detailed information about the error encountered. example: message: Invalid input (details will vary based on the error) correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf category: VALIDATION_ERROR links: knowledge-base: https://www.hubspot.com/products/service/knowledge-base ErrorDetail: required: - message type: object properties: code: type: string description: The status code associated with the error detail context: type: object additionalProperties: type: array items: type: string description: Context about the error condition example: '{missingScopes=[scope1, scope2]}' in: type: string description: The name of the field or parameter in which the error was found. message: type: string description: A human readable message describing the error along with remediation steps where appropriate subCategory: type: string description: A specific category that contains more specific detail about the error description: Represents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response. ForwardPaging: type: object properties: next: $ref: '#/components/schemas/NextPage' description: Paging information for forward-only pagination. Contains the next page reference when more results are available; omitted or empty on the last page. MetricsCounters: required: - influencedContacts - newContactsFirstTouch - newContactsLastTouch - sessions type: object properties: influencedContacts: type: integer description: The number of contacts influenced by the campaign. format: int32 newContactsFirstTouch: type: integer description: The number of new contacts attributed to the campaign as the first touchpoint. format: int32 newContactsLastTouch: type: integer description: The number of new contacts attributed to the campaign as the last touchpoint. format: int32 sessions: type: integer description: The total number of sessions generated by the campaign. format: int32 NextPage: required: - after type: object properties: after: type: string description: A string token used as a cursor to retrieve the next page of results. link: type: string description: A string URL that provides the link to the next page of results. description: Specifies the paging information needed to retrieve the next set of results in a paginated API response Paging: type: object properties: next: $ref: '#/components/schemas/NextPage' prev: $ref: '#/components/schemas/PreviousPage' PreviousPage: required: - before type: object properties: before: type: string description: A string token that indicates the position in the list before the current page of results. link: type: string description: A string containing the URL link to the previous page of results. description: specifies the paging information needed to retrieve the previous set of results in a paginated API response PublicBudgetItem: required: - amount - createdAt - id - name - order - updatedAt type: object properties: amount: type: number description: The monetary amount allocated for the budget item. createdAt: type: integer description: The timestamp when the budget item was created. format: int64 description: type: string description: A description of the budget item. id: type: string description: The unique identifier for the budget item. name: type: string description: The name of the budget item. order: type: integer description: The order of the budget item, indicating its sequence based on creation date. format: int32 updatedAt: type: integer description: The timestamp when the budget item was last updated. format: int64 PublicBudgetItemInput: required: - amount - name - order type: object properties: amount: type: number description: The monetary value assigned to the budget item. description: type: string description: A detailed explanation or notes about the budget item. name: type: string description: The name of the budget item. order: type: integer description: The sequence number indicating the order of the budget item. format: int32 PublicBudgetTotals: required: - budgetItems - currencyCode - spendItems type: object properties: budgetItems: type: array description: An array of budget items associated with the campaign. Each item is represented by a PublicBudgetItem object. items: $ref: '#/components/schemas/PublicBudgetItem' budgetTotal: type: number description: The total budget allocated for the campaign. currencyCode: type: string description: The currency code used for the budget and spend amounts, following ISO 4217 standards. enum: - AED - AFN - ALL - AMD - ANG - AOA - ARS - AUD - AWG - AZN - BAM - BBD - BDT - BGN - BHD - BIF - BMD - BND - BOB - BOV - BRL - BSD - BTN - BWP - BYN - BZD - CAD - CDF - CHE - CHF - CHW - CLF - CLP - CNY - COP - COU - CRC - CUC - CUP - CVE - CZK - DJF - DKK - DOP - DZD - EGP - ERN - ETB - EUR - FJD - FKP - GBP - GEL - GHS - GIP - GMD - GNF - GTQ - GYD - HKD - HNL - HRK - HTG - HUF - IDR - ILS - INR - IQD - IRR - ISK - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LYD - MAD - MDL - MGA - MKD - MMK - MNT - MOP - MRU - MUR - MVR - MWK - MXN - MXV - MYR - MZN - NAD - NGN - NIO - NOK - NPR - NZD - OMR - PAB - PEN - PGK - PHP - PKR - PLN - PYG - QAR - RON - RSD - RUB - RWF - SAR - SBD - SCR - SDG - SEK - SGD - SHP - SLL - SOS - SRD - SSP - STN - SVC - SYP - SZL - THB - TJS - TMT - TND - TOP - TRY - TTD - TWD - TZS - UAH - UGX - USD - USN - UYI - UYU - UZS - VEF - VND - VUV - WST - XAF - XAG - XAU - XBA - XBB - XBC - XBD - XCD - XDR - XOF - XPD - XPF - XPT - XSU - XUA - YER - ZAR - ZMW - ZWL remainingBudget: type: number description: The remaining budget available for the campaign after accounting for all spend items. spendItems: type: array description: An array of spend items associated with the campaign. Each item is represented by a PublicSpendItem object. items: $ref: '#/components/schemas/PublicSpendItem' spendTotal: type: number description: The total amount spent across all spend items in the campaign. PublicBusinessUnit: required: - id type: object properties: id: type: integer description: The unique identifier for the business unit, represented as an integer. format: int64 PublicCampaign: required: - businessUnits - createdAt - id - properties - updatedAt type: object properties: businessUnits: type: array description: An array of business units associated with the campaign, each represented by a PublicBusinessUnit object. items: $ref: '#/components/schemas/PublicBusinessUnit' createdAt: type: string description: The date and time when the campaign was created, formatted as a date-time string. format: date-time id: type: string description: The unique identifier for the campaign. properties: type: object additionalProperties: type: string description: A collection of key-value pairs representing additional properties of the campaign. updatedAt: type: string description: The date and time when the campaign was last updated, formatted as a date-time string. format: date-time PublicCampaignAsset: required: - id type: object properties: id: type: string description: The unique identifier for the campaign asset. metrics: type: object additionalProperties: type: number description: A collection of metrics associated with the campaign asset, represented as key-value pairs. name: type: string description: The name of the campaign asset. PublicCampaignBatchUpdateItem: required: - id - properties type: object properties: id: type: string description: The unique identifier for the campaign to be updated. properties: type: object additionalProperties: type: string description: A set of key-value pairs representing the properties to be updated for the campaign. PublicCampaignDeleteInput: required: - id type: object properties: id: type: string description: The unique identifier for the campaign to be deleted. PublicCampaignInput: required: - properties type: object properties: properties: type: object additionalProperties: type: string description: A collection of key-value pairs representing the properties of the campaign. Each key is a property name, and the corresponding value is the property's value. PublicCampaignReadInput: required: - id type: object properties: id: type: string description: The unique identifier for a campaign. PublicCampaignWithAssets: required: - assets - businessUnits - createdAt - id - properties - updatedAt type: object properties: assets: type: object additionalProperties: $ref: '#/components/schemas/CollectionResponsePublicCampaignAsset' description: Contains the assets associated with the campaign, each represented as a collection of campaign assets. businessUnits: type: array description: An array of business units associated with the campaign, each represented by a PublicBusinessUnit object. items: $ref: '#/components/schemas/PublicBusinessUnit' createdAt: type: string description: The date and time when the campaign was created, formatted as a date-time string. format: date-time id: type: string description: The unique identifier for the campaign. properties: type: object additionalProperties: type: string description: A map of key-value pairs representing the properties of the campaign. updatedAt: type: string description: The date and time when the campaign was last updated, formatted as a date-time string. format: date-time PublicSpendItem: required: - amount - createdAt - id - name - order - updatedAt type: object properties: amount: type: number description: The monetary value associated with the spend item. createdAt: type: integer description: The timestamp indicating when the spend item was created. format: int64 description: type: string description: A detailed explanation or notes about the spend item. id: type: string description: Unique identifier for the spend item. name: type: string description: The name assigned to the spend item. order: type: integer description: The sequence order of the spend item, where 0 is the oldest. format: int32 updatedAt: type: integer description: The timestamp indicating when the spend item was last updated. format: int64 PublicSpendItemInput: required: - amount - name - order type: object properties: amount: type: number description: The monetary value of the spend item. description: type: string description: A brief description of the spend item. name: type: string description: The name of the spend item. order: type: integer description: The sequence number indicating the order of the spend item. format: int32 RevenueAttributionAggregate: type: object properties: contactsNumber: type: integer description: The number of contacts attributed to the campaign. format: int32 currencyCode: type: string description: The currency code used for the revenue attribution, with accepted values including AED, AFN, ALL, and others. enum: - AED - AFN - ALL - AMD - ANG - AOA - ARS - AUD - AWG - AZN - BAM - BBD - BDT - BGN - BHD - BIF - BMD - BND - BOB - BOV - BRL - BSD - BTN - BWP - BYN - BZD - CAD - CDF - CHE - CHF - CHW - CLF - CLP - CNY - COP - COU - CRC - CUC - CUP - CVE - CZK - DJF - DKK - DOP - DZD - EGP - ERN - ETB - EUR - FJD - FKP - GBP - GEL - GHS - GIP - GMD - GNF - GTQ - GYD - HKD - HNL - HRK - HTG - HUF - IDR - ILS - INR - IQD - IRR - ISK - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LYD - MAD - MDL - MGA - MKD - MMK - MNT - MOP - MRU - MUR - MVR - MWK - MXN - MXV - MYR - MZN - NAD - NGN - NIO - NOK - NPR - NZD - OMR - PAB - PEN - PGK - PHP - PKR - PLN - PYG - QAR - RON - RSD - RUB - RWF - SAR - SBD - SCR - SDG - SEK - SGD - SHP - SLL - SOS - SRD - SSP - STN - SVC - SYP - SZL - THB - TJS - TMT - TND - TOP - TRY - TTD - TWD - TZS - UAH - UGX - USD - USN - UYI - UYU - UZS - VEF - VND - VUV - WST - XAF - XAG - XAU - XBA - XBB - XBC - XBD - XCD - XDR - XOF - XPD - XPF - XPT - XSU - XUA - YER - ZAR - ZMW - ZWL dealAmount: type: number description: The total amount of deals attributed to the campaign. dealsNumber: type: integer description: The number of deals attributed to the campaign. format: int32 revenueAmount: type: number description: The total revenue amount attributed to the campaign. StandardError: required: - category - context - errors - links - message - status type: object properties: category: type: string description: A string that categorizes the type of error. context: type: object additionalProperties: type: array items: type: string description: An object containing additional context about the error, with keys as context names and values as arrays of strings. errors: type: array description: An array of ErrorDetail objects providing further information about each error encountered. items: $ref: '#/components/schemas/ErrorDetail' id: type: string description: A string representing a unique identifier for the error. links: type: object additionalProperties: type: string description: An object mapping link names to associated URIs that contain documentation or remediation steps for the error. message: type: string description: A string containing a human-readable message describing the error. status: type: string description: A string indicating the status of the error. subCategory: type: object properties: {} description: An object that provides more specific details about the error category. description: Ye olde error responses: Error: description: An error occurred. content: '*/*': schema: $ref: '#/components/schemas/Error' securitySchemes: developer_hapikey: type: apiKey name: hapikey in: query oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://app.hubspot.com/oauth/authorize tokenUrl: https://api.hubapi.com/oauth/v1/token scopes: marketing.campaigns.read: '' marketing.campaigns.revenue.read: '' marketing.campaigns.write: '' private_apps: type: apiKey name: private-app in: header private_apps_legacy: type: apiKey name: private-app-legacy in: header x-hubspot-product-tier-requirements: marketing: PROFESSIONAL sales: FREE service: FREE cms: FREE commerce: FREE crmHub: FREE dataHub: FREE