# Link Center

> Dynamic, editable QR codes and short links with scan analytics. A QR encodes a
> stable short URL, so you can change where it points anytime — no reprinting.
> Built for programmatic use: agents can create links, retarget them, pull scan
> stats, and render branded QR images via a REST API.

## Product

- What it is: dynamic QR codes + short links you can edit after printing, with scan analytics.
- Editable forever: the QR encodes a stable short link; change the destination anytime and printed codes keep working — they never expire.
- Smart links (Pro): one link can route each visitor to a different destination via ordered rules (first match wins). Match on device, OS, country, region, language, referrer, or channel; schedule a rule to a time window; or weight 2–5 destinations for A/B split testing — e.g. send iOS to the App Store, Android to Google Play, everyone else to your site, from one printed code.
- Analytics: per-scan date, country, and device; privacy-respecting (hashed IPs, no raw PII; CCPA/CPRA + PIPEDA aligned).
- Pro extras: branded QR codes (logo + brand colors + dot/eye shapes), reusable branding presets, custom short links, team sharing, 12-month history, and the REST API below.
- Who it's for: anyone printing QR codes on signage, packaging, menus, or cards — and developers/agents that need QR codes programmatically.

## Pricing

- Pay-as-you-go with credits — no subscription. Every account starts with 5 free credits; each link/QR CREATE costs 1 credit. Reads, list, stats, and QR rendering are free.
- Credit packs (one-time, credits never expire): Starter $9 → 25, Growth $29 → 120, Scale $99 → 500.
- All features (branded QR codes, custom links, routing, analytics, API/MCP) are included on every account.
- Machine-readable: https://mylink.center/pricing.md

## API

- Base URL: https://mylink.center/api/v1
- Auth: send `Authorization: Bearer <key>`. Keys are created at https://mylink.center/settings/api-keys (any account).
- Cost: creating a link costs 1 credit; out of credits returns HTTP 402 `insufficient_credits`. Reads are free.
- OpenAPI spec: https://mylink.center/api/openapi.json
- Errors: JSON `{ "error": { "code", "message" } }` with a matching HTTP status; branch on `code`.

### Endpoints
- `POST /api/v1/links` — create a link. Body: `{ "destinationUrl": "https://…" }` (only field required; `name` defaults to the host). Pro: `slug`, `logoUrl`, `style`, `brandingTemplateId`. Omit branding fields to inherit the account's default branding (if set); pass `"logoUrl": null` for no logo. Optional expiry: `expiresIn` ("30d") or `expiresAt` (ISO) + `expiredBehavior` (show_expired_page | redirect_fallback | gone) + `expiredRedirectUrl`. Pro: `password` (hashed server-side, never returned — responses expose only `passwordProtected`), custom social previews via `ogMode` (none | custom) + `ogTitle`/`ogDescription`/`ogImageUrl`, and `rules` (routing: an ordered array evaluated first-match-wins, each `{ destination, conditions:[{field,operator,values}], name? }` — route by country/device/os/language/referrer). Returns the link incl. `shortUrl` and QR image URLs.
- `GET /api/v1/links` — list links.
- `GET|PATCH|DELETE /api/v1/links/{id}` — fetch, update (retarget the destination, edit branding), or delete. The slug is immutable.
- `GET /api/v1/links/{id}/stats` — 30-day scan analytics (daily series + country/device breakdowns).
- `GET /api/v1/links/{id}/qr?format=png|svg` — the link's styled QR image.
- `GET|POST /api/v1/branding-templates` and `GET|PATCH|DELETE /api/v1/branding-templates/{id}` — reusable QR branding presets (logo + colors + shapes). Apply one with `brandingTemplateId` on a link.
- `POST /api/v1/qr` — render an ad-hoc QR for any value without creating a link.

### Quick start
```
curl -X POST https://mylink.center/api/v1/links \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl":"https://example.com"}'
```

## MCP server

For agents that speak the Model Context Protocol (Claude, ChatGPT Developer mode, Cursor):

- Endpoint (Streamable HTTP): https://mylink.center/api/mcp
- Auth: `Authorization: Bearer <key>` — the same Pro API key as the REST API.
- Tools: `create_link`, `list_links`, `get_link`, `update_link`, `delete_link`, `get_link_stats`, `get_link_qr`, `render_qr`, `route_by_device`, `list_utm_templates`, `apply_utm_template`, `list_branding_templates`, `apply_branding`.
- Add it as a remote/custom MCP server with the URL above and your key as the bearer token.

## Docs
- Features (smart link routing, A/B testing, branded QR, analytics): https://mylink.center/features
- Pricing: https://mylink.center/pricing
- Developer docs: https://mylink.center/developers
- API catalog (RFC 9727): https://mylink.center/.well-known/api-catalog
