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.
https://rdirct.to/v1Authentication
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/jsonErrors
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."
}
]
}| HTTP | message | Meaning |
|---|---|---|
| 400 | INVALID_ARG | A parameter is missing or invalid |
| 403 | FORBIDDEN | Missing/invalid token |
| 403 | QUOTA_EXCEEDED | Monthly link limit reached |
| 403 | UPGRADE_REQUIRED | Feature not in your plan |
| 404 | NOT_FOUND | Resource not found |
| 409 | ALREADY_EXISTS | Custom slug already taken |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
Rate limits
Each token can make 120 requests per minute. New links also count against your plan's monthly link limit.
Links
/shortenShorten 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.
| Parameter | In | Type | Description |
|---|---|---|---|
long_url required | body | string | The http(s) URL to shorten |
domain | body | string | Ignored – always rdirct.to |
group_guid | body | string | Ignored (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()){
"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
/linksCreate 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.
| Parameter | In | Type | Description |
|---|---|---|---|
long_url required | body | string | Destination URL |
title | body | string | Friendly title |
tags | body | array | Up to 10 tags |
slug | body | string | Custom back-half, 3–30 chars (letters, digits, - _) |
expires_at | body | string | ISO-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()){
"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
/links/{link}Retrieve a link
Returns a link. {link} is the id shown in responses such as rdirct.to/aB3dE9x (or just the code).
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link 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()){
"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
/links/{link}Update a link
Update title, tags, archived state, destination or expiry.
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link id |
title | body | string | New title |
archived | body | boolean | Archive / unarchive |
tags | body | array | Replace tags |
long_url | body | string | New destination |
expires_at | body | string | New 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()){
"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
/links/{link}Delete a link
Permanently deletes a link and its click history. Returns 204 No Content.
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link 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)(empty)Try it
/expandExpand a link
Returns the long URL behind any short link on this domain.
| Parameter | In | Type | Description |
|---|---|---|---|
link_id required | body | string | e.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()){
"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
/groups/{group_guid}/linksList links
Paginated list of your links, newest first. Your group id is returned by GET /user (default_group_guid).
| Parameter | In | Type | Description |
|---|---|---|---|
group_guid required | path | string | Your group id, e.g. G1 |
size | query | integer | 1–100 (default 50) |
page | query | integer | Page number |
query | query | string | Search in URL, title, code |
archived | query | string | off (default), on, both |
created_after | query | integer | Unix timestamp |
created_before | query | integer | Unix timestamp |
custom_link | query | string | on = 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()){
"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
/links/{link}/clicksClicks over time
Click counts per time unit. Bots are excluded.
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link id |
unit | query | string | minute, hour, day, week or month. Default: day |
units | query | integer | Number 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()){
"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
/links/{link}/clicks/summaryTotal clicks
Total clicks in the selected range.
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link id |
unit | query | string | minute, hour, day, week or month. Default: day |
units | query | integer | Number 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()){
"unit_reference": "2026-10-07T11:59:00+0530",
"total_clicks": 1280,
"units": 30,
"unit": "day"
}Try it
/links/{link}/countriesClicks by country
Also available: /cities, /devices, /os, /browsers, /referring_domains (same response shape, different "facet"). Visitor IP addresses are never exposed.
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link id |
unit | query | string | minute, hour, day, week or month. Default: day |
units | query | integer | Number 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()){
"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
/groups/{group_guid}/countriesAccount-wide metrics
Same facets as the link endpoints (countries, cities, devices, os, browsers, referring_domains) but aggregated across all your links.
| Parameter | In | Type | Description |
|---|---|---|---|
group_guid required | path | string | Your group id |
unit | query | string | minute, hour, day, week or month. Default: day |
units | query | integer | Number 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()){
"unit_reference": "2026-10-07T11:59:00+0530",
"metrics": [
{
"value": "IN",
"clicks": 5400
}
],
"units": 30,
"unit": "day",
"facet": "countries"
}Try it
/clicks/summaryAccount click total
Total clicks across all your links.
| Parameter | In | Type | Description |
|---|---|---|---|
unit | query | string | minute, hour, day, week or month. Default: day |
units | query | integer | Number 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()){
"unit_reference": "2026-10-07T11:59:00+0530",
"total_clicks": 9100,
"units": 30,
"unit": "day"
}Try it
Tools
/links/{link}/qrQR code
Returns a URL to a PNG QR code for the link. Optional hex colours without #.
| Parameter | In | Type | Description |
|---|---|---|---|
link required | path | string | Link id |
color | query | string | Foreground hex, default 000000 |
background | query | string | Background 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()){
"qr_code": "https://api.qrserver.com/v1/create-qr-code/?size=600x600&data=...",
"link": "https://rdirct.to/aB3dE9x",
"image_format": "png"
}Try it
Account
/userCurrent 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()){
"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
/groupsList 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()){
"groups": [
{
"guid": "G1",
"name": "You",
"is_active": true,
"role": "org-admin",
"domains": [
"rdirct.to"
]
}
]
}