Create a link
Publish a new protected link from your server.
POST
/v1/integrations/linksHeaders
| Header | Value | |
|---|---|---|
Authorization | Required | Bearer <token> |
Content-Type | Required | application/json |
Idempotency-Key | Recommended | Lets you retry without creating duplicates. |
Body
| Field | Rules | |
|---|---|---|
titlestring | Required | 10 to 90 characters. Shown to buyers. |
destinationUrlstring | Required | Where buyers go after they unlock. https:// only, no user or password in the URL, up to 2,048 characters. Encrypted and never shown publicly. |
keysRequiredinteger | Default 1 | Price in Keys, 1 to 100. |
campaignKeystring | null | Default null | Lowercase letters and numbers, separated by single hyphens, like instagram-bio. Up to 100 characters. default is reserved. |
timedAccessModestring | Default enabled | enabled or disabled. Your account Timer switch still applies. |
timedAccessSecondsinteger | null | Default null | 60, 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 linkimport os, uuid, requestsresponse = requests.post( 'https://api.keystorm.xyz/v1/integrations/links', json={ 'title': 'Complete texture pack', 'destinationUrl': 'https://example.com/pack.zip', 'keysRequired': 3, 'campaignKey': 'instagram-bio', }, headers={'Authorization': f"Bearer {os.environ['KEYSTORM_API_TOKEN']}", 'Idempotency-Key': str(uuid.uuid4())}, timeout=15,)response.raise_for_status()print(response.json()['data']['url']) # share this linkcurl -s -X POST https://api.keystorm.xyz/v1/integrations/links \ -H "Authorization: Bearer $KEYSTORM_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"title":"Complete texture pack","destinationUrl":"https://example.com/pack.zip","keysRequired":3,"campaignKey":"instagram-bio"}'{ "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" }}