GET
https://jmpy.me/api/v1
/
campaigns
/
{id}
Get Campaign
curl --request GET \
  --url https://jmpy.me/api/v1/campaigns/{id} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "url_count": 123,
    "total_clicks": 123,
    "created_at": "<string>"
  }
}
Retrieve detailed information about a specific campaign, including its aggregated statistics (clicks and URL counts). You can filter the statistics by a specific date range.

Path Parameters

id
string
required
The unique identifier (UUID) of the campaign OR the campaign name.Note on Names: If using a campaign name with spaces (e.g., “Summer Sale”), it must be URL-encoded in the path (e.g., Summer%20Sale).Example: 110e8400-e29b-41d4-a716-446655440000 or Summer%20Sale%202024

Query Parameters

range
string
Filter statistics by relative date range.Allowed values: 24h, 7d, 30d, 90d, 1y, all (default)
start_date
string
Filter statistics by specific start date (ISO 8601).
end_date
string
Filter statistics by specific end date (ISO 8601).

Response

success
boolean
Indicates if the request was successful.
data
object
The campaign object.

Request Examples

# Get by ID
curl -X GET "https://jmpy.me/api/v1/campaigns/110e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get by Name (URL Encoded) with Date Filter (Last 7 Days)
curl -X GET "https://jmpy.me/api/v1/campaigns/Summer%20Sale%202024?range=7d" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "success": true,
  "data": {
    "id": "110e8400-e29b-41d4-a716-446655440000",
    "name": "Q1 Marketing Campaign",
    "description": "Product launch campaign",
    "url_count": 15,
    "total_clicks": 1420,
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}