Add JSON format support to session destroy for native API clients

This is so that native API clients can get the session record deleted
server-side. They still need to take care of clearing any cookies
they've set in web views.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-01-27 19:21:22 +01:00
committed by Rosa Gutierrez
parent ec1b8f2fed
commit c059e0b216
4 changed files with 52 additions and 1 deletions
+16
View File
@@ -118,6 +118,22 @@ __Error responses:__
| `401 Unauthorized` | Invalid `pending_authentication_token` or `code` |
| `429 Too Many Requests` | Rate limit exceeded |
#### Delete server-side session (_log out_)
To log out and destroy the server-side session:
```bash
curl -X DELETE \
-H "Accept: application/json" \
-H "Cookie: session_token=eyJfcmFpbHMi..." \
https://app.fizzy.do/session
```
__Response:__
Returns `204 No Content` on success.
## Caching
Most endpoints return [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag) and [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control) headers. You can use these to avoid re-downloading unchanged data.