Developer API.

Integrate the power of Just Right Analytics into your own applications with our v1 REST API.

API Workflow Diagram

Authentication & Headers

To access the API, you must authenticate all requests using your private API Key from Account Settings.

1. Authentication (Choose One)

Header: Authorization: Bearer YOUR_API_KEY
// OR
Query: ?key=YOUR_API_KEY
API Key Location Guide

Find your key in Account Settings

2. Content Type (For POST/PATCH)

Header: Content-Type: application/json
Accept: application/json

GET Account Usage & Limits

Check your current plan, link creation limits, and total clicks recorded.

https://jr.ro/api/v1/get_usage

Response Example:

{
    "status": "success",
    "plan": "PRO",
    "usage": {
        "total_links_created": 45,
        "links_limit": 500,
        "links_remaining": 455,
        "total_clicks_recorded": 12840
    }
}

GET List Links & Stats

Retrieve all your links or get detailed statistics for a specific link using its ID.

https://jr.ro/api/v1/links

Query Parameters:

Response Example:

{
    "status": "success",
    "total_results": 1,
    "data": {
        "id": 101,
        "long_url": "https://example.com",
        "short_code": "my-link",
        "custom_alias": "promo",
        "clicks": 1240,
        "created_at": "2026-03-12 10:00:00"
    }
}

POST Create New Link

Generate a new shortened URL instantly. Supports custom aliases.

https://jr.ro/api/v1/shorten

Request Body (JSON):

{
    "url": "https://amazon.com/product/123",
    "alias": "tech-deal"
}

Response Example:

{
    "status": "success",
    "short_url": "https://jr.ro/tech-deal",
    "short_code": "tech-deal",
    "long_url": "https://amazon.com/product/123"
}

POST Bulk Shorten

Shorten up to 20 URLs in a single request for maximum efficiency.

https://jr.ro/api/v1/bulk_shorten

Request Body (JSON):

{
    "urls": [
        "https://site-a.com",
        "https://site-b.com"
    ]
}

Response Example:

{
    "status": "success",
    "links": [
        { "original": "https://site-a.com", "short": "https://jr.ro/abc123" },
        { "original": "https://site-b.com", "short": "https://jr.ro/def456" }
    ]
}

PATCH Update Destination

Update the destination URL of an existing link without changing its short code.

https://jr.ro/api/v1/update_link

Request Body (JSON):

{
    "id": 101,
    "new_url": "https://new-destination.com"
}

Response Example:

{
    "status": "success",
    "new_url": "https://new-destination.com"
}

DELETE Remove Link

Permanently delete a short link and its associated statistics.

https://jr.ro/api/v1/delete_link?id=101

Query Parameters:

Response Example:

{
    "status": "success",
    "message": "Link deleted permanently"
}

GET Validate Alias

Check if a custom alias is available before attempting to create a link.

https://jr.ro/api/v1/validate_alias?alias=summer-sale

Response Example:

{
    "status": "available",
    "available": true
}

HTTP Status Codes

200/201 Success
400 Bad Request
401 Unauthorized
404 Not Found
409 Alias Taken