If you manage Short.io links as part of a software delivery process, it’s often easier to treat them like configuration: keep them in Git, review changes in pull requests, and let CI apply updates automatically. link-sync-action does exactly that—define links in shortio.yaml, then sync them to Short.io through a GitHub Actions workflow.
This post covers two separate developer tools:
link-sync-action— sync links from ashortio.yamlfile into Short.io
https://github.com/Short-io/link-sync-action@short.io/client-node(new version) — improved method names, client-side validation, and handling for 429 rate limits
https://github.com/Short-io/client-node
1) Treat links like config: link-sync-action
link-sync-action is “GitOps for short links.” You declare what links should exist, and CI makes Short.io match that.
It performs an actual sync:
- creates missing links
- updates existing ones
- deletes links that are no longer in the config
So your repo becomes the source of truth.
The config: shortio.yaml
A minimal example:
domain: "short.example.com"
links:
docs:
url: "https://documentation.example.com/v2"
title: "Documentation"
tags:
- docs
- public
api:
url: "https://api.example.com"
title: "API Reference"If you manage multiple domains in one repo, the action supports that too (via YAML document streams separated by ---).
Wire it into GitHub Actions
Add your Short.io API key as a repository secret (commonly SHORTIO_API_KEY), then create a workflow like this:
name: Sync Short Links
on:
push:
branches: [main]
paths:
- "shortio.yaml"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shortio/link-sync-action@v1
with:
api_key: ${{ secrets.SHORTIO_API_KEY }}A simple way to run this in real life:
- On pull requests: run with
dry_run: trueto preview what would change - On
main: run the actual sync
2) Node.js integrations: the new @short.io/client-node
Separately from the GitHub Action, the updated Node SDK is for developers who manage Short.io links from code—services, scripts, migrations, CLIs, internal tooling.
The new version focuses on three practical improvements.
Human-readable method names
The API surface now reads like what you’re doing. Example:
import { setApiKey, createLink } from "@short.io/client-node";
setApiKey(process.env.SHORT_IO_API_KEY);
const result = await createLink({
body: {
originalURL: "https://example.com/very-long-url",
domain: "your-domain.com",
path: "custom-path",
title: "My Link",
},
});
console.log(result.data.shortURL);Client-side parameter validation
If you send invalid parameters, you find out immediately—before the HTTP request. This is especially useful in bulk operations and generated payloads, where a single bad object can waste time and clutter logs.
Ability to handle 429 (rate limit) errors
Batch jobs and sync scripts tend to be the first place you hit rate limits. The SDK can handle HTTP 429 responses with configurable retry + backoff so your job doesn’t die halfway through.
Example:
import { setApiKey, enableRateLimiting, createLink } from "@short.io/client-node";
setApiKey(process.env.SHORT_IO_API_KEY);
// Retry on 429 with configurable backoff
enableRateLimiting({ maxRetries: 5, baseDelayMs: 1000, maxDelayMs: 60000 });
await createLink({
body: { originalURL: "https://example.com", domain: "your-domain.com" },
});Links
link-sync-action: https://github.com/Short-io/link-sync-action@short.io/client-node: https://github.com/Short-io/client-node