Authentication
Create a key in Dashboard, API. Send it in the Authorization header. The key is only shown once.
Keys belong to the workspace where they were created.
curl https://vyly.link/api/links \
-H "Authorization: Bearer vyly_xxxxxxxxxxxx"
Create a link
Only url is required. All other fields are optional.
curl -X POST https://vyly.link/api/links \
-H "Authorization: Bearer vyly_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/oferta","alias":"oferta","tags":["otoño"]}'
{ "link": { "id": "…", "code": "oferta", "short_url": "https://vyly.link/oferta", "url": "https://example.com/oferta", "clicks": 0 } }
Fields
| Field | Type | Description |
|---|---|---|
url | string | Destination. http or https. |
alias | string | Custom alias. |
title | string | Internal name. |
expires_at | string | ISO expiry date. |
max_clicks | number | Maximum clicks. |
password | string | Link password. |
tags | string[] | List of tags. |
redirect_type | number | 301, 302, 307, or 308. |
List and read
Accepts q (search), tag, campaign, status, page, and limit (maximum 100).
GET /api/links?q=oferta&limit=20
GET /api/links/{id}
Statistics
Returns clicks per day, countries, devices, browsers, and referrers. The range depends on your plan’s retention.
GET /api/analytics?link_id={id}&from=2026-10-01&to=2026-10-31
Limits and errors
Each plan has a requests-per-minute limit. When you exceed it you get 429 with a Retry-After header. Errors return a stable code in the error field.
| Code | Meaning |
|---|---|
| 401 | Missing or invalid key |
| 402 | Your plan does not include this or you reached the limit |
| 403 | The key lacks permission |
| 404 | Not found |
| 409 | The alias is already taken |
| 400 | Invalid data |
| 429 | Too many requests |