Managing Campaigns

Guide to the campaign lifecycle in Presscart, from creation through article tracking.

Campaigns in Presscart let you organize order items around a content strategy. This guide covers the full campaign lifecycle.

Prerequisites

Your API token needs the following scopes:

  • campaigns.create -- to create campaigns
  • campaigns.read -- to view campaigns and articles
  • campaigns.update -- to update campaigns and assign order items
  • orders.lists -- to find order items to assign

Step 1: Create a campaign

Create a campaign with a name, objectives, and a profile ID. All nullable fields must be present in the request body -- send null when you do not have a value.

curl -X POST "https://api.presscart.com/campaigns" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q2 product launch",
    "description": null,
    "profile_id": "22222222-2222-2222-2222-222222222222",
    "objectives": "Announce the launch and drive branded search demand.",
    "keywords": null,
    "target_audience": null,
    "tone": null,
    "writing_samples": null,
    "file_id": null
  }'

Step 2: Assign order items

After placing orders, assign the resulting order items to your campaign.

First, list your order items to find the IDs you want to assign:

curl "https://api.presscart.com/order-items?limit=50" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Then assign them to the campaign:

curl -X POST "https://api.presscart.com/campaigns/CAMPAIGN_ID/order-items" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "order_item_ids": [
      "55555555-5555-5555-5555-555555555555"
    ]
  }'

Step 3: Update the campaign

Update campaign details or questionnaire fields as your strategy evolves.

curl -X PUT "https://api.presscart.com/campaigns/CAMPAIGN_ID" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q2 product launch - revised",
    "keywords": "product launch, brand awareness",
    "target_audience": "Tech decision-makers at mid-market companies"
  }'

If you have already uploaded a brief or questionnaire file, link it to the campaign:

curl -X POST "https://api.presscart.com/questionnaires/CAMPAIGN_ID/link" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "uploaded-file-key.pdf",
    "file_url": "https://storage.example.com/uploaded-file-key.pdf",
    "file_name": "brief.pdf",
    "file_size": 123456
  }'

Note: The upload route (POST /assets/presign) currently requires a Supabase user session. API-token integrations can link already-uploaded files but cannot complete the full upload flow without a user-authenticated step.

Step 5: Track article progress

Monitor the articles associated with your campaign:

curl "https://api.presscart.com/campaigns/CAMPAIGN_ID/articles" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Get a summary of article counts by status:

curl "https://api.presscart.com/campaigns/CAMPAIGN_ID/articles/status-count" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Campaign lifecycle summary

  1. Create the campaign with objectives and a profile
  2. Place orders for the products you need
  3. Assign order items to the campaign
  4. Update the campaign as your strategy evolves
  5. Track article progress through status counts

Next steps

On this page