Skip to main content
LinkLynx
All posts

Read your LinkLynx page from your own code

A hands-on guide to the LinkLynx Developer API. Create a token, read your page, rows and cards, then change a card with one PATCH request.

Rafael Valle5 min read

Your LinkLynx page is data. Rows, cards, titles, links. The Developer API lets your own code read that data, and change it when you let it.

This post walks through the whole loop. You will create a token, read your page, rows and cards, and then change one card. Every request below runs against the live API.

The API is in beta, so details can still change before 1.0. It is included with Premium and Studio.

Before you start

You need three things.

  • A LinkLynx page on Premium or Studio.
  • A token. Open the editor, choose Features, then Developer API, and create one. Copy it right away. It is shown once.
  • Something to send requests with. I use curl and Node.js below. Any HTTP client works.

Tokens start with llk_. Give yours the read scope for the first three steps. For the last step you need the write scope too. Pick only what your code needs, and treat the token like a password.

Put it in an environment variable so it never lands in your source:

bash
export LINKLYNX_TOKEN="llk_..."

One detail that saves an hour of debugging. Always use www.linklynx.bio. The bare domain redirects, and many clients drop the Authorization header when they follow a redirect.

Step 1: read your page

GET /api/v1/page returns the basics of your page.

bash
curl https://www.linklynx.bio/api/v1/page \
  -H "Authorization: Bearer $LINKLYNX_TOKEN"

Every response wraps its result in a data field. For your page, data holds your name, username, bio, avatar_url, plan and public_url. If you get an error instead, the body always has the same shape: an error object with a code and a message.

Step 2: list your rows

Your page is a set of rows, and each row holds cards. GET /api/v1/rows returns your rows in display order, with a card count for each.

bash
curl https://www.linklynx.bio/api/v1/rows \
  -H "Authorization: Bearer $LINKLYNX_TOKEN"

Each row has an id, a title, an order, a card_count and an updated_at. Keep the id values. You will want them to filter cards.

Step 3: list your cards

GET /api/v1/cards returns your cards in display order. Add row_id to get the cards of one row.

bash
curl "https://www.linklynx.bio/api/v1/cards?row_id=ROW_ID" \
  -H "Authorization: Bearer $LINKLYNX_TOKEN"

Each card has an id, a row_id, a title, a subtitle, an href, a kind (link or email), a thumbnail, a video, an order, a pinned flag and a status. Scheduled drops are included here, with the status scheduled. Visitors do not see them until their time.

Here it is in Node.js. This script prints every card with its status:

javascript
const BASE = "https://www.linklynx.bio/api/v1";

async function api(path, options = {}) {
  const res = await fetch(`${BASE}${path}`, {
    ...options,
    headers: {
      Authorization: `Bearer ${process.env.LINKLYNX_TOKEN}`,
      "Content-Type": "application/json",
    },
  });
  const body = await res.json();
  if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
  return body.data;
}

const cards = await api("/cards");
for (const card of cards) {
  console.log(`${card.status.padEnd(10)} ${card.title}  ${card.href}`);
}

Save it as cards.mjs and run node cards.mjs. The same api helper is used in the next step.

Step 4: change a card

Now the write. PATCH /api/v1/cards/{id} changes a card. Send only the fields you want to change. You can edit title, subtitle, href, thumbnail_url, pinned, scheduled_at and row_id.

This token needs the write scope. Create a new one in the editor if yours is read only.

Here I rename a card and schedule it for the first of December:

bash
curl -X PATCH https://www.linklynx.bio/api/v1/cards/CARD_ID \
  -H "Authorization: Bearer $LINKLYNX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title": "Spring collection (new)", "scheduled_at": "2026-12-01T09:00:00Z", "pinned": true}'

The response is the updated card. A future scheduled_at hides the card from visitors until that time. Set it to null and the card goes live right away.

Or from Node.js, reusing the helper above:

javascript
const updated = await api("/cards/CARD_ID", {
  method: "PATCH",
  body: JSON.stringify({ subtitle: "Out now" }),
});
console.log(updated.title, updated.updated_at);

Writes follow the same rules as the editor. Your plan limits apply, titles are capped at 50 characters, and images are copied into LinkLynx storage. Every change goes in an audit log.

Rate limits and errors

Each token gets 60 requests per minute. Past that you get a 429 with a Retry-After header. Wait that many seconds and try again.

Other errors you might meet:

  • invalid_token, token_expired or token_revoked: the token is wrong, old, or revoked in the editor.
  • insufficient_scope: the token can read but you tried to write.
  • plan_required: the page is no longer on Premium or Studio. Your tokens are kept and work again when the plan is back.
  • invalid_body: a field is unknown or out of range. The message names it.

What to build

A few ideas that fit in an afternoon.

  • A script that lists the cards you scheduled, so you can see what is about to go live.
  • A cron job that swaps a card title when your newsletter goes out.
  • A small tool that moves cards between rows from a spreadsheet.

The full reference, with every endpoint and field, is on the developers page. The OpenAPI spec is there too, so you can generate a client in your language of choice.

If you would rather have an AI assistant do this for you, that works too. Connect it to the LinkLynx MCP server, set up on the developers page.

Rafael