# Leave Shared Thread

Removes the caller's persistent join of a live-shared thread (created via [Join Shared Thread](/api-reference/shared-threads/join-shared-thread)), so it stops appearing in their `GET /v1/threads` list.

The operation is **idempotent** — leaving a thread you never joined (or already left) still returns `204`. Requires the same resolution gates as opening the link (active org member; explicit grant for `explicit` links; not revoked or expired).

## Authentication

Requires **user** authentication (Bearer token). API-key authentication is rejected with `403`.

## Path Parameters

**`slug`** string required

The share-link slug, taken from the share URL.

## Body Parameters

None. The request takes no body.

## Returns

`204 No Content` on success. No response body.

## Code Examples

### cURL


```bash
curl -X DELETE https://api.aitronos.com/v1/shared-threads/abc123slug/join \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Python SDK


```python
from aitronos import Aitronos

client = Aitronos(api_key="", token="YOUR_TOKEN")
client.threads.shared.leave(slug="abc123slug")
```

### Python (requests)


```python
import requests

response = requests.delete(
    "https://api.aitronos.com/v1/shared-threads/abc123slug/join",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(response.status_code)  # 204
```

### JavaScript


```javascript
await fetch("https://api.aitronos.com/v1/shared-threads/abc123slug/join", {
  method: "DELETE",
  headers: { Authorization: "Bearer YOUR_TOKEN" },
});
```

## Response Examples

### Success (204)

No response body.

### Error — Link not found or not authorized (404)

A former member of the organization who held a claim on this link gets `details.unavailable_reason: "org_access_lost"` instead. See [When a link stops working](/api-reference/shared-threads/get-shared-thread#when-a-link-stops-working). Everyone else gets this uniform body.


```json
{
  "success": false,
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "The requested resource could not be found.",
    "system_message": "Share link not found",
    "type": "client_error",
    "status": 404,
    "details": {},
    "trace_id": "...",
    "timestamp": "..."
  }
}
```

## Related Resources

- [Join Shared Thread](/api-reference/shared-threads/join-shared-thread) — Create the persistent joined entry
- [Get Shared Thread](/api-reference/shared-threads/get-shared-thread) — Open the share link
- [Live Shared Thread](/api-reference/shared-threads/live-shared-thread) — Join the real-time co-working stream