End your session
Session · DELETE /v1/sessions/current · MCP tool logout
Ends the session you send with this call. Sessions also expire on their own. Only a session can be ended this way, so an access token is refused.
Roles that can call it: viewer, builder, deployer.
Parameters
This operation takes no parameters.
Returns
A JSON object with these keys: ended, login, guarantee, caller_authenticated.
Example request
curl -X DELETE https://api.tarsana.io/v1/sessions/current \
-H "X-Tarsana-Session: $SESSION"
Example response
{
"ended": true,
"login": "you@example.com",
"guarantee": "namespaces are separated, callers are not authenticated",
"caller_authenticated": false
}
Errors
| Code | HTTP | What it means |
|---|---|---|
unauthenticated | 401 | Your request has no credential, or one that Tarsana does not recognise. Sign in with login, or send a valid access token. |
forbidden | 403 | Your role does not allow this operation. The response names the roles that do; ask for a credential with one of them. |
rate_limited | 429 | You sent too many requests in a short time. Wait for the number of seconds in retry_after_seconds, then try again. |
surface_fault | 500 | Something went wrong on our side. Try again later, and contact Tarsana support if it keeps happening. |