POST
https://jmpy.me/api/v1
/
short-urls
Create with Alias
curl --request POST \
  --url https://jmpy.me/api/v1/short-urls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "custom_alias": "<string>",
  "url_type": "<string>",
  "subdomain": "<string>",
  "branded_domain": "<string>",
  "name": "<string>",
  "campaign_id": "<string>",
  "expires_at": "<string>",
  "tracking_enabled": true
}
'
{
  "id": "<string>",
  "short_code": "<string>",
  "short_url": "<string>",
  "original_url": "<string>",
  "custom_alias": "<string>",
  "url_type": "<string>"
}
Create a new short URL and assign it a readable, custom alias immediately. You can create aliases on the standard jmpy.me domain, or on your custom subdomains and branded domains.
Custom Alias Scoping: Aliases are unique per domain context:
  • Standard URLs (jmpy.me): Alias must be unique among all standard URLs
  • Subdomain URLs (subdomain.jmpy.me): Alias must be unique within that specific subdomain
  • Branded URLs (yourdomain.com): Alias must be unique within that specific branded domain
This means jmpy.me/promo and acme.jmpy.me/promo can coexist as separate short URLs.

Body Parameters

url
string
required
The destination URL.Requirements:
  • Valid URL with http:// or https:// protocol
custom_alias
string
required
The custom alias you want to use.Requirements:
  • 3-50 characters
  • Alphanumeric, underscores (_), or dashes (-) only
  • Must be unique in the chosen domain context
url_type
string
default:"standard"
The type of URL to create.
ValueDescription
standardCreate on jmpy.me (default)
subdomainCreate on a specific subdomain
brandedCreate on a branded domain
subdomain
string
The subdomain to use (required when url_type=subdomain). Also used for branded subdomains (e.g., promo.brand.com).
branded_domain
string
The branded domain to use (required when url_type=branded).
name
string
A friendly name for the short URL helps with management.
campaign_id
string
UUID of a campaign to associate this URL with.
expires_at
string
ISO 8601 formatted date string for when the link should expire (e.g. 2024-12-31T23:59:59Z).
tracking_enabled
boolean
default:"true"
Whether to track clicks and analytics for this URL.

Response

id
string
Unique identifier (UUID) for the short URL.
short_code
string
The generated short code (same as alias for custom aliases).
short_url
string
The full, clickable short URL (e.g., https://jmpy.me/alias).
original_url
string
The destination URL.
custom_alias
string
The custom alias that was assigned.
url_type
string
The type of URL context.

Request Examples

curl -X POST "https://jmpy.me/api/v1/short-urls" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/summer-sale",
    "custom_alias": "summer-sale",
    "name": "Summer Notification"
  }'

Response Examples

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "short_code": "summer-sale",
    "short_url": "https://jmpy.me/summer-sale",
    "original_url": "https://example.com/summer-sale",
    "custom_alias": "summer-sale",
    "url_type": "standard",
    "subdomain": null,
    "branded_domain": null,
    "click_count": 0,
    "created_at": "2024-01-01T12:00:00Z",
    "tracking_enabled": true
  }
}

Use Cases

Create recognizable, branded links for your marketing campaigns to increase click-through rates.
await createShortUrl({
  url: 'https://myshop.com/products/summer-sale/page',
  custom_alias: 'summer24',
  campaign_id: 'campaign_uuid_here'
});
// Result: https://jmpy.me/summer24