Sessions
Delete Session
Permanently delete a session and all its data
DELETE
Delete Session
Delete a conversation session and all associated data including messages, archives, and usage records.
Request
Path Parameters
The session ID to delete
Headers
Your OpenViking API key for authentication
Response
Response status (
ok or error)Request processing time in seconds
Examples
Response Example
What Gets Deleted
Deleting a session removes:- Active messages - Current conversation messages
- Message archives - All
history/archive_N/directories - Tool records - Tool execution data in
tools/ - Session metadata -
.abstract.md,.overview.md,.meta.json - Relations - Links to contexts and skills used
Deleting a session does NOT delete:
- Extracted memories (stored in
user/memories/andagent/memories/) - Resources referenced during the session
- Skills used in the session
Use Cases
Clean Up Old Sessions
Delete After Commit
If you want to keep only memories and discard conversation history:Batch Delete
Safe Delete with Confirmation
Error Responses
Session Not Found
Insufficient Permissions
Best Practices
Always Commit Before Deleting
Extract memories before deletion:Check Session Content First
Implement Soft Delete
Instead of immediate deletion, mark sessions as deleted:Related Endpoints
- Create Session - Create a new session
- List Sessions - List all sessions
- Get Session - Get session details
- Commit Session - Archive and extract memories before deletion
Delete Session
