campaign
GET https://leads.qreq.com/api/campaigns
curl --request GET \
--url 'https://leads.qreq.com/api/campaigns' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/campaigns' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Campaigns retrieved successfully.",
"data": [
{
"id": 1,
"name": "Summer Promo 2025",
"status": "active",
"start_date": "2025-06-01",
"end_date": "2025-06-30",
"target_audience": "leads_us",
"budget": 5000.00,
"created_by": 33,
"created_at": "2025-05-01T08:00:00.000000Z",
"updated_at": "2025-05-02T09:00:00.000000Z"
},
{
"id": 2,
"name": "New Year Blast",
"status": "scheduled",
"start_date": "2025-12-25",
"end_date": "2026-01-05",
"target_audience": "leads_global",
"budget": 10000.00,
"created_by": 33,
"created_at": "2025-11-01T10:00:00.000000Z",
"updated_at": "2025-11-01T10:00:00.000000Z"
}
]
}
GET https://leads.qreq.com/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://leads.qreq.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Campaign retrieved successfully.",
"data": {
"id": 1,
"name": "Summer Promo 2025",
"status": "active",
"start_date": "2025-06-01",
"end_date": "2025-06-30",
"target_audience": "leads_us",
"budget": 5000.00,
"metrics": {
"impressions": 15000,
"clicks": 1200,
"conversions": 300
},
"created_by": 33,
"created_at": "2025-05-01T08:00:00.000000Z",
"updated_at": "2025-05-02T09:00:00.000000Z"
}
}
POST https://leads.qreq.com/api/campaigns
| Parameters | Details | Description |
|---|---|---|
| name | RequiredString | Campaign name |
| start_date | RequiredDate | Start date (YYYY-MM-DD) |
| end_date | RequiredDateEnd date (YYYY-MM-DD) | |
| target_audience | OptionalString | Target audience code or segment |
| budget | OptionalFloat | Budget allocated for the campaign |
curl --request POST \
--url 'https://leads.qreq.com/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Black Friday Campaign", "start_date": "2025-11-20", "end_date": "2025-11-27", "target_audience": "leads_pd", "budget": 8000.00 }'
--url 'https://leads.qreq.com/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Black Friday Campaign", "start_date": "2025-11-20", "end_date": "2025-11-27", "target_audience": "leads_pd", "budget": 8000.00 }'
{
"status": "success",
"message": "Campaign created successfully.",
"data": {
"id": 3,
"name": "Black Friday Campaign",
"status": "scheduled",
"start_date": "2025-11-20",
"end_date": "2025-11-27",
"target_audience": "leads_pd",
"budget": 8000.00,
"created_by": 33,
"created_at": "2025-11-10T14:00:00.000000Z",
"updated_at": "2025-11-10T14:00:00.000000Z"
}
}
PUT https://leads.qreq.com/api/campaigns/{campaign_id}
curl --request PUT \
--url 'https://leads.qreq.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Holiday Campaign Updated", "end_date": "2025-12-31", "budget": 10000.00 }'
--url 'https://leads.qreq.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Holiday Campaign Updated", "end_date": "2025-12-31", "budget": 10000.00 }'
{
"status": "success",
"message": "Campaign updated successfully.",
"data": {
"id": 3,
"name": "Holiday Campaign Updated",
"status": "scheduled",
"start_date": "2025-11-20",
"end_date": "2025-12-31",
"budget": 10000.00,
"updated_at": "2025-11-10T15:00:00.000000Z"
}
}
DELETE https://leads.qreq.com/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Campaign deleted successfully."
}