> ## Documentation Index
> Fetch the complete documentation index at: https://hub.hcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unshare a session

> Revoke a session's public share link.

Revokes the public share link created by [Share](/agents-api/sessions/share). The session is no longer accessible without authentication.

**Returns** `204 No Content`.

***

## Path parameters

<ParamField path="id" type="string" required>
  The session ID.
</ParamField>

***

## Examples

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X DELETE https://agp.eu.hcompany.ai/api/v2/sessions/$SESSION_ID/share \
    -H "Authorization: Bearer $HAI_API_KEY"
  ```

  ```python Python theme={"system"}
  from hai_agents import Client

  client = Client()

  client.sessions.unshare_session(session_id)
  ```

  ```typescript TypeScript theme={"system"}
  import { HaiAgentsClient } from "hai-agents";

  const client = new HaiAgentsClient();

  await client.sessions.unshareSession({ id: sessionId });
  ```
</CodeGroup>
