GET
https://jmpy.me/api/v1
/
short-urls
List Short URLs
curl --request GET \
  --url https://jmpy.me/api/v1/short-urls \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "shortUrls": [
      {}
    ],
    "pagination": {
      "page": 123,
      "limit": 123,
      "total": 123
    }
  },
  "pagination": {}
}
Get a list of all short URLs created by the authenticated user with support for pagination, filtering, and sorting.

Query Parameters

page
integer
default:1
Page number for pagination.
limit
integer
default:20
Number of items per page (max 100).
sort
string
default:"created_at"
Field to sort by. Options: created_at, clicks, name, short_code.
order
string
default:"desc"
Sort order: asc or desc.
Search term to filter by name, short code, or original URL.
campaign_id
string
Filter by campaign UUID. See List Campaigns to find campaign IDs.
status
string
Filter by status: active, expired, disabled.
url_type
string
Filter by URL type: standard, subdomain, branded. See Domains API for domain management.
start_date
string
Filter URLs created after this date (ISO 8601).
end_date
string
Filter URLs created before this date (ISO 8601).

Response

data
object
Contains the short URLs and pagination info.
pagination
object
Top-level pagination metadata (duplicate of data.pagination for convenience).

Request Examples

curl -X GET "https://jmpy.me/api/v1/short-urls?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "success": true,
  "data": {
    "shortUrls": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "short_code": "abc123",
        "short_url": "https://jmpy.me/abc123",
        "original_url": "https://example.com/page1",
        "name": "Landing Page",
        "channel": "api",
        "source": "URL_SHORTENER",
        "custom_alias": null,
        "click_count": 1542,
        "tracking_enabled": true,
        "created_at": "2024-01-15T10:30:00.000Z",
        "expires_at": null
      },
      {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "short_code": "def456",
        "short_url": "https://jmpy.me/def456",
        "original_url": "https://example.com/page2",
        "name": "Blog Post",
        "channel": "api",
        "source": "URL_SHORTENER",
        "custom_alias": null,
        "click_count": 823,
        "tracking_enabled": true,
        "created_at": "2024-01-14T09:15:00.000Z",
        "expires_at": null
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 47
    }
  },
  "timestamp": "2024-01-15T10:30:00.000Z",
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 47
  }
}

Use Cases

Get all URLs associated with a specific campaign:
import requests

# First, find your campaign ID
# See: /api-reference/campaigns/list
CAMPAIGN_ID = "550e8400-e29b-41d4-a716-446655440000"

response = requests.get(
    "https://jmpy.me/api/v1/short-urls",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={
        "campaign_id": CAMPAIGN_ID,
        "sort": "clicks",
        "order": "desc"
    }
)

urls = response.json()["data"]["shortUrls"]
total_clicks = sum(url["click_count"] for url in urls)
print(f"Campaign has {len(urls)} URLs with {total_clicks} total clicks")
Get all branded domain URLs:
# Get branded URLs
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=branded" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get subdomain URLs
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=subdomain" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get standard jmpy.me URLs
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=standard" \
  -H "Authorization: Bearer YOUR_API_KEY"
See Domains API to manage your domains.
Combine search with filters for precise results:
import requests
from datetime import datetime, timedelta

# Search for marketing links created in the last 30 days
end_date = datetime.utcnow()
start_date = end_date - timedelta(days=30)

response = requests.get(
    "https://jmpy.me/api/v1/short-urls",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={
        "search": "marketing",
        "start_date": start_date.isoformat() + "Z",
        "end_date": end_date.isoformat() + "Z",
        "status": "active"
    }
)

urls = response.json()["data"]["shortUrls"]
print(f"Found {len(urls)} active marketing links from the last 30 days")