End one live MITHUNAI support session
Stop one support session while leaving support access on. It takes effect on that session’s next request; another organisation’s session is 404.
DELETE
/
support-access
/
sessions
/
{session_id}
curl --request DELETE \
"$MITHUNAI_URL/mithunai/api/v1/support-access/sessions/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os
import requests
session_id = "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
response = requests.delete(
f"{os.environ['MITHUNAI_URL']}/mithunai/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"])
// 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}/mithunai/api/v1/support-access/sessions/${sessionId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
console.log((await response.json()).end)
{
"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"
}
{ "code": "authorization_error", "message": "You are not allowed to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
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 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.
string
required
The session’s id (UUID), as returned in
active[].id.Response
string
required
The session id.
string
required
The staff member’s name, captured when the session opened.
string
required
The staff member’s email, captured when the session opened.
string
required
The reason they gave for opening it.
string
required
When the session opened, ISO 8601 in UTC.
string
required
When the session would have expired, ISO 8601 in UTC.
string | null
required
Why it stopped.
revoked when you ended it.curl --request DELETE \
"$MITHUNAI_URL/mithunai/api/v1/support-access/sessions/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os
import requests
session_id = "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
response = requests.delete(
f"{os.environ['MITHUNAI_URL']}/mithunai/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"])
// 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}/mithunai/api/v1/support-access/sessions/${sessionId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
console.log((await response.json()).end)
{
"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"
}
{ "code": "authorization_error", "message": "You are not allowed to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
Last modified on November 7, 2026
curl --request DELETE \
"$MITHUNAI_URL/mithunai/api/v1/support-access/sessions/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os
import requests
session_id = "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
response = requests.delete(
f"{os.environ['MITHUNAI_URL']}/mithunai/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"])
// 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}/mithunai/api/v1/support-access/sessions/${sessionId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
console.log((await response.json()).end)
{
"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"
}
{ "code": "authorization_error", "message": "You are not allowed to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }