curl --request POST \
--url https://api.hubapi.com/marketing/v3/campaigns/batch/read \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
{
"id": "<string>"
}
]
}
'{
"completedAt": "2023-11-07T05:31:56Z",
"results": [
{
"assets": {},
"businessUnits": [
{
"id": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"properties": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"startedAt": "2023-11-07T05:31:56Z",
"status": "CANCELED",
"links": {},
"requestedAt": "2023-11-07T05:31:56Z"
}This endpoint reads a batch of campaigns based on the provided input data and returns the campaigns along with their associated assets. 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. If 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.
curl --request POST \
--url https://api.hubapi.com/marketing/v3/campaigns/batch/read \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
{
"id": "<string>"
}
]
}
'{
"completedAt": "2023-11-07T05:31:56Z",
"results": [
{
"assets": {},
"businessUnits": [
{
"id": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"properties": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"startedAt": "2023-11-07T05:31:56Z",
"status": "CANCELED",
"links": {},
"requestedAt": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
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
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
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
An array of PublicCampaignReadInput objects, each containing the ID of a campaign to be read. This property is required.
Show child attributes
successful operation
The timestamp when the batch request processing was completed.
An array of results from the batch operation, each representing a public campaign with assets.
Show child attributes
The timestamp when the processing of the batch request began.
The current processing status of the batch operation, with possible values: CANCELED, COMPLETE, PENDING, PROCESSING.
CANCELED, COMPLETE, PENDING, PROCESSING A collection of URLs linking to related resources or documentation.
Show child attributes
The timestamp when the batch request was initially made.
Was this page helpful?