Allow or withdraw MITHUNAI support access
Turn MITHUNAI support access on or off. It is off until you turn it on, and withdrawing it ends every live session at once.
PUT
/
support-access
curl --request PUT "$MITHUNAI_URL/mithunai/api/v1/support-access" \
--header "Authorization: Bearer $MITHUNAI_API_KEY" \
--header "Content-Type: application/json" \
--data '{"allowed": true}'
import os
import requests
response = requests.put(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/support-access",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
json={"allowed": False},
timeout=30,
)
response.raise_for_status()
# Withdrawing ended every live session; `active` is empty.
print(response.json()["active"])
// From your backend. Never send an API key to a browser.
const response = await fetch(`${process.env.MITHUNAI_URL}/mithunai/api/v1/support-access`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ allowed: true }),
})
console.log((await response.json()).allowed)
{
"allowed": false,
"active": [],
"history": [
{
"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": "validation_error", "message": "'allowed' is required." }
{ "code": "authorization_error", "message": "You are not allowed to perform this action." }
Turn support access on or off. Requires the owner or administrator role.
It is off by default, and stays off until someone with that role turns it on. A control whose default is “yes” is not a control, so this one starts at no.
Withdrawing ends every live session immediately, rather than letting the sessions run to their expiry. Turning this off is revoking access, not declining to renew it. Consent is re-read on every request a session makes, so a session that is already open stops on its next call.
The response is the same shape as Read support access, so your interface re-renders from the result rather than from what it assumed would happen.
boolean
required
Whether MITHUNAI support may open a session against your organisation.
Response
boolean
required
The value after the change.
object[]
required
Sessions inside the organisation right now. Empty after withdrawing access, because withdrawing
ends them.
object[]
required
Recent sessions, live and finished, newest first.
curl --request PUT "$MITHUNAI_URL/mithunai/api/v1/support-access" \
--header "Authorization: Bearer $MITHUNAI_API_KEY" \
--header "Content-Type: application/json" \
--data '{"allowed": true}'
import os
import requests
response = requests.put(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/support-access",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
json={"allowed": False},
timeout=30,
)
response.raise_for_status()
# Withdrawing ended every live session; `active` is empty.
print(response.json()["active"])
// From your backend. Never send an API key to a browser.
const response = await fetch(`${process.env.MITHUNAI_URL}/mithunai/api/v1/support-access`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ allowed: true }),
})
console.log((await response.json()).allowed)
{
"allowed": false,
"active": [],
"history": [
{
"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": "validation_error", "message": "'allowed' is required." }
{ "code": "authorization_error", "message": "You are not allowed to perform this action." }
Last modified on November 7, 2026
curl --request PUT "$MITHUNAI_URL/mithunai/api/v1/support-access" \
--header "Authorization: Bearer $MITHUNAI_API_KEY" \
--header "Content-Type: application/json" \
--data '{"allowed": true}'
import os
import requests
response = requests.put(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/support-access",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
json={"allowed": False},
timeout=30,
)
response.raise_for_status()
# Withdrawing ended every live session; `active` is empty.
print(response.json()["active"])
// From your backend. Never send an API key to a browser.
const response = await fetch(`${process.env.MITHUNAI_URL}/mithunai/api/v1/support-access`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ allowed: true }),
})
console.log((await response.json()).allowed)
{
"allowed": false,
"active": [],
"history": [
{
"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": "validation_error", "message": "'allowed' is required." }
{ "code": "authorization_error", "message": "You are not allowed to perform this action." }