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",
"errors": [
{
"category": "<string>",
"context": {},
"errors": [
{
"message": "<string>",
"code": "<string>",
"context": "{missingScopes=[scope1, scope2]}",
"in": "<string>",
"subCategory": "<string>"
}
],
"links": {},
"message": "<string>",
"status": "<string>",
"id": "<string>",
"subCategory": {}
}
],
"links": {},
"numErrors": 123,
"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",
"errors": [
{
"category": "<string>",
"context": {},
"errors": [
{
"message": "<string>",
"code": "<string>",
"context": "{missingScopes=[scope1, scope2]}",
"in": "<string>",
"subCategory": "<string>"
}
],
"links": {},
"message": "<string>",
"status": "<string>",
"id": "<string>",
"subCategory": {}
}
],
"links": {},
"numErrors": 123,
"requestedAt": "2023-11-07T05:31:56Z"
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
Show child attributes
successful operation
The timestamp when the batch request processing was completed.
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 Show child attributes
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?