GET
/
short-urls
/
{id}
Get Short URL
curl --request GET \
  --url https://jmpy.me/api/v1/short-urls/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "short_code": "<string>",
  "short_url": "<string>",
  "original_url": "<string>",
  "name": "<string>",
  "clicks": 123,
  "tracking_enabled": true,
  "url_type": "<string>",
  "subdomain": "<string>",
  "branded_domain": "<string>",
  "campaign_id": "<string>",
  "expires_at": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>"
}
Get detailed information about a specific short URL including click statistics, domain settings, and configuration.

Path Parameters

id
string
required
The UUID, short code, or custom alias of the short URL.Examples: 550e8400-e29b-41d4-a716-446655440000, abc123, my-campaign

Response

id
string
Unique identifier (UUID).
short_code
string
The short code.
short_url
string
The complete short URL.
original_url
string
The destination URL.
name
string
Friendly name.
clicks
integer
Total number of clicks.
tracking_enabled
boolean
Whether analytics is enabled.
url_type
string
URL type: standard, subdomain, or branded.
subdomain
string
The subdomain (if url_type is subdomain). See List Subdomains.
branded_domain
string
The branded domain (if url_type is branded). See List Branded Domains.
campaign_id
string
Associated campaign UUID (if any). See Campaigns API.
expires_at
string
Expiration date (if set).
created_at
string
Creation timestamp.
updated_at
string
Last update timestamp.

Request Examples

curl -X GET "https://jmpy.me/api/v1/short-urls/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "short_code": "abc123",
    "short_url": "https://jmpy.me/abc123",
    "original_url": "https://example.com/landing-page",
    "name": "Q1 Marketing Campaign",
    "custom_alias": null,
    "clicks": 1542,
    "tracking_enabled": true,
    "url_type": "standard",
    "subdomain": null,
    "branded_domain": null,
    "campaign_id": "660e8400-e29b-41d4-a716-446655440000",
    "utm_source": "newsletter",
    "utm_medium": "email",
    "utm_campaign": "q1-promo",
    "expires_at": null,
    "created_at": "2024-01-15T10:30:00.000Z",
    "updated_at": "2024-01-20T14:22:00.000Z"
  }
}

Use Cases

Determine if a link is expired or approaching expiration:
import requests
from datetime import datetime, timezone

def check_link_status(short_code):
    response = requests.get(
        f"https://jmpy.me/api/v1/short-urls/{short_code}",
        headers={"Authorization": "Bearer YOUR_API_KEY"}
    )
    data = response.json()["data"]
    
    if not data.get("expires_at"):
        return "No expiration set"
    
    expires = datetime.fromisoformat(data["expires_at"].replace("Z", "+00:00"))
    now = datetime.now(timezone.utc)
    
    if expires < now:
        return "EXPIRED"
    elif (expires - now).days < 7:
        return f"Expiring in {(expires - now).days} days"
    else:
        return "Active"

# Check status
status = check_link_status("my-promo")
print(f"Link status: {status}")
Check which domain type and settings a link uses:
async function getDomainInfo(shortCode) {
  const response = await fetch(
    `https://jmpy.me/api/v1/short-urls/${shortCode}`,
    { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
  );
  const { data } = await response.json();
  
  switch (data.url_type) {
    case 'standard':
      return { type: 'Standard', domain: 'jmpy.me' };
    case 'subdomain':
      // See: /api-reference/domains/list-subdomains
      return { type: 'Subdomain', domain: `${data.subdomain}.jmpy.me` };
    case 'branded':
      // See: /api-reference/domains/list-branded
      return { type: 'Branded', domain: data.branded_domain };
  }
}

Update Short URL

Modify the destination, alias, or settings

Delete Short URL

Remove the short URL permanently

URL Analytics

View detailed click analytics

List Short URLs

Browse all your short URLs

Get Campaign

View the associated campaign

List Domains

View your domain settings