Skip to main content

Create a link

Publish a new protected link from your server.

POST/v1/integrations/links

Headers

HeaderValue
AuthorizationRequiredBearer <token>
Content-TypeRequiredapplication/json
Idempotency-KeyRecommendedLets you retry without creating duplicates.

Body

FieldRules
titlestringRequired10 to 90 characters. Shown to buyers.
destinationUrlstringRequiredWhere buyers go after they unlock. https:// only, no user or password in the URL, up to 2,048 characters. Encrypted and never shown publicly.
keysRequiredintegerDefault 1Price in Keys, 1 to 100.
campaignKeystring | nullDefault nullLowercase letters and numbers, separated by single hyphens, like instagram-bio. Up to 100 characters. default is reserved.
timedAccessModestringDefault enabledenabled or disabled. Your account Timer switch still applies.
timedAccessSecondsinteger | nullDefault null60, 180, 300, 600 or 900 to set this link's free wait, or null to use your account's default wait.

Unknown fields are rejected with 422. Each new link counts toward your daily quota; replays don't.

Response

201 Created with the link object, plus Location (the link's path) and ETag.

import { randomUUID } from 'node:crypto';const response = await fetch('https://api.keystorm.xyz/v1/integrations/links', {  method: 'POST',  headers: {    Authorization: `Bearer ${process.env.KEYSTORM_API_TOKEN}`,    'Content-Type': 'application/json',    'Idempotency-Key': randomUUID(),  },  body: JSON.stringify({    title: 'Complete texture pack',    destinationUrl: 'https://example.com/pack.zip',    keysRequired: 3,    campaignKey: 'instagram-bio',  }),});if (!response.ok) throw new Error(`Request failed: ${response.status}`);const { data } = await response.json();console.log(data.url); // share this link
201 Created
{  "data": {    "id": "48971310-428d-4291-9e52-2d975c885ca0",    "url": "https://keystorm.co/l/k_61tdb_ruab4MZVYO",    "title": "Complete texture pack",    "status": "active",    "version": 1,    "contentId": "a41016a5-afed-4f38-986c-621bdf24cfc4",    "keysRequired": 3,    "campaignKey": "instagram-bio",    "timedAccessMode": "enabled",    "timedAccessSeconds": null,    "timedAccess": { "effectiveEnabled": true },    "createdAt": "2026-10-16T14:40:31.203528Z",    "updatedAt": "2026-10-16T14:40:31.203528Z"  }}