POST
https://jmpy.me/api/v1
/
campaigns
Create Campaign
curl --request POST \
  --url https://jmpy.me/api/v1/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "start_date": "<string>",
  "end_date": "<string>",
  "tags": [
    {}
  ]
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "start_date": "<string>",
    "end_date": "<string>",
    "tags": [
      {}
    ],
    "url_count": 123,
    "total_clicks": 123,
    "created_at": "<string>"
  }
}
Create a new campaign to organize and track your short URLs. Campaigns allow you to group URLs together and analyze their collective performance over time.

Body Parameters

name
string
required
The name of the campaign.Requirements:
  • 1-100 characters
  • Must be unique within your account
Example: Summer Sale 2024
description
string
A descriptive text about the campaign goals or details.Example: Promotional links for the summer season discount event
start_date
string
When the campaign starts (ISO 8601 format).Example: 2024-06-01T00:00:00Z
end_date
string
When the campaign ends (ISO 8601 format).Example: 2024-08-31T23:59:59Z
tags
array
List of tags for categorization and filtering.Example: ["marketing", "social-media", "q3"]

Response

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

Request Examples

curl -X POST "https://jmpy.me/api/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer Sale 2024",
    "description": "Promotional links for the summer season discount event",
    "start_date": "2024-06-01T00:00:00Z",
    "end_date": "2024-08-31T23:59:59Z",
    "tags": ["marketing", "summer"]
  }'

Response Examples

{
  "success": true,
  "data": {
    "id": "110e8400-e29b-41d4-a716-446655440000",
    "name": "Summer Sale 2024",
    "description": "Promotional links for the summer season discount event",
    "start_date": "2024-06-01T00:00:00.000Z",
    "end_date": "2024-08-31T23:59:59.000Z",
    "tags": ["marketing", "summer"],
    "url_count": 0,
    "total_clicks": 0,
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}