List campaigns

Campaign flows from Messaging > Flow Builder, with status and the segments they include.

GET https://cotlet.dev/api/v1/postscript/campaigns

read

Lists the one-time campaign flows in Flow Builder, as the list shows them: name, status and the segments in Include and Exclude.. Use campaign_id with schedule_campaign, send_preview and stop_campaign.

Parameters

Parameters: list_campaigns
NameTypeDescription
search string string Only campaigns whose name contains this text.

Request

cURL
curl https://cotlet.dev/api/v1/postscript/campaigns \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("postscript", "list_campaigns")
Node.js
const result = await cotlet.call('postscript', 'list_campaigns');
CLI
cotlet call postscript list_campaigns

Example response

JSON

{
  "campaigns": [
    {
      "campaign_id": "f_51877",
      "name": "VIP drop",
      "status": "draft",
      "include_segments": [
        "VIPACCESS opt-ins"
      ],
      "exclude_segments": []
    },
    {
      "campaign_id": "f_51702",
      "name": "Restock alert",
      "status": "ended",
      "include_segments": [
        "All Customers and Subscribers (INTL Included)"
      ],
      "exclude_segments": []
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.