Revoke a link
Take a link offline for new buyers and keep its history.
POST
/v1/integrations/links/:link/revokeTakes the link offline for new buyers. Its sales history and statistics are kept. Revoking can't be undone through the API.
| Header | Value | |
|---|---|---|
Authorization | Required | Bearer <token> |
If-Match | Required | The ETag from your last read. |
Idempotency-Key | Optional | Lets you retry safely. |
No body is needed. If you send one, it must be {} with Content-Type: application/json.
const link = 'https://api.keystorm.xyz/v1/integrations/links/k_61tdb_ruab4MZVYO';const auth = { Authorization: `Bearer ${process.env.KEYSTORM_API_TOKEN}` };const current = await fetch(link, { headers: auth });const response = await fetch(`${link}/revoke`, { method: 'POST', headers: { ...auth, 'If-Match': current.headers.get('etag') },});if (!response.ok) throw new Error(`Revoke failed: ${response.status}`);import os, requestslink = 'https://api.keystorm.xyz/v1/integrations/links/k_61tdb_ruab4MZVYO'auth = {'Authorization': f"Bearer {os.environ['KEYSTORM_API_TOKEN']}"}current = requests.get(link, headers=auth, timeout=15)response = requests.post( link + '/revoke', headers={**auth, 'If-Match': current.headers['ETag']}, timeout=15,)response.raise_for_status()LINK=https://api.keystorm.xyz/v1/integrations/links/k_61tdb_ruab4MZVYOETAG=$(curl -s -D - -o /dev/null $LINK \ -H "Authorization: Bearer $KEYSTORM_API_TOKEN" | grep -i '^etag:' | cut -d' ' -f2 | tr -d '\r')curl -s -X POST $LINK/revoke \ -H "Authorization: Bearer $KEYSTORM_API_TOKEN" \ -H "If-Match: $ETAG"200 OK with the link, now "status": "revoked". Revoking a link that is already revoked also returns 200.