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

# Delete Session

> Terminate an active session

### Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer neyrs_live_abc123def456`
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  Session ID. Format: `session_<16 chars>`
</ParamField>

### Response

<ResponseField name="sessionId" type="string">
  Terminated session identifier
</ResponseField>

<ResponseField name="status" type="string">
  Session status after termination: `terminated`
</ResponseField>

<ResponseField name="terminatedAt" type="string">
  ISO 8601 timestamp of termination
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url https://api.neyrs.cloud/v1/sessions/session_abc123def456 \
    --header 'Authorization: Bearer neyrs_live_abc123def456'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.neyrs.cloud/v1/sessions/session_abc123def456',
    {
      method: 'DELETE',
      headers: {
        'Authorization': `Bearer ${process.env.NEYRS_API_KEY}`
      }
    }
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://api.neyrs.cloud/v1/sessions/session_abc123def456',
      headers={
          'Authorization': f'Bearer {api_key}'
      }
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "sessionId": "session_abc123def456",
    "status": "terminated",
    "terminatedAt": "2024-03-08T16:00:00Z"
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": {
      "code": "session_not_found",
      "message": "Session not found or already terminated"
    }
  }
  ```
</ResponseExample>
