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

# End one live MITHUNAI support session

> Stop a single support session while leaving support access on. It takes effect on that session's next request; a session in another organisation answers 404.

End one support session. Requires the owner or administrator role.

Use this to stop a single session while leaving support access on. To stop every session and prevent new ones, set `allowed` to `false` with [Allow or withdraw support access](/api-reference/support-access/set-support-access) instead.

It takes effect on the session's **next request**. The staff member is not signed out of anything of their own; what ends is the authority that session carried into your organisation.

A session in another organisation answers `404`, identically to a session id that does not exist. This is deliberate: it is not a way to confirm that support is inside somebody else.

The response is the ended session rather than `204`, so you can read its `end` without a second request. It stays in `history` on [Read support access](/api-reference/support-access/get-support-access).

<ParamField path="session_id" type="string" required>
  The session's id (UUID), as returned in `active[].id`.
</ParamField>

## Response

<ResponseField name="id" type="string" required>
  The session id.
</ResponseField>

<ResponseField name="staff_name" type="string" required>
  The staff member's name, captured when the session opened.
</ResponseField>

<ResponseField name="staff_email" type="string" required>
  The staff member's email, captured when the session opened.
</ResponseField>

<ResponseField name="reason" type="string" required>
  The reason they gave for opening it.
</ResponseField>

<ResponseField name="started_at" type="string" required>
  When the session opened, ISO 8601 in UTC.
</ResponseField>

<ResponseField name="expires_at" type="string" required>
  When the session would have expired, ISO 8601 in UTC.
</ResponseField>

<ResponseField name="end" type="string | null" required>
  Why it stopped. `revoked` when you ended it.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --request DELETE \
    "$MITHUNAI_URL/arukz/api/v1/support-access/sessions/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
    --header "Authorization: Bearer $MITHUNAI_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os

  import requests

  session_id = "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
  response = requests.delete(
      f"{os.environ['MITHUNAI_URL']}/arukz/api/v1/support-access/sessions/{session_id}",
      headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
      timeout=30,
  )
  response.raise_for_status()
  print(response.json()["end"])
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // From your backend. Never send an API key to a browser.
  const sessionId = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
  const response = await fetch(
    `${process.env.MITHUNAI_URL}/arukz/api/v1/support-access/sessions/${sessionId}`,
    {
      method: 'DELETE',
      headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
    },
  )
  console.log((await response.json()).end)
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "staff_name": "Priya Raman",
    "staff_email": "priya.raman@mithunai.com",
    "reason": "Ticket 4821: ingestion reports success but the assistant abstains",
    "started_at": "2026-09-26T09:14:02.118374+00:00",
    "expires_at": "2026-09-26T10:14:02.118374+00:00",
    "end": "revoked"
  }
  ```

  ```json 403 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authorization_error", "message": "You are not allowed to perform this action." }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "not_found", "message": "The requested resource was not found." }
  ```
</ResponseExample>
