Introduction

Welcome to the Jmpy.me API! This guide will walk you through the essential steps to integrate our powerful URL shortening and QR code generation features into your application. By the end of this guide, you’ll have a working integration that can create trackable short links and custom QR codes.

Step 1: Get Your API Key

To authenticate your requests, you’ll need an API key. Follow these steps to generate one:
1

Create an Account

Sign up for a free account at jmpy.me/signup.
2

Navigate to API Keys

Log in to your dashboard and go to API Keys Settings.
3

Generate New Key

Click on “Create New API Key”, give it a name (e.g., “Production App”), and copy the key immediately. You won’t be able to see it again!
API Key Generation Dashboard
Security Notice: Keep your API key secure! Never expose it in client-side code (browsers) or public repositories. Use environment variables to store it safely on your server.

Step 2: Create a Short URL

The core feature of Jmpy.me is creating trackable short URLs. You can customize them with aliases, expiration dates, passwords, and associate them with campaigns.
Before you begin:
  • To use branded domains (e.g., link.mybrand.com), you must first add and verify the domain via the Create Branded Domain API.
  • To use subdomains (e.g., promo.jmpy.me), you must reserve the subdomain via the Create Subdomain API.
  • You can check if a custom alias is available using the Check Alias API.
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/very-long-url-that-needs-shortening",
    "custom_alias": "spring-sale-2024",
    "url_type": "standard",
    "tracking_enabled": true,
    "expires_at": "2024-12-31T23:59:59Z",
    "password": "secure-password-123",
    "campaign_id": "123e4567-e89b-12d3-a456-426614174000"
  }'

Example Response

API Response Example
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "short_code": "spring-sale-2024",
  "short_url": "https://jmpy.me/spring-sale-2024",
  "original_url": "https://example.com/very-long-url-that-needs-shortening",
  "custom_alias": "spring-sale-2024",
  "created_at": "2024-01-15T10:30:00Z",
  "tracking_enabled": true,
  "url_type": "standard",
  "click_count": 0
}

Step 3: Generate a QR Code

You can also generate fully customizable QR codes. These can be static or dynamic (linked to a short URL).
curl -X POST https://jmpy.me/api/v1/qr-codes/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "url",
    "content_data": {
      "url": "https://jmpy.me/abc123"
    },
    "visual_settings": {
      "foregroundColor": "#000000",
      "backgroundColor": "#FFFFFF",
      "size": 300,
      "margin": 1
    },
    "tracking_enabled": true,
    "is_dynamic": true
  }'

Example Response

The API returns the QR code as a Base64 encoded Data URL image (qr_code_data), which you can directly display in an <img> tag. QR Code Result
{
  "success": true,
  "data": {
    "id": "qr_123456789",
    "content": "https://jmpy.me/abc123",
    "qr_code_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "content_type": "url",
    "visual_settings": {
        "foregroundColor": "#000000",
        "backgroundColor": "#FFFFFF",
        "size": 300
    },
    "tracking_enabled": true,
    "is_dynamic": true
  }
}

What’s Next?