Create branded short links with aliases, expiry, passwords, click limits, and analytics.
Short, branded links for UTM-tagged campaigns you can rotate later.
Print-friendly QR links for menus, events and offline media.
Gate sensitive docs with a simple password — no account required.
POST https://api.yeb.to/v1/short-links/create-basic
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
original_url |
string | yes | Target URL (scheme auto-added if missing) |
alias |
string | opt | Human alias (1–100, [A-Za-z0-9\-_]) |
short_code |
string | opt | Custom short code (else auto 7 chars) |
password |
string | opt | Optional access password |
expires_at |
ISO 8601 | opt | Expiry timestamp |
click_limit |
int | opt | Max total clicks |
one_time |
bool | opt | Allow only a single click |
settings |
array<{key,value}> | opt | Custom metadata |
curl -X POST https://api.yeb.to/v1/short-links/create-basic \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"original_url": "https://example.com/pricing",
"alias": "docs-demo"
}'
{
"data": {
"original_url": "https://example.com/pricing",
"short_code": "AB12CDE",
"alias": "docs-demo",
"public_url": "https://yeb.to/l/docs-demo",
"expires_at": null,
"click_limit": null,
"one_time": false,
"advanced_analytics": false,
"total_clicks": 0,
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-01T12:00:00Z"
}
}
{"error":"original_url is required","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/short-links/create-advanced
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
original_url |
string | yes | Target URL (scheme auto-added if missing) |
alias |
string | opt | Human alias (1–100, [A-Za-z0-9\-_]) |
short_code |
string | opt | Custom short code (else auto 7 chars) |
password |
string | opt | Optional access password |
expires_at |
ISO 8601 | opt | Expiry timestamp |
click_limit |
int | opt | Max total clicks |
one_time |
bool | opt | Allow only a single click |
settings |
array<{key,value}> | opt | Custom metadata |
curl -X POST https://api.yeb.to/v1/short-links/create-advanced \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"original_url": "https://example.com/pricing",
"alias": "docs-demo",
"click_limit": 100,
"expires_at": "2025-12-31T23:59:00Z"
}'
{
"data": {
"original_url": "https://example.com/pricing",
"short_code": "AB12CDE",
"alias": "docs-demo",
"public_url": "https://yeb.to/l/docs-demo",
"expires_at": "2025-12-31T23:59:00Z",
"click_limit": 100,
"one_time": false,
"advanced_analytics": true,
"total_clicks": 0,
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-01T12:00:00Z"
}
}
{"error":"original_url is required","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/short-links/get
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
code |
string | yes | Alias or short_code |
curl -X POST https://api.yeb.to/v1/short-links/get \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"code": "docs-demo"
}'
{
"data": {
"original_url": "https://example.com/pricing",
"short_code": "AB12CDE",
"alias": "docs-demo",
"public_url": "https://yeb.to/l/docs-demo",
"expires_at": null,
"click_limit": null,
"one_time": false,
"advanced_analytics": false,
"total_clicks": 0,
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-01T12:00:00Z"
}
}
{"error":"Short link not found","code":404}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/short-links/update
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
code |
string | yes | Alias or short_code to update |
original_url |
string | opt | New target URL |
alias |
string | opt | New alias |
short_code |
string | opt | New short code |
password |
string | opt | Set password (empty string to clear) |
expires_at |
ISO 8601 | opt | New expiry |
click_limit |
int | opt | New limit |
one_time |
bool | opt | Enable/disable single-use |
advanced_analytics |
bool | opt | Enable/disable advanced analytics |
settings |
array<{key,value}> | opt | Replace settings |
curl -X POST https://api.yeb.to/v1/short-links/update \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"code": "docs-demo",
"click_limit": 100,
"expires_at": "2025-12-31T23:59:00Z"
}'
{
"data": {
"original_url": "https://example.com/pricing",
"short_code": "AB12CDE",
"alias": "docs-demo",
"public_url": "https://yeb.to/l/docs-demo",
"expires_at": "2025-12-31T23:59:00Z",
"click_limit": 100,
"one_time": false,
"advanced_analytics": false,
"total_clicks": 0,
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-10T12:00:00Z"
}
}
{"error":"code is required","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/short-links/delete
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
code |
string | yes | Alias or short_code |
curl -X POST https://api.yeb.to/v1/short-links/delete \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"code": "docs-demo"
}'
{
"data": { "deleted": true, "code": "docs-demo" }
}
{"error":"Short link not found","code":404}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/short-links/stats
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
code |
string | yes | Alias or short_code |
period |
enum | opt | `7d` | `30d` | `90d` (default: `30d`) |
tz |
string | opt | Timezone label (informational) |
limit_recent |
int | opt | Recent clicks to return (0–200, default 20) |
curl -X POST https://api.yeb.to/v1/short-links/stats \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"code": "docs-demo",
"period": "30d",
"limit_recent": 10
}'
{
"data": {
"code": "docs-demo",
"from": "2025-01-01T00:00:00Z",
"to": "2025-01-31T00:00:00Z",
"tz": "UTC",
"summary": {
"total_clicks": 42,
"last_click_at": "2025-01-30T20:05:00Z",
"unique_countries": 8
},
"recent_clicks": [
{"id":123,"ip":"1.2.3.4","user_agent":"...","ts":"2025-01-30T20:05:00Z"}
],
"by_country": [{"key":"US","count":20}],
"by_device": [{"key":"mobile","count":30}],
"by_browser": [{"key":"Chrome","count":25}],
"by_os": [{"key":"Android","count":18}]
}
}
{"error":"code is required","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |