linkrunway.

Quickstart

Connect LinkRunway in three places: a client SDK captures consented attribution, your backend reports trusted business events, and your workspace shows the result. An MCP assistant can help with setup; it does not replace these runtime integrations.

Before you begin

Create a workspace at app.linkrunway.com. Complete email verification and any required two-step verification. In Developers, create a publishable key for your client and a separate server key for your backend. Store the full keys securely when they are shown.

Use https://api.linkrunway.com as the hosted API base URL. A branded short-link domain is not automatically your API endpoint. Use the API endpoint provided by your workspace configuration if different.

Connect the client

Install the versioned package in the SDK directory. For JavaScript:

ts
import { LinkRunway } from '@linkrunway/sdk';

const runway = new LinkRunway({
  endpoint: 'https://api.linkrunway.com',
  apiKey: 'lr_pk_your_publishable_key',
  consent: false,
});

// Run only after your consent flow has granted permission.
runway.setConsent(true);
runway.capture(window.location.href);
const eventId = crypto.randomUUID();
const result = await runway.track({ eventId, type: 'OPEN' });

A successful SDK call may mean delivered, queued, or skipped. Inspect its result and confirm the event in the workspace. Preserve a stable event ID when retrying the same action. Call setConsent(false) when consent is withdrawn.

Connect your backend

After authenticating the user, send the captured attribution token to your backend through your own authenticated request. Derive the customer ID from your server session. Do not accept a client-supplied amount as proof of payment.

sh
# Set LINKRUNWAY_SERVER_KEY in your server's secret manager.
curl --fail-with-body https://api.linkrunway.com/v1/track \
  -H "Authorization: Bearer $LINKRUNWAY_SERVER_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"eventId":"signup_example_001","type":"SIGNUP","externalUserId":"customer_example_001","consent":true}'

The example intentionally sends no click token and may be unattributed. Add the actual signed clickToken from the consented client journey when available. A server event with the same stable ID can be retried without creating a second event. Read events and revenue before sending payments.

Verify a real journey

Create a link, open it in an ordinary browser, complete your app's consent flow, and send a unique test event. Find that event in the same workspace. Check attributed, the link, and the customer association separately: successful ingestion does not guarantee attribution.

Use a dedicated test workspace and non-financial CUSTOM events for initial checks. Complete the integration checklist before enabling live revenue.

Next steps