Skip to main content
POST
Set agent session retention

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Path Parameters

id
string
required
Required string length: 1 - 54

Body

application/json
events_retained_until
integer
required

Unix timestamp (seconds)

Required range: x >= 0
filesystem_retained_until
integer
required

Unix timestamp (seconds)

Required range: x >= 0
filesystem_pinned
boolean
required
retention_reason
enum<string>
required
Available options:
SESSION_ACTIVE,
PINNED,
POLICY,
TERMINAL_GRACE,
MANUAL_DELETE

Response

Agent session retention updated

id
string
required
Required string length: 1 - 54
workspace_id
string
required
Required string length: 1 - 53
organization_id
string | null
required
Required string length: 1 - 54
agent_id
string
required
Required string length: 1 - 54
state
enum<string>
required
Available options:
ACTIVE,
WAITING_FOR_INPUT,
WAITING_FOR_PERMISSION,
COMPLETED,
FAILED,
CANCELLED,
ARCHIVED
origin
enum<string>
required
Available options:
DASHBOARD,
API,
MCP,
ACP,
AMBIENT,
SYSTEM
title
string | null
required
communication_profile
enum<string>
required
Available options:
BEGINNER,
INTERMEDIATE,
ADVANCED,
EXPERT,
ADAPTIVE
created_by
string
required
parent_session_id
string | null
required
Required string length: 1 - 54
forked_from_session_id
string | null
required
Required string length: 1 - 54
spawned_by_turn_id
string | null
required
Required string length: 1 - 54
agent_role
string | null
required
current_sandbox_id
string | null
required
Required string length: 1 - 54
last_event_cursor
string | null
required
events_retained_until
integer
required

Unix timestamp (seconds)

Required range: x >= 0
filesystem_retained_until
integer
required

Unix timestamp (seconds)

Required range: x >= 0
filesystem_pinned
boolean
required
usage_summary
object
required
created_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
updated_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
etag
string
required