neosourceDocs
Search docs

Delete the current browser session

DELETE/api/sessions

deleteSession

Clears the `ns_session` cookie and deletes the backing session record when present.

Requires authentication using a session cookie — see tokens and scopes.

curl

curl -X DELETE 'https://neosource.dev/api/sessions' \
  -b 'ns_session=$NEOSOURCE_SESSION'

fetch

fetch("https://neosource.dev/api/sessions", {
  method: "DELETE",
  credentials: "include",
});

Responses

204Session deleted and cookie cleared

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget