External campaign automation overview
External campaign automation lets you compose and launch external campaigns without going through the Accelerator UI — today by script or pipeline, calling the underlying REST API directly, and soon through an AI agent like Claude driving the same workflow on your behalf via MCP. Either way, a client drives the full lifecycle from campaign creation to a live audience send, and the campaigns it creates appear in Accelerator like any other.
Under the hood, this is powered by a REST API served at https://{host}/messagegears-api/v1, authenticated with the same API key used across MessageGears' refreshed Accelerator APIs, sent in the apiKey header. For more information about getting a key and the entities you need before your first call, see External campaign automation prerequisites.
This article is accurate as of Accelerator 26.3.2. Verify field types, enums, and error codes against your environment's endpoint reference before building a client.
- SQL audience sources only - The audience you attach to a campaign must be a SQL-based audience source. Blueprint audiences are modeled in the schema for forward compatibility but are not attachable in 26.3.2 — attempting to attach one returns
409 AUDIENCE_BLUEPRINT_CONFLICT. - No audience preview - There is no endpoint to sample rows from a source before you attach it and launch.
The endpoint types​
Under the hood, every endpoint falls into one of six types, ordered to match how you build a campaign:
| Group | What it's for |
|---|---|
| Discovery | Read-only lookups to find the IDs you reference everywhere else — audience sources, destinations, brands, accounts, timezones. |
| Campaign core | Create, list, and read the campaign itself, independent of any facet. |
| Attach and configure | Attach or update each facet a campaign needs. Order-independent except where a facet's own rules say otherwise. |
| Verify configuration | Read back what's attached to a campaign, one facet at a time. |
| Launch and monitor | Trigger a send and monitor the resulting job. |
| Detach and delete | Detach a facet, or delete the campaign outright. Mostly unguarded — the exceptions are called out per operation. |
What makes this unique​
Several design decisions distinguish this API from a conventional integration surface — decisions that matter whether the caller is your own script or an AI agent acting with less direct human oversight:
- Flat pagination envelopes - List endpoints return a consistent structure:
items,page(zero-based),size,totalElements, andtotalPages. No nested or embedded wrappers. - Stable error codes - Every error response carries a
codefield drawn from a stable enum, plus aretryableflag. Branch your error handling oncodeandretryable— themessagefield is for human readers and may change. For more information, see How external campaign automation works. - Guarded commit points - The calls that commit to a real send — deleting a campaign, arming a schedule, and launching — require an explicit
confirm: truein the request body. Without it, the call returns409 CONFIRMATION_REQUIREDand mutates nothing. This stops an automation from committing on a hallucinated or unverified intent.
Automation vs. the Accelerator UI​
External campaign automation and the Accelerator UI operate on the same underlying campaigns and destinations. Choose the surface that fits your situation:
| If you… | Use |
|---|---|
| Want to build automated pipelines that create and launch campaigns in response to events or on a schedule | External campaign automation |
| Are integrating MessageGears into an AI agent or LLM-driven workflow | External campaign automation |
| Are setting up a destination for the first time or need to authorize a vendor connection | Accelerator UI |
| Prefer a guided, form-based workflow for a one-off campaign | Accelerator UI |
Destinations configured for your UI are usable by automation, and campaigns you create through automation appear in Accelerator. For more information about setting up destinations in the UI, see External destinations.
Next steps​
- Get an API key and confirm you have the entities you need. For more information, see External campaign automation prerequisites.
- Understand the campaign lifecycle, data variables, and error conventions. For more information, see How external campaign automation works.
- Walk through the complete campaign creation and launch sequence. For more information, see Launch an external campaign with automation.