{ "openapi" : "3.0.1", "info" : { "title" : "Marketing Campaigns Public Api", "description" : "Basepom for all HubSpot Projects", "version" : "v3", "x-hubspot-product-tier-requirements" : { "marketing" : "PROFESSIONAL", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" }, "x-hubspot-related-documentation" : [ { "name" : "Campaigns", "url" : "https://developers.hubspot.com/docs/guides/api/marketing/campaigns" } ] }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Assets" }, { "name" : "Basic" }, { "name" : "Batch" }, { "name" : "Budget" }, { "name" : "Metrics" }, { "name" : "Spend" } ], "paths" : { "/marketing/v3/campaigns" : { "get" : { "tags" : [ "Basic" ], "operationId" : "get-/marketing/v3/campaigns_/marketing/v3/campaigns", "parameters" : [ { "name" : "after", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "name", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "properties", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } } }, { "name" : "sort", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseWithTotalPublicCampaign" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.read" ] } ] }, "post" : { "tags" : [ "Basic" ], "operationId" : "post-/marketing/v3/campaigns_/marketing/v3/campaigns", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicCampaignInput" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "headers" : { "Location" : { "description" : "URL of the newly created resource", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } }, "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicCampaign" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/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/v3/campaigns/batch/archive", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputPublicCampaignDeleteInput" }, "example" : null } }, "required" : true }, "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/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.\nThe campaigns in the response are not guaranteed to be in the same order as they were provided in the request.", "operationId" : "post-/marketing/v3/campaigns/batch/create", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputPublicCampaignInput" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponsePublicCampaign" }, "example" : null } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponsePublicCampaignWithErrors" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/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/v3/campaigns/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.\nExample: 2024-01-27", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "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.\nExample: hs_name, hs_campaign_status, hs_notes", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } } }, { "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.\nExample: 2023-01-20", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputPublicCampaignReadInput" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponsePublicCampaignWithAssets" }, "example" : null } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponsePublicCampaignWithAssetsWithErrors" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.read" ] } ] } }, "/marketing/v3/campaigns/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.\nThe maximum number of items in a batch request is 50.\nIf an empty string (\"\") is passed for any property in the Batch Update, it will reset that property's value.", "operationId" : "post-/marketing/v3/campaigns/batch/update", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputPublicCampaignBatchUpdateItem" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponsePublicCampaign" }, "example" : null } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponsePublicCampaignWithErrors" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/{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/v3/campaigns/{campaignGuid}", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "endDate", "in" : "query", "description" : "The end date for fetching asset metrics, in YYYY-MM-DD format.\nOptional. Example: 2000-01-27", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "properties", "in" : "query", "description" : "A comma-separated list of properties to include in the response. \nUnrecognized properties are ignored. Optional. Example: hs_name,hs_budget, hs_notes", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } } }, { "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", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicCampaignWithAssets" }, "example" : null } } }, "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.\nThis call will return a 204 No Content response regardless of whether the campaignGuid provided corresponds to an existing campaign or not.", "operationId" : "delete-/marketing/v3/campaigns/{campaignGuid}", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "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.\nIf an empty string is passed for any property in the Batch Update, it will reset that property's value.\n", "operationId" : "patch-/marketing/v3/campaigns/{campaignGuid}", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicCampaignInput" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicCampaign" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/{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.\nAsset metrics can also be fetched along with the assets; they are available only if start and end dates are provided.", "operationId" : "get-/marketing/v3/campaigns/{campaignGuid}/assets/{assetType}", "parameters" : [ { "name" : "assetType", "in" : "path", "description" : "The type of asset to associate with the campaign. Required.\nExample: BLOG_POST.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } }, { "name" : "endDate", "in" : "query", "description" : "The end date for fetching asset metrics, in YYYY-MM-DD format. \nOptional. Example: 2000-01-27", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to display per page.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponsePublicCampaignAssetForwardPaging" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.read" ] } ] } }, "/marketing/v3/campaigns/{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.\n\nFor other asset types, it is recommended to manage your associations directly in the campaign tool in HubSpot.", "operationId" : "put-/marketing/v3/campaigns/{campaignGuid}/assets/{assetType}/{assetId}", "parameters" : [ { "name" : "assetId", "in" : "path", "description" : "The ID of the asset to associate with the campaign. Required. \n Example: 82649548308", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "assetType", "in" : "path", "description" : "The type of asset to associate with the campaign. Required.\nExample: BLOG_POST. ", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "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.\n\nFor other asset types, it is recommended to manage your associations directly in the campaign tool in HubSpot.", "operationId" : "delete-/marketing/v3/campaigns/{campaignGuid}/assets/{assetType}/{assetId}", "parameters" : [ { "name" : "assetId", "in" : "path", "description" : "The ID of the asset to associate with the campaign. Required. \nExample: 82649548308", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "assetType", "in" : "path", "description" : "The type of asset to associate with the campaign. Required.\nExample: BLOG_POST.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/{campaignGuid}/budget" : { "post" : { "tags" : [ "Budget" ], "summary" : "Add budget item", "description" : "Add a new budget item to the campaign", "operationId" : "post-/marketing/v3/campaigns/{campaignGuid}/budget", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicBudgetItemInput" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "headers" : { "Location" : { "description" : "URL of the newly created resource", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } }, "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicBudgetItem" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/{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.\nBudget 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/v3/campaigns/{campaignGuid}/budget/totals", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicBudgetTotals" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.read" ] } ] } }, "/marketing/v3/campaigns/{campaignGuid}/budget/{budgetId}" : { "get" : { "tags" : [ "Budget" ], "summary" : "Get budget item", "description" : "Get a specific budget item by ID", "operationId" : "get-/marketing/v3/campaigns/{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", "example" : null } }, { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicBudgetItem" }, "example" : null } } }, "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/v3/campaigns/{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", "example" : null } }, { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicBudgetItemInput" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicBudgetItem" }, "example" : null } } }, "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/v3/campaigns/{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", "example" : null } }, { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/{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/v3/campaigns/{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", "example" : null } }, { "name" : "contactType", "in" : "path", "description" : "The type of contact to filter the list", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } }, { "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", "example" : null } }, { "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", "example" : null } }, { "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", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseContactReferenceForwardPaging" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.read" ] } ] } }, "/marketing/v3/campaigns/{campaignGuid}/reports/metrics" : { "get" : { "tags" : [ "Metrics" ], "summary" : "Get Campaign Metrics\n", "description" : "This endpoint retrieves key attribution metrics for a specified campaign, such as sessions, new contacts, and influenced contacts.", "operationId" : "get-/marketing/v3/campaigns/{campaignGuid}/reports/metrics", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The unique identifier of the campaign", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "endDate", "in" : "query", "description" : "The end date for fetching attribution data, in YYYY-MM-DD format.\nOptional. Example: 2000-01-27 ", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "startDate", "in" : "query", "description" : "The start date for fetching attribution data, in YYYY-MM-DD format.\nOptional. Example: 2000-01-20", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MetricsCounters" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.read" ] } ] } }, "/marketing/v3/campaigns/{campaignGuid}/reports/revenue" : { "get" : { "tags" : [ "Metrics" ], "summary" : "Fetch revenue", "description" : "Fetch revenue attribution report data for a specified campaign\n", "operationId" : "get-/marketing/v3/campaigns/{campaignGuid}/reports/revenue", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The unique identifier of the campaign", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } }, { "name" : "endDate", "in" : "query", "description" : "End date to fetch attribution data, YYYY-MM-DD", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "startDate", "in" : "query", "description" : "Start date to fetch attribution data, YYYY-MM-DD", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RevenueAttributionAggregate" }, "example" : null } } }, "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/v3/campaigns/{campaignGuid}/spend" : { "post" : { "tags" : [ "Spend" ], "summary" : "Create campaign spend item", "description" : "Create a new campaign spend item", "operationId" : "post-/marketing/v3/campaigns/{campaignGuid}/spend", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicSpendItemInput" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "headers" : { "Location" : { "description" : "URL of the newly created resource", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } }, "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicSpendItem" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "marketing.campaigns.write" ] } ] } }, "/marketing/v3/campaigns/{campaignGuid}/spend/{spendId}" : { "get" : { "tags" : [ "Spend" ], "summary" : "Read campaign spend item", "description" : "Read a campaign spend item by its spendId", "operationId" : "get-/marketing/v3/campaigns/{campaignGuid}/spend/{spendId}", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicSpendItem" }, "example" : null } } }, "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/v3/campaigns/{campaignGuid}/spend/{spendId}", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicSpendItemInput" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicSpendItem" }, "example" : null } } }, "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/v3/campaigns/{campaignGuid}/spend/{spendId}", "parameters" : [ { "name" : "campaignGuid", "in" : "path", "description" : "The UUID of the campaign, required\nExample: 9dbec438-53e2-4b28-8c0f-38f56574a6e8", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "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", "example" : null } } ], "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignBatchUpdateItem" } } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignDeleteInput" } } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignInput" } } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignReadInput" } } }, "example" : null }, "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", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of related links associated with the batch operation.", "example" : null }, "requestedAt" : { "type" : "string", "description" : "The date and time when the batch operation was requested, formatted as a date-time string.", "format" : "date-time", "example" : null }, "results" : { "type" : "array", "description" : "An array of results from the batch operation, each item representing a public campaign.", "example" : null, "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", "example" : null }, "status" : { "type" : "string", "description" : "The current status of the batch operation, with possible values: CANCELED, COMPLETE, PENDING, PROCESSING.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "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", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A collection of URLs linking to related resources or documentation.", "example" : null }, "requestedAt" : { "type" : "string", "description" : "The timestamp when the batch request was initially made.", "format" : "date-time", "example" : null }, "results" : { "type" : "array", "description" : "An array of results from the batch operation, each representing a public campaign with assets.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignWithAssets" } }, "startedAt" : { "type" : "string", "description" : "The timestamp when the processing of the batch request began.", "format" : "date-time", "example" : null }, "status" : { "type" : "string", "description" : "The current processing status of the batch operation, with possible values: CANCELED, COMPLETE, PENDING, PROCESSING.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "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", "example" : null }, "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. ", "example" : null, "items" : { "$ref" : "#/components/schemas/StandardError" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A collection of links related to the batch operation.", "example" : null }, "numErrors" : { "type" : "integer", "description" : "The number of errors that occurred during the batch operation.", "format" : "int32", "example" : null }, "requestedAt" : { "type" : "string", "description" : "The date and time when the batch operation was requested.", "format" : "date-time", "example" : null }, "results" : { "type" : "array", "description" : "The list of successfully retrieved campaigns with their associated assets.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignWithAssets" } }, "startedAt" : { "type" : "string", "description" : "The date and time when the batch operation started.", "format" : "date-time", "example" : null }, "status" : { "type" : "string", "description" : "The current status of the batch operation, which can be CANCELED, COMPLETE, PENDING, or PROCESSING.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "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", "example" : null }, "errors" : { "type" : "array", "description" : "The list of errors for individual campaign operations that failed within the batch. Only included when non-empty.", "example" : null, "items" : { "$ref" : "#/components/schemas/StandardError" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "URLs linking to resources or documentation related to the batch operation.", "example" : null }, "numErrors" : { "type" : "integer", "description" : "The total number of errors encountered during the batch operation.", "format" : "int32", "example" : null }, "requestedAt" : { "type" : "string", "description" : "The date and time when the batch request was made.", "format" : "date-time", "example" : null }, "results" : { "type" : "array", "description" : "The list of successfully created or updated campaigns.\n", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaign" } }, "startedAt" : { "type" : "string", "description" : "The date and time when the batch operation began.", "format" : "date-time", "example" : null }, "status" : { "type" : "string", "description" : "The current status of the batch operation. Accepted values are: CANCELED, COMPLETE, PENDING, PROCESSING.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/ContactReference" } } }, "example" : null }, "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 a reference to a PublicCampaignAsset object.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignAsset" } } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaignAsset" } } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicCampaign" } }, "total" : { "type" : "integer", "description" : "An integer representing the total number of public campaigns available.", "format" : "int32", "example" : null } }, "example" : null }, "ContactReference" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "Unique identifier for the contact.", "example" : null } }, "example" : null }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The error category", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "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", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps", "example" : null }, "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", "example" : null } }, "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", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "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.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : null }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "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.", "example" : null }, "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.", "example" : null }, "MetricsCounters" : { "required" : [ "influencedContacts", "newContactsFirstTouch", "newContactsLastTouch", "sessions" ], "type" : "object", "properties" : { "influencedContacts" : { "type" : "integer", "description" : "The number of contacts influenced by the campaign.", "format" : "int32", "example" : null }, "newContactsFirstTouch" : { "type" : "integer", "description" : "The number of new contacts attributed to the campaign as the first touchpoint.", "format" : "int32", "example" : null }, "newContactsLastTouch" : { "type" : "integer", "description" : "The number of new contacts attributed to the campaign as the last touchpoint.", "format" : "int32", "example" : null }, "sessions" : { "type" : "integer", "description" : "The total number of sessions generated by the campaign.", "format" : "int32", "example" : null } }, "example" : null }, "NextPage" : { "required" : [ "after" ], "type" : "object", "properties" : { "after" : { "type" : "string", "description" : "A paging cursor token for retrieving subsequent pages.", "example" : null }, "link" : { "type" : "string", "description" : "A URL that can be used to retrieve the next page results.", "example" : null } }, "description" : "Specifies the paging information needed to retrieve the next set of results in a paginated API response", "example" : null }, "Paging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" }, "prev" : { "$ref" : "#/components/schemas/PreviousPage" } }, "description" : "Represents the pagination information for navigating through a list of results in the API. It provides details on how to access the previous or next set of results.", "example" : null }, "PreviousPage" : { "required" : [ "before" ], "type" : "object", "properties" : { "before" : { "type" : "string", "description" : "A paging cursor token for retrieving previous pages.", "example" : null }, "link" : { "type" : "string", "description" : "A URL that can be used to retrieve the previous pages' results.", "example" : null } }, "description" : "specifies the paging information needed to retrieve the previous set of results in a paginated API response", "example" : null }, "PublicBudgetItem" : { "required" : [ "amount", "createdAt", "id", "name", "order", "updatedAt" ], "type" : "object", "properties" : { "amount" : { "type" : "number", "description" : "The monetary amount allocated for the budget item.", "example" : null }, "createdAt" : { "type" : "integer", "description" : "The timestamp when the budget item was created.", "format" : "int64", "example" : null }, "description" : { "type" : "string", "description" : "A description of the budget item.", "example" : null }, "id" : { "type" : "string", "description" : "The unique identifier for the budget item.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the budget item.", "example" : null }, "order" : { "type" : "integer", "description" : "The order of the budget item, indicating its sequence based on creation date.", "format" : "int32", "example" : null }, "updatedAt" : { "type" : "integer", "description" : "The timestamp when the budget item was last updated.", "format" : "int64", "example" : null } }, "example" : null }, "PublicBudgetItemInput" : { "required" : [ "amount", "name", "order" ], "type" : "object", "properties" : { "amount" : { "type" : "number", "description" : "The monetary value assigned to the budget item.", "example" : null }, "description" : { "type" : "string", "description" : "A detailed explanation or notes about the budget item.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the budget item.", "example" : null }, "order" : { "type" : "integer", "description" : "The sequence number indicating the order of the budget item.", "format" : "int32", "example" : null } }, "example" : null }, "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.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicBudgetItem" } }, "budgetTotal" : { "type" : "number", "description" : "The total budget allocated for the campaign.", "example" : null }, "currencyCode" : { "type" : "string", "description" : "The currency code used for the budget and spend amounts, following ISO 4217 standards.", "example" : null, "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.", "example" : null }, "spendItems" : { "type" : "array", "description" : "An array of spend items associated with the campaign. Each item is represented by a PublicSpendItem object.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicSpendItem" } }, "spendTotal" : { "type" : "number", "description" : "The total amount spent across all spend items in the campaign.", "example" : null } }, "example" : null }, "PublicBusinessUnit" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "integer", "description" : "The unique identifier for the business unit, represented as an integer.", "format" : "int64", "example" : null } }, "example" : null }, "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.", "example" : null, "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", "example" : null }, "id" : { "type" : "string", "description" : "The unique identifier for the campaign.", "example" : null }, "properties" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A collection of key-value pairs representing additional properties of the campaign.", "example" : null }, "updatedAt" : { "type" : "string", "description" : "The date and time when the campaign was last updated, formatted as a date-time string.", "format" : "date-time", "example" : null } }, "example" : null }, "PublicCampaignAsset" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The unique identifier for the campaign asset.", "example" : null }, "metrics" : { "type" : "object", "additionalProperties" : { "type" : "number", "example" : null }, "description" : "A collection of metrics associated with the campaign asset, represented as key-value pairs.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the campaign asset.", "example" : null } }, "example" : null }, "PublicCampaignBatchUpdateItem" : { "required" : [ "id", "properties" ], "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The unique identifier for the campaign to be updated.", "example" : null }, "properties" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A set of key-value pairs representing the properties to be updated for the campaign.", "example" : null } }, "example" : null }, "PublicCampaignDeleteInput" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The unique identifier for the campaign to be deleted.", "example" : null } }, "example" : null }, "PublicCampaignInput" : { "required" : [ "properties" ], "type" : "object", "properties" : { "properties" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "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.", "example" : null } }, "example" : null }, "PublicCampaignReadInput" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The unique identifier for a campaign.", "example" : null } }, "example" : null }, "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.", "example" : null }, "businessUnits" : { "type" : "array", "description" : "An array of business units associated with the campaign, each represented by a PublicBusinessUnit object.", "example" : null, "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", "example" : null }, "id" : { "type" : "string", "description" : "The unique identifier for the campaign.", "example" : null }, "properties" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of key-value pairs representing the properties of the campaign.", "example" : null }, "updatedAt" : { "type" : "string", "description" : "The date and time when the campaign was last updated, formatted as a date-time string.", "format" : "date-time", "example" : null } }, "example" : null }, "PublicSpendItem" : { "required" : [ "amount", "createdAt", "id", "name", "order", "updatedAt" ], "type" : "object", "properties" : { "amount" : { "type" : "number", "description" : "The monetary value associated with the spend item.", "example" : null }, "createdAt" : { "type" : "integer", "description" : "The timestamp indicating when the spend item was created.", "format" : "int64", "example" : null }, "description" : { "type" : "string", "description" : "A detailed explanation or notes about the spend item.", "example" : null }, "id" : { "type" : "string", "description" : "Unique identifier for the spend item.", "example" : null }, "name" : { "type" : "string", "description" : "The name assigned to the spend item.", "example" : null }, "order" : { "type" : "integer", "description" : "The sequence order of the spend item, where 0 is the oldest.", "format" : "int32", "example" : null }, "updatedAt" : { "type" : "integer", "description" : "The timestamp indicating when the spend item was last updated.", "format" : "int64", "example" : null } }, "example" : null }, "PublicSpendItemInput" : { "required" : [ "amount", "name", "order" ], "type" : "object", "properties" : { "amount" : { "type" : "number", "description" : "The monetary value of the spend item.", "example" : null }, "description" : { "type" : "string", "description" : "A brief description of the spend item.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the spend item.", "example" : null }, "order" : { "type" : "integer", "description" : "The sequence number indicating the order of the spend item.", "format" : "int32", "example" : null } }, "example" : null }, "RevenueAttributionAggregate" : { "type" : "object", "properties" : { "contactsNumber" : { "type" : "integer", "description" : "The number of contacts attributed to the campaign.", "format" : "int32", "example" : null }, "currencyCode" : { "type" : "string", "description" : "The currency code used for the revenue attribution, with accepted values including AED, AFN, ALL, and others.", "example" : null, "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.", "example" : null }, "dealsNumber" : { "type" : "integer", "description" : "The number of deals attributed to the campaign.", "format" : "int32", "example" : null }, "revenueAmount" : { "type" : "number", "description" : "The total revenue amount attributed to the campaign.", "example" : null } }, "example" : null }, "StandardError" : { "required" : [ "category", "context", "errors", "links", "message", "status" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The main category of the error.", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Additional context-specific information related to the error.", "example" : null }, "errors" : { "type" : "array", "description" : "The detailed error objects.", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "id" : { "type" : "string", "description" : "A unique ID for the error instance.", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "URLs linking to documentation or resources associated with the error.", "example" : null }, "message" : { "type" : "string", "description" : "A human-readable string describing the error and possible remediation steps.", "example" : null }, "status" : { "type" : "string", "description" : "A text status code for the error, typically \"error\".", "example" : null }, "subCategory" : { "type" : "object", "properties" : { }, "description" : "A more specific error category within each main category.", "example" : null } }, "description" : "Represents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request.", "example" : null } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" }, "example" : null } } } }, "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.full.read" : "", "marketing.campaigns.revenue.lite.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" } }