GET
https://jmpy.me/api/v1
/
campaigns
List Campaigns
curl --request GET \
  --url https://jmpy.me/api/v1/campaigns \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "status": "<string>",
      "url_count": 123,
      "total_clicks": 123,
      "created_at": "<string>"
    }
  ],
  "meta": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "total_pages": 123
  }
}
Retrieve a list of your campaigns with pagination and filtering options.

Query Parameters

page
integer
default:"1"
The page number to retrieve.Default: 1
limit
integer
default:"20"
The number of campaigns to return per page. Max 100.Default: 20
status
string
Filter campaigns by their current status.Allowed values:
  • active: Campaigns currently running
  • scheduled: Campaigns set to start in the future
  • ended: Campaigns that have passed their end date
  • archived: Archived campaigns
Search for campaigns by name. You can also use name as an alias for this parameter.
range
string
Filter by relative date range.Allowed values:
  • 24h: Last 24 hours
  • 7d: Last 7 days
  • 30d: Last 30 days
  • 90d: Last 90 days
  • 1y or last_year: Last 365 days
  • all: All time (default)
start_date
string
Filter by specific start date (ISO 8601). Cannot be used with range.
end_date
string
Filter by specific end date (ISO 8601). Cannot be used with range.

Response

success
boolean
Indicates if the request was successful.
data
array
List of campaigns.
meta
object
Pagination metadata.

Request Examples

# Basic List
curl -X GET "https://jmpy.me/api/v1/campaigns?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Filtered by Date Range (Last 30 Days) and Search
curl -X GET "https://jmpy.me/api/v1/campaigns?range=30d&search=summer" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "success": true,
  "data": [
    {
      "id": "110e8400-e29b-41d4-a716-446655440000",
      "name": "Q1 Marketing Campaign",
      "url_count": 15,
      "total_clicks": 4523,
      "status": "active",
      "created_at": "2024-01-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 5,
    "total_pages": 1
  }
}