curl --request POST \
--url https://api.hubapi.com/marketing/v3/campaigns/batch/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
{
"properties": {}
}
]
}
'{
"completedAt": "2023-11-07T05:31:56Z",
"results": [
{
"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 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.
curl --request POST \
--url https://api.hubapi.com/marketing/v3/campaigns/batch/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
{
"properties": {}
}
]
}
'{
"completedAt": "2023-11-07T05:31:56Z",
"results": [
{
"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 date and time when the batch operation was completed, formatted as a date-time string.
Show child attributes
The date and time when the batch operation started, formatted as a date-time string.
The current status of the batch operation, with possible values: CANCELED, COMPLETE, PENDING, PROCESSING.
CANCELED, COMPLETE, PENDING, PROCESSING Show child attributes
A map of related links associated with the batch operation.
Show child attributes
The date and time when the batch operation was requested, formatted as a date-time string.
Was this page helpful?