Logout from the App
The /logout endpoint securely logs a customer out of the Netevia Banking application. It terminates all active frontend sessions — mobile, web, or otherwise — and invalidates all associated authentication tokens. Once called, no further API access is possible with the previous session tokens until the customer logs back in.
Endpoint
POST /logout
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Call this endpoint when a customer explicitly signs out of your application. It is especially important in shared or public device scenarios, where leaving an active session open could allow unauthorized access. Invoking this endpoint guarantees that all tokens from the current session are invalidated across every frontend surface.
Response
200 OK
A 200 Success response confirms the logout was processed and all sessions have been terminated. No response body is returned.
Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 500 | Internal server error |
Common Mistakes
- Failing to call this endpoint on sign-out and relying solely on token expiry — tokens are valid for 10 minutes, leaving a window of unauthorized access if not explicitly invalidated.
- Not handling a
401response gracefully; if the token has already expired before logout is called, treat the session as effectively ended and redirect the customer to the login screen.
Related Endpoints
POST /api/auth/v2— Obtain a Bearer token by authenticating with username, password, and partnerIdPOST /api/auth/refresh— Refresh an existing Bearer token before it expires
Example
curl -X POST https://api.banking.netevia.dev/logout \
-H "Authorization: Bearer YOUR_TOKEN" 200Success
