API reference

Create, manage and analyse short links programmatically. All endpoints live under /v1, accept JSON and authenticate with a Bearer token generated in your dashboard.

Base URLhttps://rdirct.to/v1

Authentication

Generate an access token in Dashboard → API and send it as a Bearer token on every request. All requests must use HTTPS and JSON.

Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

Errors

Errors return a JSON body with message, resource, description and an errors array.

{
    "message": "ALREADY_EXISTS",
    "resource": "links",
    "description": "This slug is already taken. Please try a different one.",
    "errors": [
        {
            "field": "slug",
            "error_code": "slug_taken",
            "message": "This slug is already taken."
        }
    ]
}
HTTPmessageMeaning
400INVALID_ARGA parameter is missing or invalid
403FORBIDDENMissing/invalid token
403QUOTA_EXCEEDEDMonthly link limit reached
403UPGRADE_REQUIREDFeature not in your plan
404NOT_FOUNDResource not found
409ALREADY_EXISTSCustom slug already taken
429RATE_LIMIT_EXCEEDEDToo many requests

Rate limits

Each token can make 120 requests per minute. New links also count against your plan's monthly link limit.

Links

POST/shorten

Shorten a link

Converts a long URL to a short link. If you already shortened the exact same URL (without a custom slug) the existing link is returned with status 200.

ParameterInTypeDescription
long_url requiredbodystringThe http(s) URL to shorten
domainbodystringIgnored – always rdirct.to
group_guidbodystringIgnored (accepted for compatibility)
curl -X POST "https://rdirct.to/v1/shorten" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"long_url":"https://example.com/very/long/landing-page?utm_source=api"}'
<?php
$ch = curl_init('https://rdirct.to/v1/shorten');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode(array (
  'long_url' => 'https://example.com/very/long/landing-page?utm_source=api',
)),
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/shorten', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"long_url":"https://example.com/very/long/landing-page?utm_source=api"})
});
console.log(await res.json());
import requests

res = requests.request('POST', 'https://rdirct.to/v1/shorten',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={"long_url":"https://example.com/very/long/landing-page?utm_source=api"})
print(res.status_code, res.json())
Response 201
{
    "created_at": "2026-10-07T11:59:00+0530",
    "id": "rdirct.to/aB3dE9x",
    "link": "https://rdirct.to/aB3dE9x",
    "custom_links": [],
    "long_url": "https://example.com/very/long/landing-page?utm_source=api",
    "title": "My campaign",
    "archived": false,
    "created_by": "you@example.com",
    "client_id": "api",
    "tags": [
        "launch"
    ],
    "deeplinks": [],
    "expires_at": null,
    "total_clicks": 0,
    "references": {
        "group": "https://rdirct.to/v1/groups/G1"
    }
}
Try it
POST/links

Create a link

Creates a short link with optional title, tags, expiry and custom slug. Custom slugs need a plan that includes them. Returns 409 ALREADY_EXISTS if the slug is taken.

ParameterInTypeDescription
long_url requiredbodystringDestination URL
titlebodystringFriendly title
tagsbodyarrayUp to 10 tags
slugbodystringCustom back-half, 3–30 chars (letters, digits, - _)
expires_atbodystringISO-8601 date when the link stops working
curl -X POST "https://rdirct.to/v1/links" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"long_url":"https://example.com/diwali-sale","title":"Diwali sale","tags":["sale","whatsapp"],"slug":"diwali"}'
<?php
$ch = curl_init('https://rdirct.to/v1/links');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode(array (
  'long_url' => 'https://example.com/diwali-sale',
  'title' => 'Diwali sale',
  'tags' => 
  array (
    0 => 'sale',
    1 => 'whatsapp',
  ),
  'slug' => 'diwali',
)),
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"long_url":"https://example.com/diwali-sale","title":"Diwali sale","tags":["sale","whatsapp"],"slug":"diwali"})
});
console.log(await res.json());
import requests

res = requests.request('POST', 'https://rdirct.to/v1/links',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={"long_url":"https://example.com/diwali-sale","title":"Diwali sale","tags":["sale","whatsapp"],"slug":"diwali"})
print(res.status_code, res.json())
Response 201
{
    "created_at": "2026-10-07T11:59:00+0530",
    "id": "rdirct.to/diwali",
    "link": "https://rdirct.to/diwali",
    "custom_links": [
        "https://rdirct.to/diwali"
    ],
    "long_url": "https://example.com/diwali-sale",
    "title": "Diwali sale",
    "archived": false,
    "created_by": "you@example.com",
    "client_id": "api",
    "tags": [
        "sale",
        "whatsapp"
    ],
    "deeplinks": [],
    "expires_at": null,
    "total_clicks": 0,
    "references": {
        "group": "https://rdirct.to/v1/groups/G1"
    }
}
Try it
GET/links/{link}

Retrieve a link

Returns a link. {link} is the id shown in responses such as rdirct.to/aB3dE9x (or just the code).

ParameterInTypeDescription
link requiredpathstringLink id, e.g. rdirct.to/aB3dE9x
curl -X GET "https://rdirct.to/v1/links/rdirct.to/aB3dE9x" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "created_at": "2026-10-07T11:59:00+0530",
    "id": "rdirct.to/aB3dE9x",
    "link": "https://rdirct.to/aB3dE9x",
    "custom_links": [],
    "long_url": "https://example.com/very/long/landing-page?utm_source=api",
    "title": "My campaign",
    "archived": false,
    "created_by": "you@example.com",
    "client_id": "api",
    "tags": [
        "launch"
    ],
    "deeplinks": [],
    "expires_at": null,
    "total_clicks": 0,
    "references": {
        "group": "https://rdirct.to/v1/groups/G1"
    }
}
Try it
PATCH/links/{link}

Update a link

Update title, tags, archived state, destination or expiry.

ParameterInTypeDescription
link requiredpathstringLink id
titlebodystringNew title
archivedbodybooleanArchive / unarchive
tagsbodyarrayReplace tags
long_urlbodystringNew destination
expires_atbodystringNew expiry or null
curl -X PATCH "https://rdirct.to/v1/links/rdirct.to/aB3dE9x" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Updated title","archived":false}'
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'PATCH',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode(array (
  'title' => 'Updated title',
  'archived' => false,
)),
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"title":"Updated title","archived":false})
});
console.log(await res.json());
import requests

res = requests.request('PATCH', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={"title":"Updated title","archived":false})
print(res.status_code, res.json())
Response 200
{
    "created_at": "2026-10-07T11:59:00+0530",
    "id": "rdirct.to/aB3dE9x",
    "link": "https://rdirct.to/aB3dE9x",
    "custom_links": [],
    "long_url": "https://example.com/very/long/landing-page?utm_source=api",
    "title": "Updated title",
    "archived": false,
    "created_by": "you@example.com",
    "client_id": "api",
    "tags": [
        "launch"
    ],
    "deeplinks": [],
    "expires_at": null,
    "total_clicks": 0,
    "references": {
        "group": "https://rdirct.to/v1/groups/G1"
    }
}
Try it
DELETE/links/{link}

Delete a link

Permanently deletes a link and its click history. Returns 204 No Content.

ParameterInTypeDescription
link requiredpathstringLink id
curl -X DELETE "https://rdirct.to/v1/links/rdirct.to/aB3dE9x" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(res.status);
import requests

res = requests.request('DELETE', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code)
Response 204
(empty)
Try it
POST/expand

Expand a link

Returns the long URL behind any short link on this domain.

ParameterInTypeDescription
link_id requiredbodystringe.g. rdirct.to/aB3dE9x
curl -X POST "https://rdirct.to/v1/expand" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"link_id":"rdirct.to/aB3dE9x"}'
<?php
$ch = curl_init('https://rdirct.to/v1/expand');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode(array (
  'link_id' => 'rdirct.to/aB3dE9x',
)),
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/expand', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"link_id":"rdirct.to/aB3dE9x"})
});
console.log(await res.json());
import requests

res = requests.request('POST', 'https://rdirct.to/v1/expand',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={"link_id":"rdirct.to/aB3dE9x"})
print(res.status_code, res.json())
Response 200
{
    "created_at": "2026-10-07T11:59:00+0530",
    "link": "https://rdirct.to/aB3dE9x",
    "id": "rdirct.to/aB3dE9x",
    "long_url": "https://example.com/very/long/landing-page"
}
Try it
GET/groups/{group_guid}/links

List links

Paginated list of your links, newest first. Your group id is returned by GET /user (default_group_guid).

ParameterInTypeDescription
group_guid requiredpathstringYour group id, e.g. G1
sizequeryinteger1–100 (default 50)
pagequeryintegerPage number
queryquerystringSearch in URL, title, code
archivedquerystringoff (default), on, both
created_afterqueryintegerUnix timestamp
created_beforequeryintegerUnix timestamp
custom_linkquerystringon = only custom slugs
curl -X GET "https://rdirct.to/v1/groups/G1/links" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/groups/G1/links');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/groups/G1/links', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/groups/G1/links',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "pagination": {
        "prev": "",
        "next": "",
        "size": 50,
        "page": 1,
        "total": 1
    },
    "links": [
        {
            "created_at": "2026-10-07T11:59:00+0530",
            "id": "rdirct.to/aB3dE9x",
            "link": "https://rdirct.to/aB3dE9x",
            "custom_links": [],
            "long_url": "https://example.com/very/long/landing-page?utm_source=api",
            "title": "My campaign",
            "archived": false,
            "created_by": "you@example.com",
            "client_id": "api",
            "tags": [
                "launch"
            ],
            "deeplinks": [],
            "expires_at": null,
            "total_clicks": 0,
            "references": {
                "group": "https://rdirct.to/v1/groups/G1"
            }
        }
    ]
}
Try it

Analytics

GET/links/{link}/clicks

Clicks over time

Click counts per time unit. Bots are excluded.

ParameterInTypeDescription
link requiredpathstringLink id
unitquerystringminute, hour, day, week or month. Default: day
unitsqueryintegerNumber of units to look back. -1 = default (30 days)
curl -X GET "https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "unit_reference": "2026-10-07T11:59:00+0530",
    "units": 30,
    "unit": "day",
    "link_clicks": [
        {
            "date": "2026-10-07T00:00:00+0530",
            "clicks": 42
        },
        {
            "date": "2026-10-06T00:00:00+0530",
            "clicks": 37
        }
    ]
}
Try it
GET/links/{link}/clicks/summary

Total clicks

Total clicks in the selected range.

ParameterInTypeDescription
link requiredpathstringLink id
unitquerystringminute, hour, day, week or month. Default: day
unitsqueryintegerNumber of units to look back. -1 = default (30 days)
curl -X GET "https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks/summary" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks/summary');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks/summary', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x/clicks/summary',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "unit_reference": "2026-10-07T11:59:00+0530",
    "total_clicks": 1280,
    "units": 30,
    "unit": "day"
}
Try it
GET/links/{link}/countries

Clicks by country

Also available: /cities, /devices, /os, /browsers, /referring_domains (same response shape, different "facet"). Visitor IP addresses are never exposed.

ParameterInTypeDescription
link requiredpathstringLink id
unitquerystringminute, hour, day, week or month. Default: day
unitsqueryintegerNumber of units to look back. -1 = default (30 days)
curl -X GET "https://rdirct.to/v1/links/rdirct.to/aB3dE9x/countries" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/countries');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/countries', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x/countries',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "unit_reference": "2026-10-07T11:59:00+0530",
    "metrics": [
        {
            "value": "IN",
            "clicks": 980
        },
        {
            "value": "US",
            "clicks": 120
        }
    ],
    "units": 30,
    "unit": "day",
    "facet": "countries"
}
Try it
GET/groups/{group_guid}/countries

Account-wide metrics

Same facets as the link endpoints (countries, cities, devices, os, browsers, referring_domains) but aggregated across all your links.

ParameterInTypeDescription
group_guid requiredpathstringYour group id
unitquerystringminute, hour, day, week or month. Default: day
unitsqueryintegerNumber of units to look back. -1 = default (30 days)
curl -X GET "https://rdirct.to/v1/groups/G1/countries" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/groups/G1/countries');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/groups/G1/countries', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/groups/G1/countries',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "unit_reference": "2026-10-07T11:59:00+0530",
    "metrics": [
        {
            "value": "IN",
            "clicks": 5400
        }
    ],
    "units": 30,
    "unit": "day",
    "facet": "countries"
}
Try it
GET/clicks/summary

Account click total

Total clicks across all your links.

ParameterInTypeDescription
unitquerystringminute, hour, day, week or month. Default: day
unitsqueryintegerNumber of units to look back. -1 = default (30 days)
curl -X GET "https://rdirct.to/v1/clicks/summary" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/clicks/summary');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/clicks/summary', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/clicks/summary',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "unit_reference": "2026-10-07T11:59:00+0530",
    "total_clicks": 9100,
    "units": 30,
    "unit": "day"
}
Try it

Tools

GET/links/{link}/qr

QR code

Returns a URL to a PNG QR code for the link. Optional hex colours without #.

ParameterInTypeDescription
link requiredpathstringLink id
colorquerystringForeground hex, default 000000
backgroundquerystringBackground hex, default ffffff
curl -X GET "https://rdirct.to/v1/links/rdirct.to/aB3dE9x/qr" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/qr');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/links/rdirct.to/aB3dE9x/qr', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/links/rdirct.to/aB3dE9x/qr',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "qr_code": "https://api.qrserver.com/v1/create-qr-code/?size=600x600&data=...",
    "link": "https://rdirct.to/aB3dE9x",
    "image_format": "png"
}
Try it

Account

GET/user

Current user

Profile, plan and monthly link quota for the token owner.

curl -X GET "https://rdirct.to/v1/user" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/user');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/user', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/user',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "login": "you@example.com",
    "name": "You",
    "is_active": true,
    "default_group_guid": "G1",
    "plan": "Starter",
    "quota": {
        "limit": 500,
        "used": 12,
        "resets_at": "2026-11-07T11:59:00+0530"
    }
}
Try it
GET/groups

List groups

Returns your single group (for compatibility with common clients).

curl -X GET "https://rdirct.to/v1/groups" \
  -H "Authorization: Bearer YOUR_TOKEN"
<?php
$ch = curl_init('https://rdirct.to/v1/groups');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_TOKEN', 'Content-Type: application/json'],
]);
$res = json_decode(curl_exec($ch), true);
print_r($res);
const res = await fetch('https://rdirct.to/v1/groups', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
});
console.log(await res.json());
import requests

res = requests.request('GET', 'https://rdirct.to/v1/groups',
    headers={'Authorization': 'Bearer YOUR_TOKEN'})
print(res.status_code, res.json())
Response 200
{
    "groups": [
        {
            "guid": "G1",
            "name": "You",
            "is_active": true,
            "role": "org-admin",
            "domains": [
                "rdirct.to"
            ]
        }
    ]
}
Try it