List links
Page through your links, newest first.
GET
/v1/integrations/linksReturns your links, newest first, including the ones made in the dashboard.
Query parameters
| Parameter | Rules | |
|---|---|---|
limitinteger | Default 50 | 1 to 100 links per page. |
statusstring | Optional | active or revoked. |
campaignKeystring | Optional | Only links with this campaign. Use none for links without one. |
cursorstring | Optional | The nextCursor from the previous page. |
Pagination
When pagination.hasMore is true, request the next page with cursor set to pagination.nextCursor and the same filters. A cursor expires after one hour; an expired cursor or changed filters return 400 INVALID_CURSOR, so start again from the first page. Links created after you fetched the first page appear in your next listing.
const auth = { Authorization: `Bearer ${process.env.KEYSTORM_API_TOKEN}` };let cursor = null;do { const url = new URL('https://api.keystorm.xyz/v1/integrations/links'); url.searchParams.set('limit', '100'); url.searchParams.set('status', 'active'); if (cursor) url.searchParams.set('cursor', cursor); const response = await fetch(url, { headers: auth }); if (!response.ok) throw new Error(`List failed: ${response.status}`); const { data, pagination } = await response.json(); for (const link of data) console.log(link.url, link.title); cursor = pagination.nextCursor;} while (cursor);import os, requestsauth = {'Authorization': f"Bearer {os.environ['KEYSTORM_API_TOKEN']}"}params = {'limit': 100, 'status': 'active'}while True: response = requests.get('https://api.keystorm.xyz/v1/integrations/links', params=params, headers=auth, timeout=15) response.raise_for_status() page = response.json() for link in page['data']: print(link['url'], link['title']) if not page['pagination']['nextCursor']: break params['cursor'] = page['pagination']['nextCursor']# First pagecurl -s "https://api.keystorm.xyz/v1/integrations/links?limit=100&status=active" \ -H "Authorization: Bearer $KEYSTORM_API_TOKEN"# Next page: same filters plus the nextCursor you receivedcurl -s "https://api.keystorm.xyz/v1/integrations/links?limit=100&status=active&cursor=NEXT_CURSOR" \ -H "Authorization: Bearer $KEYSTORM_API_TOKEN"{ "data": [ { "id": "48971310-428d-4291-9e52-2d975c885ca0", "url": "https://keystorm.co/l/k_61tdb_ruab4MZVYO", "title": "Complete texture pack", "status": "active", "...": "..." } ], "pagination": { "hasMore": true, "nextCursor": "eyJ2ZXJzaW9uIjoxLC..." }}No ETag in lists
To edit or revoke a link from a list, read it first with GET /v1/integrations/links/:link to get its ETag.