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
| Name | Type | Description |
|---|---|---|
| search string | string | Only campaigns whose name contains this text. |
Request
curl https://cotlet.dev/api/v1/postscript/campaigns \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("postscript", "list_campaigns") const result = await cotlet.call('postscript', 'list_campaigns'); cotlet call postscript list_campaigns Example response
{
"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": []
}
]
}