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 needs a bearer token. Find yours in Settings, under API. API access requires a plan that includes it.

curl https://fixedlink.dev/api/v1/links \
  -H "Authorization: Bearer YOUR_TOKEN"

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 or invalid API token
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://fixedlink.dev/api/v1.

  • get/links

    List links

    Parameters

    • pagequery
    • perPagequery
    • searchquery
    • statusquery
    • tagquery
    • domainIdquery
    • sortByquery
    • sortOrderquery
  • post/links

    Create 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}/analytics

    Get link analytics

    Ranges beyond the plan's retention window are clamped.

    Parameters

    • idpath
    • rangequery
  • get/links/{id}/metadata

    Get 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}/metadata

    Set 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/refresh

    Re-read the destination page

    Queues a fetch and returns immediately. Poll GET /links/{id}/metadata for the result.

    Parameters

    • idpath
  • get/links/{id}/qr

    Download the link's QR code

    Encodes the short URL, not the destination — so printed artwork keeps working after the destination changes.

    Parameters

    • idpath
    • formatquery
    • sizequery
    • marginquery
    • darkquery
    • lightquery
  • get/links/{id}/rules

    List 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}/rules

    Add 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/domains

    List custom domains