Skip to content
Developer Docs

SwiftURL API.

v1.0.0

The SwiftURL API is a REST API for creating and managing branded short links and deep links from your own code. Authenticate with an API key sent as a bearer token. Every link it creates passes the same checks as the app before it goes live: Google Web Risk, the adult content filter, private IP and shortener-chain blocks and a reachability check, with flags for HTTPS, personal data in URL parameters, domain age and URL validity.

Base URL https://app.swifturl.co
OpenAPI 3.1 spec

Authentication

Send an API key as a bearer token: Authorization: Bearer ql_live_…. Create keys under Settings → API keys; each belongs to one workspace and has read or read and write access. Requests from a signed-in dashboard session also work. API access is included from the Pro plan. Authentication guide

Rate limits

Per-workspace, sliding window. State returned in X-RateLimit-* headers.

  • POSTlinks60 / hr
  • GETlinks600 / hr
  • GETQR codes300 / min
  • DELETElinks60 / hr

Idempotency

POST endpoints accept an Idempotency-Key (UUID v4). Reusing a key within 24h replays the original response with X-Idempotent-Replayed: true.

On this page

Endpoints

Get a link's QR code (link to this section)

GET /api/v1/links/{linkId}/qr

Returns the link's QR code as a PNG or SVG image. The code encodes the short URL plus a ?qr marker, so scans are counted as QR scans in analytics; the marker is never passed on to the destination. On Pro and above the code uses the link's saved colors and your organization's logo; on Free it is the standard black on white code. Needs an API key with read access, or a dashboard session. See QR codes.

Path parameters

  • linkId string required

    The unique ID of the link.

Query parameters

  • format string optional

    png (default) or svg. SVG scales to any size.

  • size integer optional

    PNG width and height in pixels. Min 128, max 2048, default 1024. Values outside the range are clamped.

  • download boolean optional

    1 or true adds a Content-Disposition: attachment header with a file name such as qr-summer24-2048.png.

Responses

  • 200

    The image (image/png or image/svg+xml). X-QR-Content holds the exact URL the code encodes.

  • 401

    Missing or invalid authentication.

  • 403

    The API key does not have the read scope.

  • 404

    Link not found or access denied.

  • 422

    format is not png or svg.

  • 429

    Rate limit exceeded.

Request
GET /api/v1/links/clx1234abcdef/qr?format=png&size=2048&download=1
# Authorization: Bearer ql_live_...
Response200
HTTP/1.1 200 OK
Content-Type: image/png
Content-Disposition: attachment; filename="qr-summer24-2048.png"
X-QR-Content: https://go.acme.com/summer24?qr

<PNG bytes>

Redeem a deferred deep link (link to this section)

POST /api/v1/track/open

Redeems a deferred deep linking token on the app's first launch after a store install, and returns the original link target so the app can route to the right screen. The token is the credential, so no API key is required. Tokens are opaque, single-use, and short-lived (default 1 hour). Recover the token from the Play Install Referrer on Android or the user-initiated clipboard on iOS. See Deferred Deep Linking.

Request body required

Responses

  • 200

    Token redeemed. Returns { "destination", "deepLinkPath", "linkId" } so the app can open the exact target.

  • 404

    Returns { "error": "not_found" } when the token is unknown, expired, or already used (single-use).

Request
POST /api/v1/track/open
# Content-Type: application/json
{
  "token": "<opaque token>"
}

Response 200

{
  "destination": "https://example.com/summer-sale",
  "deepLinkPath": "/products/summer",
  "linkId": "clx1234abcdef"
}

Response 404

{ "error": "not_found" }

Health check (link to this section)

GET /api/health

Returns 200 if the API is reachable. Used by uptime monitors.

Responses

  • 200

    Service is healthy. Returns { "ok": true }.

Request
GET /api/health
Response200
{ "ok": true }

Schemas

ComplianceFinding

  • ruleId string

    e.g. web_risk.

  • ruleName string

    e.g. Google Web Risk.

  • severity enum

    CRITICAL · ERROR · WARNING · INFO

  • passed boolean

    Whether this rule passed.

  • message string

    Human-readable explanation of the finding.

  • hint string

    Actionable guidance for the user (nullable).