Skip to content

HighLevel: Schedule Campaign

HighLevel emails.scheduleCampaign: arguments, response, policy and SDK examples.

← Emails operations · Get started

Operation gohighlevel.schedule_campaign

Provider route: POST /emails/locations/{locationId}/campaigns/emails/{campaignId}/schedule. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["emails"]["scheduleCampaign"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.emails.scheduleCampaign(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.emails.schedule_campaign(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.locationIdstringRequired within parent
path.campaignIdstringRequired within parent
bodyModelRequired within parentExpand Schedule Campaign — request body — body

Referenced models: Schedule Campaign — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Schedule Campaign — response body

Referenced models: Schedule Campaign — response body

3 more schemas are linked from the tables above, on the schema pages.

Schedule Campaign — response body
FieldTypePresenceDescription and constraints
$objectRoot
campaignIdstringRequired within parentCampaign ID
sourceIdJSONRequired within parent
sourceId (anyOf 1)stringAlternativeSource ID for fetching campaign statistics
sourceId (anyOf 2)nullAlternative
traceIdstringOptionalTrace ID of the request
Schedule Campaign — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
abTestConfigJSONOptionalA/B test configuration. Can be combined with any scheduleType except rss.
abTestConfig (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body / abTestConfig / testType: email Content, subject Line, winning Criteria: open Rate, click Rate
emailMetaJSONRequired within parentEmail subject, sender, and content metadata
emailMeta (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body email Meta attachments, from Email, from Name, preview Text, reply To Address, subject
recipientsJSONRequired within parentWho receives the email. Must provide either contactIds or filter.
recipients (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body / recipients / type: contact, tag, segment
rssConfigJSONOptionalRSS feed configuration. Required when scheduleType is rss.
rssConfig (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body / rssConfig / repeatAfter: every day, every week, every month, start At Day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
scheduleConfigJSONOptionalSchedule configuration for immediate, scheduled, batch, and smart_send types. Required when scheduleType is not rss.
scheduleConfig (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking
scheduleTypestringRequired within parentHow to schedule the campaign
One of: immediate, scheduled, batch, rss, smart_send
sendDaysarrayOptionalDays of the week to allow sending. Used for batch and RSS scheduleTypes.
sendDays[]stringEach itemOne of: Mon, Tue, Wed, Thu, Fri, Sat, Sun
timeZonestringRequired within parentIANA timezone
userIdstringRequired within parentID of the user performing this action
userNamestringOptionalName of the user performing this action

Referenced models: Schedule Campaign — request body — body / abTestConfig / testType: email Content, subject Line, winning Criteria: open Rate, click Rate, Schedule Campaign — request body — body email Meta attachments, from Email, from Name, preview Text, reply To Address, subject, Schedule Campaign — request body — body / recipients / type: contact, tag, segment, Schedule Campaign — request body — body / rssConfig / repeatAfter: every day, every week, every month, start At Day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking

Schedule Campaign — request body — body / abTestConfig / testType: email Content, subject Line, winning Criteria: open Rate, click Rate
FieldTypePresenceDescription and constraints
$objectRoot
testDurationnumberRequired within parentSeconds to run the test before picking a winner
testSizenumberRequired within parentPercentage of contacts in the test group (0-100)
testTypestringRequired within parentWhat is being tested
One of: emailContent, subjectLine
variationCountnumberRequired within parentNumber of variations
variationsarrayRequired within parentA/B test variations
variations[]ModelEach itemExpand Schedule Campaign — request body — body / abTestConfig / testType: email Content, subject Line, winning Criteria: open Rate, click Rate variations item
winningCriteriastringRequired within parentHow to pick the winner
One of: openRate, clickRate

Referenced models: Schedule Campaign — request body — body / abTestConfig / testType: email Content, subject Line, winning Criteria: open Rate, click Rate variations item

Schedule Campaign — request body — body email Meta attachments, from Email, from Name, preview Text, reply To Address, subject
FieldTypePresenceDescription and constraints
$objectRoot
attachmentsarrayOptionalAttachment download URLs
attachments[]stringEach item
fromEmailstringRequired within parentSender email address
fromNamestringRequired within parentSender display name
previewTextstringOptionalPreview text shown in inbox after subject
replyToAddressstringOptionalReply-to email address
subjectstringRequired within parentEmail subject line
Schedule Campaign — request body — body / recipients / type: contact, tag, segment
FieldTypePresenceDescription and constraints
$objectRoot
contactIdsarrayOptionalContact IDs to send to. Required when type is contact.
contactIds[]stringEach item
freezeListbooleanOptionalFreeze the contact list at schedule time — new matching contacts will not be added later
Default: true
segmentstringOptionalSegment type for pre-built segments. Required when type is segment.
One of: engaged_last_7_days, engaged_last_30_days, engaged_last_60_days, engaged_last_5_campaigns, unengaged_last_5_campaigns
tagIdsarrayOptionalTag IDs to filter recipients by. Required when type is tag.
tagIds[]stringEach item
typestringRequired within parentRecipient selection type
One of: contact, tag, segment
Schedule Campaign — request body — body / rssConfig / repeatAfter: every day, every week, every month, start At Day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
FieldTypePresenceDescription and constraints
$objectRoot
firstExecutionDatestringOptionalOverride first execution date/time
namestringRequired within parentRSS schedule name
repeatAfterstringRequired within parentHow often to check the feed
One of: every_day, every_week, every_month
repeatAfterTimestringRequired within parentTime of day to execute
rssFeedLimitnumberOptionalMax number of RSS items per email
rssFeedURLstringRequired within parentRSS feed URL
startAtDaystringOptionalDay of week for weekly RSS
One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
startAtMonthDaystringOptionalDay of month for monthly RSS
Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking
FieldTypePresenceDescription and constraints
$objectRoot
batchJSONOptionalBatch/drip configuration. Required when scheduleType is batch. Ignored otherwise.
batch (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body / scheduleConfig / batch, emailPreferenceId, resend, sendAt, tracking / batch / intervalUnit: minutes, hours, days
emailPreferenceIdstringOptionalEmail preference type ID for categorizing this campaign
resendJSONOptionalAuto-resend to contacts who did not open
resend (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking resend enabled, subject, wait Hours
sendAtstringOptionalDate/time to send. Required for scheduled, batch, and smart_send. Ignored for immediate.
trackingJSONOptionalClick and UTM tracking options
tracking (allOf 1)ModelAll variants applyExpand Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking tracking click Tracking, utm Tracking

Referenced models: Schedule Campaign — request body — body / scheduleConfig / batch, emailPreferenceId, resend, sendAt, tracking / batch / intervalUnit: minutes, hours, days, Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking resend enabled, subject, wait Hours, Schedule Campaign — request body — body schedule Config batch, email Preference Id, resend, send At, tracking tracking click Tracking, utm Tracking

Schedule Campaign — request body — body / abTestConfig / testType: email Content, subject Line, winning Criteria: open Rate, click Rate variations item
FieldTypePresenceDescription and constraints
$objectRoot
documentIdstringOptionalTemplate/document ID for this variation
subjectstringOptionalSubject line for this variation

SDK function policy ID: gohighlevel.schedule_campaign. Catalog operation: schedule-campaign. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["emails/campaigns.write"]

Pinned headers: {"Version": "v3"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.