Skip to content

Developer Overview

The programmatic surface of lnkify provides several interfaces for building integrations:

InterfaceEndpointPurpose
GraphQL APIPOST /graphqlFull CRUD, auth, analytics — single endpoint
HTTP Routes/ (various)Slug redirects, QR codes, bio pages, AI discovery
MCP ServerStreamable HTTPAI agent tools for shortlink management
CLIlnkify (npm)Manage links from the terminal; wraps the GraphQL API

GraphQL API

The primary API. All queries and mutations go through a single endpoint. Authenticate with a JWT or API key. Full schema introspection available in development.

  • Base URL: https://lnkify.io/graphql
  • Content-Type: application/json
  • Auth header: Authorization: Bearer <token> or x-api-key: lf_live_<key>
  • Sections: Overview · Queries · Mutations · Types · Examples

HTTP Routes

Lightweight endpoints that don't require GraphQL:

  • GET /<slug> — 302 redirect to the target URL, with optional click tracking
  • GET /<slug>/qr.svg — QR code for a shortlink (svg or png)
  • GET /bio/<slug> — public link-in-bio page
  • GET /llms.txt — AI agent discovery file listing MCP tools and endpoints
  • GET /llms-full.txt — Expanded reference with full tool schemas

MCP Server

Streamable HTTP Model Context Protocol server for AI agents:

  • Base URL: https://mcp.lnkify.io/
  • Supports the same tools as the GraphQL API via JSON-RPC
  • Auth: same headers as GraphQL, same identity resolution

CLI

A branded command-line tool that wraps the GraphQL API:

  • Install: npm install -g lnkify
  • Manage links, domains, API keys, and analytics from the terminal
  • Local-first, with profiles for remote servers and a --json mode for scripting
  • Can also run as a local MCP server (lnkify mcp serve)
  • Sections: Overview · Installation · Authentication · Commands · Examples

Released under the MIT License.