> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sigmora.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Campaigns

> Create, inspect, and control the durable campaign records shared by API clients, the dashboard, and content autopilot.

A campaign is the durable distribution record that ties a title and lifecycle
state to platforms, connected accounts, source jobs, and scheduled posts. The
dashboard and autonomous marketing runs use this same `/v1` resource.

## Create a campaign

```bash theme={null}
curl -X POST https://api.sigmora.org/v1/campaigns \
  -H "Authorization: Bearer $SIGMORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "August product launch",
    "description": "Launch the new reporting workspace",
    "platforms": ["linkedin", "youtube", "x"],
    "automationMode": "review-first",
    "status": "draft"
  }'
```

Only `title` is required. A campaign created by a full content autopilot is
created automatically by its `build_campaign` step; it appears in the same list.

## List and inspect

```bash theme={null}
curl "https://api.sigmora.org/v1/campaigns?status=all&limit=50" \
  -H "Authorization: Bearer $SIGMORA_API_KEY"

curl "https://api.sigmora.org/v1/campaigns/$CAMPAIGN_ID" \
  -H "Authorization: Bearer $SIGMORA_API_KEY"
```

The detail response includes `posts`. These are projections of the canonical
`contentQueue` rows produced during cross-posting—not a second dashboard-only
queue—so their state reflects what the publishing engine will actually process.

## Pause, resume, or complete

```bash theme={null}
curl -X PATCH "https://api.sigmora.org/v1/campaigns/$CAMPAIGN_ID" \
  -H "Authorization: Bearer $SIGMORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"paused"}'
```

Valid lifecycle states are `draft`, `scheduled`, `active`, `paused`, and
`completed`. Campaign metadata and lifecycle changes are free; generation and
rendering performed by an autopilot are priced separately and quoted before a
run starts.

## Relationship to autopilot

`POST /v1/autopilot-runs` returns a durable run. During distribution, the
`build_campaign` step writes a campaign and exposes its `campaignId` in the run
step output. Use `GET /v1/campaigns/{campaignId}` to inspect the resulting
campaign and scheduled posts.

The same operations are available through MCP as `campaigns_create`,
`campaigns_list`, `campaigns_get`, and `campaigns_update`.

## How campaign copy is generated

Content Autopilot treats the Marketing service as the strategy control plane.
For each channel and content task, it selects one versioned strategy through the
Marketing API and places that playbook in the model's system instructions. It
combines the playbook with the workspace's Brand Brain identity and voice,
channel-specific direction, natural-writing guidance, and truthfulness rules.
The concrete campaign brief stays in the user message.

Autonomous runs only use strategies classified as standard risk. Strategies
that require evidence or human review are not injected into autonomous prompts.
The selected strategy ID and version are recorded in the generation step output
for auditability. If the Marketing service is temporarily unavailable, the run
continues with Brand Brain, naturalness, and trust rules but does not invent or
silently substitute a marketing script.

## Reddit campaigns

The multi-week organic Reddit workflow is a separate resource because it owns
account-readiness, subreddit discovery, governor caps, lead scanning, and
comment-reply policy:

```bash theme={null}
curl -X POST https://api.sigmora.org/v1/reddit-campaigns \
  -H "Authorization: Bearer $SIGMORA_API_KEY" \
  -H "Idempotency-Key: reddit-launch-2026-07-31-001" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Developer community launch",
    "connectedAccountId": "reddit-account-id",
    "objective": "Teach teams how to automate weekly reporting",
    "keywords": ["weekly reporting", "dashboard automation"],
    "schedule": {
      "daysOfWeek": [1, 2, 3, 4, 5],
      "everyNHours": 8,
      "window": {"start": "08:00", "end": "20:00"},
      "timezone": "Africa/Nairobi",
      "maxRunsPerDay": 3
    }
  }'
```

The call first compiles and persists a versioned
`reddit-community-campaign` through the Marketing control-plane API, then creates
the execution campaign and its `workflow: "reddit_campaign"` agent. The response
campaign includes `marketingCampaignId`, `marketingLibraryVersion`, and the
compiled `marketingManifest`.

`Idempotency-Key` is required. The same key and body return the same Marketing
campaign, execution campaign, and agent; using the key with a changed body
returns `409 conflict`. If Marketing cannot validate and store the plan,
Sigmora returns `503 upstream_unavailable` instead of creating an ungoverned
campaign.

The account must be a connected Reddit account in the same workspace. The
safety floor is not client-tunable: campaign posts remain review-first,
affiliation must be disclosed, fabricated identities or engagement are
prohibited, and automatic replies—when enabled—apply only to comments on your
own posts.

Use `GET /v1/reddit-campaigns`, `GET
/v1/reddit-campaigns/{campaignId}`, and `PATCH
/v1/reddit-campaigns/{campaignId}` to inspect or control it. MCP exposes the
same operations with the `reddit_campaigns_*` tool names.
