Zum Hauptinhalt springen
POST
/
marketing
/
campaigns
/
2026-03
/
batch
/
read
Retreieve campaigns
curl --request POST \
  --url https://api.hubapi.com/marketing/campaigns/2026-03/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

Autorisierungen

Authorization
string
header
erforderlich

The access token received from the authorization server in the OAuth 2.0 flow.

Abfrageparameter

endDate
string

The end date for filtering campaigns, in YYYY-MM-DD format.

properties
string[]

A comma-separated list of property names to include in the response.

startDate
string

The start date for filtering campaigns, in YYYY-MM-DD format.

Body

application/json
inputs
object[]
erforderlich

An array of PublicCampaignReadInput objects, each containing the ID of a campaign to be read. This property is required.

Antwort

successful operation

completedAt
string<date-time>
erforderlich

The date and time when the batch operation was completed, in ISO 8601 format.

results
object[]
erforderlich

An array of results from the batch operation, each representing a public campaign with assets.

startedAt
string<date-time>
erforderlich

The date and time when the batch operation started, in ISO 8601 format.

status
enum<string>
erforderlich

The current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'.

Verfügbare Optionen:
CANCELED,
COMPLETE,
PENDING,
PROCESSING
errors
object[]

An array of errors encountered during the batch operation, each described by a StandardError object.

A map of link names to associated URIs that provide additional information about the batch operation.

numErrors
integer<int32>

The number of errors encountered during the batch operation.

requestedAt
string<date-time>

The date and time when the batch operation was requested, in ISO 8601 format.

Last modified on April 9, 2026