API Documentation

Complete reference for the Lynk API Platform. Base URL: https://api.lynk.run

Authentication

Authenticate your requests using your API key. You can pass it in two ways:

Option 1: Bearer Token (recommended)

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lynk.run/bgp/v1/asn/13335

Option 2: URL Parameter

bash
curl "https://api.lynk.run/bgp/v1/asn/13335?key=YOUR_API_KEY"

Public Access

You can also make unauthenticated requests using the public key openusage, limited to 5 requests per day per IP address.

bash
curl "https://api.lynk.run/bgp/v1/asn/13335?key=openusage"
BGP ASN Lookup API1 token

Look up BGP routing data for any ASN. Returns upstreams, peers, customers with IPv4/IPv6 breakdown, powered by CAIDA data.

Endpoint

GET /bgp/v1/asn/:asn

Parameters

ParameterTypeDescription
asnintegerThe Autonomous System Number to look up (1–4294967295)

Example Request

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lynk.run/bgp/v1/asn/13335

Example Response

json
{
  "asn": 13335,
  "name": "CLOUDFLARENET",
  "description": "Cloudflare, Inc.",
  "country": "US",
  "upstreams": {
    "ipv4": [
      { "asn": 174, "name": "COGENT-174", "description": "Cogent Communications" }
    ],
    "ipv6": [
      { "asn": 6939, "name": "HURRICANE", "description": "Hurricane Electric LLC" }
    ]
  },
  "peers": { "ipv4": [...], "ipv6": [...] },
  "customers": { "ipv4": [...], "ipv6": [...] },
  "upstream_count": { "ipv4": 3, "ipv6": 4 },
  "peer_count": { "ipv4": 12, "ipv6": 10 },
  "customer_count": { "ipv4": 45, "ipv6": 38 },
  "queried_at": "2026-03-03T10:00:00Z",
  "source": "CAIDA AS Relationships",
  "provider": "local-caida"
}
Blog Publish APIAuth Required

Publish blog posts programmatically. Used by OpenClaw to create and publish content directly to the Lynk blog. Subscribers can optionally be notified.

Endpoint

POST /api/blog/publish

Request Body

FieldTypeRequiredDescription
authKeystringYesNOTIFY_SECRET environment variable
slugstringYesURL slug (e.g. "my-blog-post")
titlestringYesBlog post title
contentstringYesHTML content of the blog post
descriptionstringNoMeta description for SEO
excerptstringNoShort preview text
tagstringNoCategory tag (e.g. "Infrastructure", "AI")
tagClassstringNoCSS class for tag styling (e.g. "infra", "ai")
readTimestringNoEstimated read time (e.g. "5 min read")
authorstringNoAuthor name (default: "Lynk Team")
notifybooleanNoSend email notification to all subscribers

Example Request

bash
curl -X POST https://api.lynk.run/api/blog/publish \
  -H "Content-Type: application/json" \
  -d '{
    "authKey": "YOUR_NOTIFY_SECRET",
    "slug": "why-bgp-security-matters",
    "title": "Why BGP Security Matters in 2026",
    "description": "A deep dive into BGP hijacking and route leak prevention.",
    "excerpt": "BGP remains one of the most critical yet vulnerable protocols...",
    "content": "<h2>Introduction</h2><p>BGP is the backbone of internet routing...</p>",
    "tag": "Infrastructure",
    "tagClass": "infra",
    "readTime": "6 min read",
    "author": "Lynk Team",
    "notify": true
  }'

OpenClaw Prompt

Use the following prompt with OpenClaw to create and publish blog posts automatically:

prompt
Du bist ein Content-Autor für den Lynk Blog (lynk.run/blog). Deine Aufgabe ist es,
einen hochwertigen Blogartikel zu schreiben und über die Lynk API zu veröffentlichen.

REGELN:
- Schreibe professionelle, technische Artikel auf Englisch
- Der Content muss valides HTML sein (h2, h3, p, ul, li, code, pre, strong, em)
- Keine <h1> Tags (wird automatisch vom Template gesetzt)
- Slug muss URL-safe sein (lowercase, hyphens, keine Sonderzeichen)
- Tag-Optionen: "Infrastructure", "AI", "Cybersecurity", "Business", "Tech"
- TagClass-Optionen: "infra", "ai", "security", "business", "tech"

VERÖFFENTLICHUNG:
Sende einen POST Request an https://api.lynk.run/api/blog/publish mit folgendem JSON Body:
{
  "authKey": "<NOTIFY_SECRET>",
  "slug": "<url-safe-slug>",
  "title": "<Titel des Artikels>",
  "description": "<Meta-Description für SEO, max 160 Zeichen>",
  "excerpt": "<Kurze Vorschau, 1-2 Sätze>",
  "content": "<HTML Content des Artikels>",
  "tag": "<Kategorie>",
  "tagClass": "<CSS Klasse>",
  "readTime": "<X min read>",
  "author": "Lynk Team",
  "notify": true
}

Nach erfolgreicher Veröffentlichung ist der Artikel live unter: https://lynk.run/blog/<slug>
Wenn "notify": true gesetzt ist, werden alle Subscriber per E-Mail benachrichtigt.
File Sharing APIAuth Required

Upload files (up to 500 MB), get shareable download links, and optionally protect them with a password or send the link via email. Download links are public and don't require authentication.

Upload a File

POST /api/files

Form Fields (multipart/form-data)

FieldTypeRequiredDescription
filefileYesThe file to upload (max 500 MB)
passwordstringNoPassword to protect the download link
emailstringNoEmail address to send the download link to
expires_in_daysstringNoNumber of days until expiry, or "evergreen" for permanent (default: evergreen)

Example: Upload with curl

bash
curl -X POST https://api.lynk.run/api/files \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@report.pdf" \
  -F "password=secret123" \
  -F "email=recipient@example.com" \
  -F "expires_in_days=30"

Response

json
{
  "success": true,
  "id": "a1b2c3d4e5f6...",
  "url": "https://lynk.run/dl/a1b2c3d4e5f6..."
}

List Your Files

GET /api/files

Example

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lynk.run/api/files

Response

json
[
  {
    "id": "a1b2c3d4e5f6...",
    "original_name": "report.pdf",
    "size": 2457600,
    "mime_type": "application/pdf",
    "has_password": true,
    "download_count": 5,
    "created_at": "2026-03-22 10:30:00",
    "expires_at": "2026-04-21 10:30:00",
    "download_url": "https://lynk.run/dl/a1b2c3d4e5f6..."
  }
]

Delete a File

DELETE /api/files/:id

Example

bash
curl -X DELETE -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lynk.run/api/files/a1b2c3d4e5f6...

Download (Public)

GET https://lynk.run/dl/:id

Download links are public — no API key required. If the file is password-protected, a password form is shown in the browser. For programmatic access, POST the password:

bash
# Password-protected download via curl
curl -X POST https://lynk.run/dl/a1b2c3d4e5f6... \
  -d "password=secret123" \
  -o report.pdf
Rate Limits & Error Codes
CodeDescription
200Success
401Invalid API key
402Insufficient tokens
403Invalid auth key (blog publish)
429Rate limit exceeded (public access: 5/day)

Lynk — A Link11 Initiative