Parameters

page
number
Description
Page number for pagination. Default is 1.
per_page
number
Description
Number of records per page (1-100). Default is 30.
status
string
Description
Filter by status: `draft`, `active`, `scheduled`, `sending`, `sent`, `failed`, `cancelled`.
channel
string
Description
Filter by channel: `email`, `push`, or `sms`.
sort
string
Description
Sort order: `newest_first` or `oldest_first`.
GET/v1/campaigns
curl https://api.tradly.app/v1/campaigns \
  -H "Authorization: Bearer YOUR_PUBLISHABLE_OR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
RESPONSE
{
  "status": true,
  "data": {
    "total_records": 2,
    "page": 1,
    "campaigns": [
      {
        "id": 101,
        "name": "Welcome New Users",
        "description": "Onboarding welcome message",
        "channel": "email",
        "status": "sent",
        "audience_type": "all_users",
        "audience_config": null,
        "materialized_audience_ids": null,
        "subject": "Welcome to our marketplace!",
        "content": {
          "html": "<h1>Welcome!</h1><p>Thank you for joining our platform.</p>",
          "text": "Welcome! Thank you for joining our platform."
        },
        "schedule_type": "immediate",
        "scheduled_at": null,
        "sent_at": 1723068000,
        "total_recipients": 1200,
        "capping_per_minute": 600,
        "sent_count": 1195,
        "failed_count": 5,
        "opened_count": 640,
        "clicked_count": 210,
        "metadata": {},
        "created_at": 1723067000,
        "updated_at": 1723068000
      },
      {
        "id": 102,
        "name": "Flash Sale Alert",
        "description": "Weekend discount announcement",
        "channel": "sms",
        "status": "draft",
        "audience_type": "audience_ids",
        "audience_config": {
          "audience_ids": [
            1
          ]
        },
        "materialized_audience_ids": null,
        "subject": "",
        "content": {
          "message": "Flash sale starts now! Use code FLASH20 for 20% off."
        },
        "schedule_type": "scheduled",
        "scheduled_at": 1723154400,
        "sent_at": null,
        "total_recipients": 0,
        "capping_per_minute": null,
        "sent_count": 0,
        "failed_count": 0,
        "opened_count": 0,
        "clicked_count": 0,
        "metadata": {},
        "created_at": 1723068000,
        "updated_at": 1723068000
      }
    ]
  }
}