API Reference
FixedLink API v1
Create and manage short links from your own code. REST over JSON, with a published OpenAPI spec you can generate clients from.
Authentication
Every request carries an API key as a bearer token. Create one in Settings, under API. You can hold several, one per integration, so revoking one does not break the others. A key is shown once when it is created and cannot be retrieved afterwards. API access requires a plan that includes it.
curl https://fixed.link/api/v1/links \
-H "Authorization: Bearer YOUR_KEY"Errors
Failures return a consistent shape with an HTTP status that matches the problem.
{
"error": {
"code": "LIMIT_REACHED",
"message": "You've reached the 25 links limit on the Free plan."
}
}- 403
- Missing, invalid, revoked or rate-limited API key
- 402
- Plan limit reached, or the feature needs an upgrade
- 404
- The resource does not exist, or is not yours
- 409
- Slug already taken
- 422
- The request body failed validation
Endpoints
All paths are relative to https://fixed.link/api/v1.
- get
/linksList links
Parameters
- pagequery
- perPagequery
- searchquery
- statusquery
- tagquery
- categoryquery
- domainIdquery
- sortByquery
- sortOrderquery
- post
/linksCreate a link
- get
/links/{id}Get a link
Parameters
- idpath
- patch
/links/{id}Update a link
Parameters
- idpath
- delete
/links/{id}Delete a link
Soft delete - analytics history is retained.
Parameters
- idpath
- get
/links/{id}/analyticsGet link analytics
Ranges beyond the plan's retention window are clamped.
Parameters
- idpath
- rangequery
- get
/links/{id}/metadataGet a link's metadata and preview
Returns what we read from the destination page, your overrides, and the preview a crawler is served. The fetch runs in the background, so a link created moments ago may still be `pending`.
Parameters
- idpath
- patch
/links/{id}/metadataSet a link's preview
Send null for a field to clear the override and fall back to the destination page's own tag.
Parameters
- idpath
- post
/links/{id}/metadata/refreshRe-read the destination page
Queues a fetch and returns immediately. Poll GET /links/{id}/metadata for the result.
Parameters
- idpath
- get
/links/{id}/monitorGet a link's monitor
The destination is checked every 15 minutes. `state` is "unknown" until the first check completes, and an outage is only declared after two consecutive failures. 404 when the link has never been monitored.
Parameters
- idpath
- put
/links/{id}/monitorStart or stop watching a destination
Switching on queues an immediate check. Switching off keeps the history, so switching back on does not report a clean record.
Parameters
- idpath
- get
/links/{id}/qrDownload the link's QR code
Encodes the short URL rather than the destination, so printed artwork keeps working after the destination changes.
Parameters
- idpath
- formatquery
- sizequery
- marginquery
- darkquery
- lightquery
- get
/links/{id}/rulesList routing rules
Returned in evaluation order. The first rule whose conditions all match decides where the visitor goes; if none match, the link's own destination is used.
Parameters
- idpath
- post
/links/{id}/rulesAdd a routing rule
Appended to the end of the list, so it cannot outrank an existing rule.
Parameters
- idpath
- patch
/links/{id}/rules/{ruleId}Update a routing rule
Parameters
- idpath
- ruleIdpath
- delete
/links/{id}/rules/{ruleId}Delete a routing rule
Parameters
- idpath
- ruleIdpath
- get
/domainsList custom domains
Use it from an assistant
The same operations are available over the Model Context Protocol, so an assistant can make links, read their analytics and set routing rules for you instead of telling you how. Same key, same plan, same rate limit.
claude mcp add --transport http fixedlink https://fixed.link/api/mcp \
--header "Authorization: Bearer YOUR_KEY"A hosted assistant that cannot be handed a key can register itself and ask you for access instead. You approve it once, on a screen that names the app and what it will be able to do.