Skip to main content

Campaigns

Campaigns let you group related posts under a name + color so you can filter, list, and report on them as a unit. Useful for marketing pushes ("Q3 Launch"), recurring series ("Tip Tuesday"), or seasonal content ("Holiday 2026").

Endpoints

GET    /v1/campaigns          list campaigns
POST /v1/campaigns create
GET /v1/campaigns/:id fetch one (includes post_count)
PATCH /v1/campaigns/:id update name/description/color/status
DELETE /v1/campaigns/:id delete (posts survive — campaign_id set NULL)

Create a campaign

curl -X POST https://app.posteverywhere.ai/api/v1/campaigns \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Q3 Product Launch",
"description": "Cross-platform rollout for the August launch",
"color": "#3b82f6",
"status": "active"
}'

Response:

{
"id": 42,
"name": "Q3 Product Launch",
"description": "Cross-platform rollout for the August launch",
"color": "#3b82f6",
"status": "active",
"post_count": 0,
"created_at": "2026-06-11T...",
"updated_at": "2026-06-11T..."
}

Tag posts to a campaign

Pass campaign_id when creating a post:

curl -X POST https://app.posteverywhere.ai/api/v1/posts \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Big news today...",
"account_ids": [123, 456],
"scheduled_for": "2026-08-01T10:00:00Z",
"campaign_id": 42
}'

Filter posts by campaign

curl "https://app.posteverywhere.ai/api/v1/posts?campaign_id=42" \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY"

Validation

FieldTypeConstraint
namestring1-100 chars, required
descriptionstringmax 500 chars
colorstringhex #RRGGBB (e.g. #3b82f6); defaults to #3b82f6
statusstringactive or archived; defaults to active

Notes

  • Workspace-scoped. Campaigns belong to a workspace, not a user — visible to all workspace members.
  • Deleting doesn't delete posts. When you delete a campaign, posts that referenced it have their campaign_id set to NULL. The posts themselves are untouched.
  • status='archived' is a soft-hide. Archived campaigns still exist for posts that reference them but are filtered out of the default list view (pass ?status=archived to see them).