Skip to content

Revoke this session's public share links

DELETE
/api/sessions/{id}/share/
curl --request DELETE \
--url http://localhost:8000/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/share/ \
--header 'Authorization: Bearer <token>'

Withdraws every active public link for the session. The rows are kept, stamped revoked_at, so what was shared stays auditable — and every public reader (the report, its trends, the coaching stream and the link-preview unfurl) then answers 404, not 410: an expired link died on schedule, a revoked one was taken away, and a viewer holding a forwarded URL should not learn which.

Idempotent — nothing left to revoke is still 204. Re-sharing afterwards mints a FRESH token; a revoked link never comes back. Added in #1777: before it, no route revoked a session share and Django admin was the only way back.

id
required
string format: uuid

No response body

Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examples
Example404—NoSuchSessionOnThisTeam

Absent, or owned by another team (collapsed to 404)

{
"detail": "session_not_found"
}