Skip to content
Select themeSelect language

PUT /workspaces/{id}/memory-reflection — arm (create/re-activate the scheduled reflection task under the `memory-reflector` profile, created on first arm) or disarm (pause the schedule). Workspace admin.

PUT
/api/workspaces/{id}/memory-reflection
curl --request PUT \
--url https://example.com/api/workspaces/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/memory-reflection \
--header 'Content-Type: application/json' \
--cookie supacloud_session=<supacloud_session> \
--data '{ "agent_type": "example", "cadence": "example", "enabled": true, "timezone": "example" }'
id
required
string format: uuid

Workspace ID

Media typeapplication/json

The arm/disarm request.

object
agent_type

The harness the reflector runs on (claude, codex, …). Required on the FIRST arm (it becomes the profile’s agent type); ignored afterwards.

string | null
cadence

daily | weekly | monthly; absent = keep the stored one on a re-arm (weekly on first arm).

string | null
enabled
required

true arms (creates/re-activates the schedule, creating the reflector profile on first arm); false pauses the schedule.

boolean
timezone
string | null
Examplegenerated
{
"agent_type": "example",
"cadence": "example",
"enabled": true,
"timezone": "example"
}

Reflection-task arm state after the change

Media typeapplication/json

What the settings surface reads.

object
agent_type
string | null
cadence
string | null
enabled
required

An ACTIVE schedule exists.

boolean
last_run_at
string | null format: date-time
last_task_id
string | null format: uuid
next_run_at
string | null format: date-time
profile_id
string | null format: uuid
schedule_id
string | null format: uuid
timezone
string | null
Examplegenerated
{
"agent_type": "example",
"cadence": "example",
"enabled": true,
"last_run_at": "2026-04-15T12:00:00Z",
"last_task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"next_run_at": "2026-04-15T12:00:00Z",
"profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"schedule_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"timezone": "example"
}

Invalid cadence, or agent_type missing on the first arm

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Workspace not found

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}