The via.deals API
Shorten links programmatically with a single POST — no account or token required. Powered by deals.group.
Create a short link
POST https://via.deals/api/links — no authentication required.
Request body (JSON)
- url — the destination URL (required, http/https, safety-checked).
- domain — optional short domain (defaults to
via.deals). - jsRedirect — optional boolean (default
false). Whentrue, the link serves a styled page that shows the destination, then redirects after a small delay instead of instantly.
Response
The short URL is returned at shortUrl:
{ "shortUrl": "https://via.deals/ab12cd", "slug": "ab12cd" }
Example (cURL)
curl -X POST "https://via.deals/api/links" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/very/long/path","domain":"via.deals","jsRedirect":false}'
# -> { "shortUrl": "https://via.deals/ab12cd", "slug": "ab12cd" }
Errors: 400 invalid URL / unknown domain · 409 alias taken ·
422 destination flagged unsafe.
Import into Deals.Group
Add via.deals as a shortener in the Deals.Group Affiliate Engine extension.
In the extension: Shorteners → Import (or paste into a new shortener),
then drop in a preset below. The extension's Shorten step will then route links through via.deals.
It reads the short link from responsePath: "shortUrl".
Instant redirect — links forward straight to the destination.
{
"dg": "1.0",
"type": "shortener",
"name": "ViaDeals Free",
"exportedAt": 1781193488778,
"data": {
"bodyTemplate": "{\"url\":\"{{url_json}}\",\"domain\":\"via.deals\"}",
"enabled": true,
"endpoint": "https://via.deals/api/links",
"headers": {
"Content-Type": "application/json"
},
"id": "default_via_deals",
"isDefault": true,
"method": "POST",
"name": "ViaDeals Free",
"presetId": "via-deals",
"priority": 10,
"responsePath": "shortUrl",
"token": ""
}
}
Sets jsRedirect: true — links show a brief page with the destination
and an affiliate-disclosure note before forwarding.
{
"dg": "1.0",
"type": "shortener",
"name": "ViaDeals Redirect Page",
"exportedAt": 1781193488778,
"data": {
"bodyTemplate": "{\"url\":\"{{url_json}}\",\"domain\":\"via.deals\",\"jsRedirect\":true}",
"enabled": true,
"endpoint": "https://via.deals/api/links",
"headers": {
"Content-Type": "application/json"
},
"id": "via_deals_redirect",
"isDefault": false,
"method": "POST",
"name": "ViaDeals Redirect Page",
"presetId": "via-deals-redirect",
"priority": 10,
"responsePath": "shortUrl",
"token": ""
}
}
{{url_json}} is a Deals.Group token — the extension replaces it with the converted URL at runtime.