# Revoke a share link

Revoke a music share link. After revocation, new resolves and saves fail — but recipients who already saved the track keep their copy. The operation is idempotent.

Revoking a link you do not own returns `404`. Revoking an already-revoked link is a no-op.

## Path parameters

**`organization_id`** string required

The organization the share is scoped to. The caller must belong to it.

**`share_id`** string required

The share link id to revoke (`mslink_`-prefixed).

## Returns

A confirmation object.

**`success`** boolean · `true` when the link was revoked.

**`id`** string · The revoked share link id.

**`detail`** string · Human-readable confirmation message.

Example

```bash cURL
curl -X DELETE "https://api.aitronos.com/v1/music/org_abc123/share/mslink_3a7f2c9e8b14" \
  -H "X-API-Key: $FREDDY_API_KEY"
```


```python Python SDK
from aitronos import Aitronos  # pip install aitronos-sdk

client = Aitronos(api_key="your-api-key")

result = client.delete("/v1/music/org_abc123/share/mslink_3a7f2c9e8b14")
print(result["detail"])
```


```python Python
import os
import requests

api_key = os.environ["FREDDY_API_KEY"]

response = requests.delete(
    "https://api.aitronos.com/v1/music/org_abc123/share/mslink_3a7f2c9e8b14",
    headers={"X-API-Key": api_key},
)
print(response.json()["detail"])
```


```javascript JavaScript
const apiKey = process.env.FREDDY_API_KEY;

const response = await fetch(
  'https://api.aitronos.com/v1/music/org_abc123/share/mslink_3a7f2c9e8b14',
  { method: 'DELETE', headers: { 'X-API-Key': apiKey } }
);

const result = await response.json();
console.log(result.detail);
```

**Response:**


```json 200 OK
{
  "success": true,
  "id": "mslink_3a7f2c9e8b14",
  "detail": "Share link revoked."
}
```

Errors

```json 401 Unauthorized
{
  "success": false,
  "error": {
    "code": "AUTHENTICATION_REQUIRED",
    "message": "Authentication required. Please provide a valid API key.",
    "system_message": "Missing or invalid authorization header",
    "type": "authentication_error",
    "status": 401,
    "details": {},
    "trace_id": "req_abc123xyz",
    "timestamp": "2026-06-28T10:30:00Z"
  }
}
```


```json 404 Not Found
{
  "success": false,
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "The requested resource was not found.",
    "system_message": "Share link not found or not owned by caller",
    "type": "client_error",
    "status": 404,
    "details": { "share_id": "mslink_3a7f2c9e8b14" },
    "trace_id": "req_jkl012mno",
    "timestamp": "2026-06-28T10:30:00Z"
  }
}
```

## Related Resources

- [Share a track](/docs/api-reference/music/share-track)
- [Share a collection](/docs/api-reference/music/share-collection)
- [Open a shared link](/docs/api-reference/music/resolve-share)