{"openapi":"3.1.0","info":{"title":"Devboxes API","description":"First-class devbox abstraction over instances and snapshots","version":"1.0.0"},"paths":{"/api/devboxes":{"get":{"tags":["Devboxes - Core"],"summary":"List Devboxes","description":"List devboxes with timeline count only (lightweight for frontend)","operationId":"list_devboxes_api_devboxes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional sort order. Supported: last_interacted_desc.","title":"Sort"},"description":"Optional sort order. Supported: last_interacted_desc."},{"name":"interacted_only","in":"query","required":false,"schema":{"type":"boolean","description":"When true, only return devboxes with last_interacted state.","default":false,"title":"Interacted Only"},"description":"When true, only return devboxes with last_interacted state."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"description":"Optional limit on returned devboxes.","title":"Limit"},"description":"Optional limit on returned devboxes."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/detailed":{"get":{"tags":["Devboxes - Core"],"summary":"List Devboxes Detailed","description":"List devboxes with full timeline data (for debugging/admin)","operationId":"list_devboxes_detailed_api_devboxes_detailed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxDetailListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/devboxes/{devbox_id}":{"get":{"tags":["Devboxes - Core"],"summary":"Get Devbox","description":"Get specific devbox with full timeline","operationId":"get_devbox_api_devboxes__devbox_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Devboxes - Lifecycle"],"summary":"Delete Devbox","description":"Delete devbox quickly and schedule background cleanup for snapshots + timeline.","operationId":"delete_devbox_api_devboxes__devbox_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/summary":{"get":{"tags":["Devboxes - Core"],"summary":"Get Devbox Summary","description":"Get specific devbox lightweight summary (last event + count)","operationId":"get_devbox_summary_api_devboxes__devbox_id__summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/recent/seed":{"post":{"tags":["Devboxes - Core"],"summary":"Seed Recent Devboxes (Migration Helper)","description":"Best-effort endpoint to seed per-user recent devboxes ordering from legacy client state (e.g., localStorage).","operationId":"seed_recent_devboxes_api_devboxes_recent_seed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedRecentDevboxesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedRecentDevboxesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/devboxes/{devbox_id}/ephemeral/commit":{"post":{"tags":["Devboxes - Lifecycle"],"summary":"Commit Ephemeral Devbox","description":"Clear the wizard/ephemeral TTL on a devbox to make it persistent (idempotent).","operationId":"commit_ephemeral_devbox_api_devboxes__devbox_id__ephemeral_commit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/template":{"get":{"tags":["Devboxes - Actions"],"summary":"Get Template Link For Devbox","description":"Returns template_id linkage and shared alias (if any) for a devbox","operationId":"get_devbox_template_link_api_devboxes__devbox_id__template_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxTemplateLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/http":{"post":{"tags":["Devboxes - Actions"],"summary":"Expose HTTP Service","description":"Expose a local port as an HTTP service; returns the updated devbox","operationId":"expose_http_service_on_devbox_api_devboxes__devbox_id__http_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpExposeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/http/{name}":{"delete":{"tags":["Devboxes - Actions"],"summary":"Unexpose HTTP Service","description":"Remove an exposed HTTP service; returns the updated devbox","operationId":"unexpose_http_service_on_devbox_api_devboxes__devbox_id__http__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/display_name":{"patch":{"tags":["Devboxes - Actions"],"summary":"Update Devbox Display Name","description":"Update server-preferred display_name and mirror into metadata.webUIName","operationId":"update_devbox_display_name_api_devboxes__devbox_id__display_name_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayNameUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/save":{"post":{"tags":["Devboxes - Actions"],"summary":"Save Devbox","description":"Save devbox state (create snapshot and timeline entry)","operationId":"save_devbox_api_devboxes__devbox_id__save_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/branch":{"post":{"tags":["Devboxes - Actions"],"summary":"Branch Devbox","description":"Create branch (new devbox) from current state","operationId":"branch_devbox_api_devboxes__devbox_id__branch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/pause":{"post":{"tags":["Devboxes - Actions"],"summary":"Pause Devbox","description":"Pause a running devbox","operationId":"pause_devbox_api_devboxes__devbox_id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/resume":{"post":{"tags":["Devboxes - Actions"],"summary":"Resume Devbox","description":"Resume a paused devbox","operationId":"resume_devbox_api_devboxes__devbox_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/reboot":{"post":{"tags":["Devboxes - Actions"],"summary":"Reboot Devbox","description":"Reboot devbox","operationId":"reboot_devbox_api_devboxes__devbox_id__reboot_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/wake-on":{"post":{"tags":["Devboxes - Actions"],"summary":"Update Devbox Wake-On","description":"Enable/disable wake-on-SSH and/or wake-on-HTTP; returns the updated devbox.","operationId":"update_devbox_wake_on_api_devboxes__devbox_id__wake_on_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WakeOnUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/sleep-policy":{"post":{"tags":["Devboxes - Actions"],"summary":"Update Devbox Auto-Sleep Policy","description":"Toggle auto-sleep for a devbox. When never_sleep=true, clears TTL. Otherwise, sets the default idle TTL (pause).","operationId":"update_devbox_sleep_policy_api_devboxes__devbox_id__sleep_policy_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxSleepPolicyUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/touch":{"post":{"tags":["Devboxes - Actions"],"summary":"Touch Devbox Activity (Refresh Idle TTL)","description":"Refresh the idle TTL sliding window for a devbox (pause after default idle period). No-op when never_sleep is enabled or the devbox is manually paused.","operationId":"touch_devbox_activity_api_devboxes__devbox_id__touch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxTouchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/sessions":{"get":{"tags":["Tmux"],"summary":"List Tmux Sessions","description":"List tmux sessions for this devbox; returns empty list if tmux is not installed or no server is running","operationId":"list_tmux_sessions_api_devboxes__devbox_id__tmux_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}},{"name":"socket","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"tmux socket name/path if non-default","title":"Socket"},"description":"tmux socket name/path if non-default"},{"name":"strict","in":"query","required":false,"schema":{"type":"boolean","description":"If true, propagate transport errors (5xx). If false, return an empty list and set x-tmux-unavailable=true.","default":false,"title":"Strict"},"description":"If true, propagate transport errors (5xx). If false, return an empty list and set x-tmux-unavailable=true."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxSessionsList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Tmux"],"summary":"Tmux New Session","description":"Create a new detached tmux session","operationId":"tmux_new_session_api_devboxes__devbox_id__tmux_sessions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxNewSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxNewSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/default-session":{"post":{"tags":["Tmux"],"summary":"Set Default Tmux Session","description":"Set the Default Tmux Session on this devbox","operationId":"tmux_set_default_session_api_devboxes__devbox_id__tmux_default_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxSetDefaultSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/install":{"post":{"tags":["Tmux"],"summary":"Tmux Install","description":"Ensure tmux is installed (idempotent)","operationId":"tmux_install_api_devboxes__devbox_id__tmux_install_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxInstallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/sessions/{target}/rename":{"patch":{"tags":["Tmux"],"summary":"Tmux Rename Session","description":"Rename a tmux session by id ($N) or by name","operationId":"tmux_rename_session_api_devboxes__devbox_id__tmux_sessions__target__rename_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}},{"name":"target","in":"path","required":true,"schema":{"type":"string","title":"Target"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxNewSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/sessions/{target}":{"delete":{"tags":["Tmux"],"summary":"Tmux Kill Session","description":"Kill a tmux session by id ($N) or by name","operationId":"tmux_kill_session_api_devboxes__devbox_id__tmux_sessions__target__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}},{"name":"target","in":"path","required":true,"schema":{"type":"string","title":"Target"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/send-keys":{"post":{"tags":["Tmux"],"summary":"Tmux Send Keys","description":"Send keystrokes to a pane (supports named sequence and literal mode)","operationId":"tmux_send_keys_api_devboxes__devbox_id__tmux_send_keys_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxSendKeysRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxSendKeysResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/paste":{"post":{"tags":["Tmux"],"summary":"Tmux Paste","description":"Paste bytes into a pane using tmux buffers, preserving whitespace; optionally sends Enter","operationId":"tmux_paste_api_devboxes__devbox_id__tmux_paste_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxPasteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxPasteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/panes/{pane_id}/snapshot":{"get":{"tags":["Tmux"],"summary":"Tmux Snapshot","description":"Capture live terminal content and scrollback from a pane","operationId":"tmux_snapshot_api_devboxes__devbox_id__tmux_panes__pane_id__snapshot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}},{"name":"pane_id","in":"path","required":true,"schema":{"type":"string","title":"Pane Id"}},{"name":"lines","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of lines to fetch (default 200, max 2000)","default":200,"title":"Lines"},"description":"Number of lines to fetch (default 200, max 2000)"},{"name":"ansi","in":"query","required":false,"schema":{"type":"boolean","description":"Preserve ANSI sequences if supported","default":false,"title":"Ansi"},"description":"Preserve ANSI sequences if supported"},{"name":"socket","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"tmux socket name/path if non-default","title":"Socket"},"description":"tmux socket name/path if non-default"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/tmux/debug":{"get":{"tags":["Tmux"],"summary":"Tmux Debug Info","description":"Gather tmux-related environment info and current sessions","operationId":"tmux_debug_info_api_devboxes__devbox_id__tmux_debug_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmuxDebugInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/uploads":{"post":{"tags":["Uploads"],"summary":"Upload File to Devbox","description":"Authenticated file upload to a devbox. Saves to /tmp (default /tmp/codex-uploads) and returns the absolute file path. Frontend can paste this path into the terminal.","operationId":"upload_file_to_devbox_api_devboxes__devbox_id__uploads_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}},{"name":"dest_dir","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Destination directory (must be under /tmp); defaults to /tmp/codex-uploads","title":"Dest Dir"},"description":"Destination directory (must be under /tmp); defaults to /tmp/codex-uploads"},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional preferred filename (basename only)","title":"Filename"},"description":"Optional preferred filename (basename only)"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_to_devbox_api_devboxes__devbox_id__uploads_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/uploads/image":{"post":{"tags":["Uploads"],"summary":"Upload Image to Devbox","description":"Image-specialized upload that enforces image/* content type and saves to /tmp/codex-uploads.","operationId":"upload_image_to_devbox_api_devboxes__devbox_id__uploads_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_image_to_devbox_api_devboxes__devbox_id__uploads_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/preview":{"post":{"tags":["Templates"],"summary":"Preview Template","operationId":"preview_template_api_templates_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplatePreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplatePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/templates":{"get":{"tags":["Templates"],"summary":"List Templates","operationId":"list_templates_api_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Templates"],"summary":"Create Template","operationId":"create_template_api_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/templates/aliases/{alias}/publish":{"post":{"tags":["Templates"],"summary":"Publish Alias Revision","operationId":"publish_alias_revision_api_templates_aliases__alias__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alias","in":"path","required":true,"schema":{"type":"string","title":"Alias"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAliasPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAliasBuildResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/aliases/{alias}/refresh":{"post":{"tags":["Templates"],"summary":"Refresh Published Alias","operationId":"refresh_alias_revision_api_templates_aliases__alias__refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alias","in":"path","required":true,"schema":{"type":"string","title":"Alias"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TemplateAliasRefreshRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAliasBuildResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/by-hash/{content_hash}":{"get":{"tags":["Templates"],"summary":"Find Template by Hash","description":"Find a template by its content_hash (sha256 of YAML).\nEnables deduplication without listing all templates.\n\nReturns 404 if no template with this hash exists in user's account.","operationId":"get_template_by_hash_api_templates_by_hash__content_hash__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_hash","in":"path","required":true,"schema":{"type":"string","title":"Content Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}":{"get":{"tags":["Templates"],"summary":"Get Template","description":"Owner-first template detail.\n\n- If the caller owns the template, return full detail.\n- If not owned and the template is shared (alias exists), return viewer-safe detail (same as /shared/{id}).\n- Otherwise 404.","operationId":"get_template_api_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Templates"],"summary":"Update Template","operationId":"update_template_api_templates__template_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Templates"],"summary":"Delete Template","description":"Delete a template and all associated route aliases.","operationId":"delete_template_api_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/shared/{template_id}":{"get":{"tags":["Templates"],"summary":"Get Shared Template (Read-only)","description":"Return template detail for a shared template (viewer-safe).\n\n- Requires the template to be shared (present in aliases DB)\n- Fetches the owner row without requiring the caller to be the owner\n- Read-only: does not expose any mutable controls","operationId":"get_shared_template_api_templates_shared__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}/cache":{"post":{"tags":["Templates"],"summary":"Start/Resume Build","operationId":"cache_template_api_templates__template_id__cache_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TemplateCacheRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCacheStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Templates"],"summary":"Cancel Build","description":"Cancel a running build operation. Keeps partial progress.","operationId":"cancel_template_caching_api_templates__template_id__cache_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}/events":{"get":{"tags":["Templates"],"summary":"Stream Building Events (SSE)","description":"Stream template build events over SSE.\n\nNew callers should set `force` on `POST /api/templates/{template_id}/cache`.\nThe `force=true` query parameter remains available as a legacy fallback and\nis latched the first time a run is attached, so reconnects cannot change the\nexecution mode mid-run.\n\nEmits a stable `base_selected` event once per connection with:\n- `snapshotId`: the base snapshot actually used for this run (template base or per-run override)\n- `source`: `template` | `override`","operationId":"template_events_api_templates__template_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"run_id","in":"query","required":true,"schema":{"type":"string","description":"Build run id returned by POST /api/templates/{template_id}/cache","title":"Run Id"},"description":"Build run id returned by POST /api/templates/{template_id}/cache"},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Legacy fallback: if true and the run has no stored force mode yet, bypass blessed/private snapshot caches and rebuild all non-secret steps.","default":false,"title":"Force"},"description":"Legacy fallback: if true and the run has no stored force mode yet, bypass blessed/private snapshot caches and rebuild all non-secret steps."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}/cache/{run_id}/secrets":{"post":{"tags":["Templates"],"summary":"Submit Secret During Build","description":"Submit secrets during an active build (for awaiting-input steps)","operationId":"submit_build_secret_api_templates__template_id__cache__run_id__secrets_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Secrets"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}/share":{"post":{"tags":["Templates"],"summary":"Share (Short URL)","operationId":"share_template_api_templates__template_id__share_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}/instant-devbox":{"post":{"tags":["Templates"],"summary":"Instant Start from Template","description":"Create a devbox instantly from a template, honoring secret and non-secret flows.\n\n- Secretful: requires prior per-user final; verifies HMAC binding before launch.\n- Non-secret: launches from owner's final snapshot (template must be ready).","operationId":"instant_start_from_template_api_templates__template_id__instant_devbox_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InstantStartRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{template_id}/instant-devbox/availability":{"get":{"tags":["Templates"],"summary":"Check Instant Start Availability","description":"Lightweight preflight to decide whether to show the Instant Devbox button.\n\n- Non-secret: available if template is ready.\n- Secretful: available if per-user final exists and HMAC verifies.","operationId":"instant_start_availability_api_templates__template_id__instant_devbox_availability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantStartAvailability"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"tags":["Notifications"],"summary":"List notifications","operationId":"list_notifications_api_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Devbox Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"unseen","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unseen"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Notifications"],"summary":"Create notification","description":"Create a notification (idempotent when dedupe_key is set). Agent tokens require explicit scope.","operationId":"create_notification_api_notifications_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotification"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/summary":{"get":{"tags":["Notifications"],"summary":"Get unseen notification summary","description":"Returns unseen counts + latest timestamp per devbox for lightweight badge rendering.","operationId":"get_unseen_summary_api_notifications_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/seen":{"post":{"tags":["Notifications"],"summary":"Mark devbox notifications seen","description":"Marks all unseen open notifications for a devbox as seen.","operationId":"mark_devbox_seen_api_notifications_seen_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationSeenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationSeenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/devboxes/notifications/summary":{"post":{"tags":["Notifications"],"summary":"Get org-scoped unseen notification summary","description":"Returns unseen counts + latest timestamp for the active personal/org scope. Use mode='initial' for one-time actor-scoped hydration or mode='active' for bounded foreground polling over focused/open/recent devboxes.","operationId":"get_scoped_unseen_summary_api_devboxes_notifications_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationScopedSummaryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxNotificationSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/user-secrets":{"get":{"tags":["UserSecrets"],"summary":"List user secrets","description":"List all secrets for the authenticated user. Does not include secret values.\n\nSource of truth: MorphVM API `GET /user/secret` (write-only secrets model).","operationId":"list_user_secrets_api_user_secrets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"metadata","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"metadata[...] query parameters for filtering secrets","title":"Metadata"},"description":"metadata[...] query parameters for filtering secrets"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["UserSecrets"],"summary":"Create or update user secret","description":"Create/update a secret for the authenticated user (value is write-only).","operationId":"create_user_secret_api_user_secrets_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user-secrets/{name}":{"get":{"tags":["UserSecrets"],"summary":"Get user secret by name","description":"Fetch a user's secret by name via the Services API.\n\nAuth handled server-side:\n- Uses MORPH_SERVICE_API_KEY as service credential\n- Passes through the authenticated user's id and api key","operationId":"get_user_secret_api_user_secrets__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretValueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org-secrets":{"get":{"tags":["OrgSecrets"],"summary":"List org secrets","description":"List all secrets for the effective organization. Does not include secret values.","operationId":"list_org_secrets_api_org_secrets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"metadata","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"metadata[...] query parameters for filtering secrets","title":"Metadata"},"description":"metadata[...] query parameters for filtering secrets"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["OrgSecrets"],"summary":"Create or update org secret","description":"Create/update a secret for the effective organization (value is write-only).","operationId":"create_org_secret_api_org_secrets_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org-secrets/{name}":{"get":{"tags":["OrgSecrets"],"summary":"Get org secret by name","description":"Fetch an org secret by name via the Services API.","operationId":"get_org_secret_api_org_secrets__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretValueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/aliases/search":{"get":{"tags":["Aliases"],"summary":"Search Shared Aliases","description":"Search shared templates (aliases) by comma-separated terms across alias, description, template text, and tags.\n\nCase-insensitive matching across provided terms. Returns partial matches when match=any.","operationId":"search_aliases_api_aliases_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"match","in":"query","required":false,"schema":{"type":"string","description":"Match mode: any (OR) or all (AND)","default":"any","title":"Match"},"description":"Match mode: any (OR) or all (AND)"},{"name":"min_match","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50,"minimum":1},{"type":"null"}],"description":"Minimum number of terms that must match (any-mode only)","title":"Min Match"},"description":"Minimum number of terms that must match (any-mode only)"},{"name":"include_steps","in":"query","required":false,"schema":{"type":"boolean","description":"Include a lightweight steps preview (types/titles)","default":false,"title":"Include Steps"},"description":"Include a lightweight steps preview (types/titles)"},{"name":"steps_limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":0,"description":"Maximum number of steps to include in steps_preview","default":10,"title":"Steps Limit"},"description":"Maximum number of steps to include in steps_preview"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/aliases/{alias}":{"get":{"tags":["Aliases"],"summary":"Get Alias","description":"Get alias by name from global alias database.\n\nThis endpoint is public (no user auth required) and uses the service's\nMORPH_API_KEY to access the global alias database.\n\nUsed by morph.new to resolve shared template URLs.","operationId":"get_alias_api_aliases__alias__get","parameters":[{"name":"alias","in":"path","required":true,"schema":{"type":"string","title":"Alias"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/devboxes/{devbox_id}/ssh-credentials":{"get":{"tags":["Admin"],"summary":"Get SSH Credentials for Devbox","description":"Retrieve SSH credentials (password and access_token) for a devbox. Only accessible by the devbox owner.","operationId":"get_devbox_ssh_credentials_api_admin_devboxes__devbox_id__ssh_credentials_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxSSHCredentialsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saved-templates":{"post":{"tags":["Saved Templates"],"summary":"Save Shared Template (Bookmark)","operationId":"save_shared_template_api_saved_templates_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alias","in":"query","required":false,"schema":{"type":"string","default":"","title":"Alias"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Optionally provide { alias } as JSON body","title":"Alias Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Saved Templates"],"summary":"List Saved Templates","operationId":"list_saved_templates_api_saved_templates_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedTemplateListResponse"}}}}}}},"/api/saved-templates/{alias}":{"delete":{"tags":["Saved Templates"],"summary":"Remove Saved Template","operationId":"delete_saved_template_api_saved_templates__alias__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alias","in":"path","required":true,"schema":{"type":"string","title":"Alias"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devboxes/{devbox_id}/agent-token":{"post":{"tags":["Devboxes - Agent Token"],"summary":"Mint Devbox Agent Token","description":"Mint a non-expiring auth token scoped to a single devbox owned by the authenticated user.","operationId":"mint_devbox_agent_token_api_devboxes__devbox_id__agent_token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"devbox_id","in":"path","required":true,"schema":{"type":"string","title":"Devbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxAgentTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevboxAgentTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/chat":{"post":{"tags":["Agent"],"summary":"Chat","description":"SSE chat endpoint backed by OpenAI tool-calling.","operationId":"chat_api_agent_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"AliasResponse":{"properties":{"alias":{"type":"string","title":"Alias"},"base_snapshot_id":{"type":"string","title":"Base Snapshot Id"},"template":{"type":"string","title":"Template"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"match_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Match Count"},"matched_terms":{"items":{"type":"string"},"type":"array","title":"Matched Terms"},"step_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Count"},"steps_preview":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps Preview"}},"type":"object","required":["alias","base_snapshot_id","template","created_at","updated_at"],"title":"AliasResponse"},"Body_upload_file_to_devbox_api_devboxes__devbox_id__uploads_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_to_devbox_api_devboxes__devbox_id__uploads_post"},"Body_upload_image_to_devbox_api_devboxes__devbox_id__uploads_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_image_to_devbox_api_devboxes__devbox_id__uploads_image_post"},"BranchRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"BranchRequest"},"BranchResponse":{"properties":{"instances":{"items":{"$ref":"#/components/schemas/DevboxResponse"},"type":"array","title":"Instances"}},"type":"object","required":["instances"],"title":"BranchResponse"},"ChatHistoryMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatHistoryMessage"},"ChatRequest":{"properties":{"message":{"type":"string","maxLength":20000,"minLength":1,"title":"Message"},"openai_api_key":{"type":"string","minLength":10,"title":"Openai Api Key"},"openai_model":{"type":"string","title":"Openai Model","default":"gpt-5.2"},"history":{"items":{"$ref":"#/components/schemas/ChatHistoryMessage"},"type":"array","title":"History"}},"type":"object","required":["message","openai_api_key"],"title":"ChatRequest"},"CreateSecretRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"value":{"type":"string","minLength":1,"title":"Value"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"}},"type":"object","required":["name","value"],"title":"CreateSecretRequest"},"DeleteResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"instance"},"deleted":{"type":"boolean","title":"Deleted","default":true}},"type":"object","required":["id"],"title":"DeleteResponse"},"DevboxAgentTokenRequest":{"properties":{"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"ttl_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Ttl Seconds"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"}},"type":"object","title":"DevboxAgentTokenRequest"},"DevboxAgentTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At"},"user_id":{"type":"string","title":"User Id"},"devbox_id":{"type":"string","title":"Devbox Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["token","user_id","devbox_id","scopes"],"title":"DevboxAgentTokenResponse"},"DevboxDetailListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/DevboxResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"DevboxDetailListResponse"},"DevboxListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/DevboxSummaryResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"DevboxListResponse"},"DevboxNotification":{"properties":{"id":{"type":"string","title":"Id"},"devbox_id":{"type":"string","title":"Devbox Id"},"source":{"type":"string","title":"Source"},"kind":{"type":"string","title":"Kind"},"status":{"$ref":"#/components/schemas/DevboxNotificationStatus","default":"open"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"payload":{"additionalProperties":true,"type":"object","title":"Payload","default":{}},"dedupe_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dedupe Key"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"seen_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seen At"},"resolved_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Resolved At"}},"type":"object","required":["id","devbox_id","source","kind","created_at","updated_at"],"title":"DevboxNotification"},"DevboxNotificationCreateRequest":{"properties":{"devbox_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Devbox Id"},"source":{"type":"string","title":"Source"},"kind":{"type":"string","title":"Kind"},"dedupe_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dedupe Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["source","kind"],"title":"DevboxNotificationCreateRequest"},"DevboxNotificationListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/DevboxNotification"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"DevboxNotificationListResponse"},"DevboxNotificationScopedSummaryRequest":{"properties":{"mode":{"type":"string","enum":["initial","active"],"title":"Mode","default":"active"},"focused_devbox_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focused Devbox Id"},"open_devbox_ids":{"items":{"type":"string"},"type":"array","title":"Open Devbox Ids"},"recent_devbox_ids":{"items":{"type":"string"},"type":"array","title":"Recent Devbox Ids"},"sticky_unseen_devbox_ids":{"items":{"type":"string"},"type":"array","title":"Sticky Unseen Devbox Ids"}},"type":"object","title":"DevboxNotificationScopedSummaryRequest"},"DevboxNotificationSeenRequest":{"properties":{"devbox_id":{"type":"string","title":"Devbox Id"}},"type":"object","required":["devbox_id"],"title":"DevboxNotificationSeenRequest"},"DevboxNotificationSeenResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"devbox_id":{"type":"string","title":"Devbox Id"},"marked":{"type":"integer","title":"Marked","default":0}},"type":"object","required":["devbox_id"],"title":"DevboxNotificationSeenResponse"},"DevboxNotificationStatus":{"type":"string","enum":["open","resolved","canceled"],"title":"DevboxNotificationStatus"},"DevboxNotificationSummaryItem":{"properties":{"unseen_count":{"type":"integer","title":"Unseen Count","default":0},"latest_created_at":{"type":"number","title":"Latest Created At","default":0.0}},"type":"object","title":"DevboxNotificationSummaryItem"},"DevboxNotificationSummaryResponse":{"properties":{"total_unseen":{"type":"integer","title":"Total Unseen","default":0},"by_devbox_id":{"additionalProperties":{"$ref":"#/components/schemas/DevboxNotificationSummaryItem"},"type":"object","title":"By Devbox Id","default":{}}},"type":"object","title":"DevboxNotificationSummaryResponse"},"DevboxRefs":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id"}},"type":"object","required":["snapshot_id"],"title":"DevboxRefs"},"DevboxResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"instance"},"status":{"type":"string","title":"Status"},"created":{"type":"integer","title":"Created"},"spec":{"$ref":"#/components/schemas/DevboxSpec"},"refs":{"$ref":"#/components/schemas/DevboxRefs"},"networking":{"anyOf":[{"$ref":"#/components/schemas/Networking"},{"type":"null"}]},"ttl":{"anyOf":[{"$ref":"#/components/schemas/TTL"},{"type":"null"}]},"wake_on":{"anyOf":[{"$ref":"#/components/schemas/WakeOn"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"timeline":{"items":{"$ref":"#/components/schemas/TimelineEvent"},"type":"array","title":"Timeline","default":[]},"current_save_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Save Id"},"base_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Snapshot Id"}},"type":"object","required":["id","status","created","spec","refs"],"title":"DevboxResponse"},"DevboxSSHCredentialsResponse":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},"type":"object","title":"DevboxSSHCredentialsResponse"},"DevboxSleepPolicyUpdateRequest":{"properties":{"never_sleep":{"type":"boolean","title":"Never Sleep","description":"Disable auto-sleep for this devbox (clears TTL)"}},"type":"object","required":["never_sleep"],"title":"DevboxSleepPolicyUpdateRequest"},"DevboxSpec":{"properties":{"vcpus":{"type":"integer","title":"Vcpus"},"memory":{"type":"integer","title":"Memory"},"disk_size":{"type":"integer","title":"Disk Size"}},"type":"object","required":["vcpus","memory","disk_size"],"title":"DevboxSpec"},"DevboxSummaryResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"instance"},"status":{"type":"string","title":"Status"},"created":{"type":"integer","title":"Created"},"spec":{"$ref":"#/components/schemas/DevboxSpec"},"refs":{"$ref":"#/components/schemas/DevboxRefs"},"networking":{"anyOf":[{"$ref":"#/components/schemas/Networking"},{"type":"null"}]},"ttl":{"anyOf":[{"$ref":"#/components/schemas/TTL"},{"type":"null"}]},"wake_on":{"anyOf":[{"$ref":"#/components/schemas/WakeOn"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"timeline_count":{"type":"integer","title":"Timeline Count","default":0},"saves_count":{"type":"integer","title":"Saves Count","default":0},"branches_count":{"type":"integer","title":"Branches Count","default":0},"last_event":{"anyOf":[{"$ref":"#/components/schemas/TimelineEvent"},{"type":"null"}]},"current_save_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Save Id"},"base_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Snapshot Id"},"last_interacted_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Interacted At"},"last_interaction_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Interaction Reason"}},"type":"object","required":["id","status","created","spec","refs"],"title":"DevboxSummaryResponse"},"DevboxTemplateLinkResponse":{"properties":{"template_id":{"type":"string","title":"Template Id"},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"}},"type":"object","required":["template_id"],"title":"DevboxTemplateLinkResponse"},"DevboxTier":{"type":"string","enum":["small","medium","large"],"title":"DevboxTier"},"DevboxTouchRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why the devbox was touched (audit only)"}},"type":"object","title":"DevboxTouchRequest"},"DisplayNameUpdateRequest":{"properties":{"display_name":{"type":"string","maxLength":64,"minLength":1,"title":"Display Name"}},"type":"object","required":["display_name"],"title":"DisplayNameUpdateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpExposeRequest":{"properties":{"name":{"type":"string","maxLength":40,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-_]*[a-z0-9])?$","title":"Name"},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port"},"auth_mode":{"anyOf":[{"$ref":"#/components/schemas/HttpServiceAuthMode"},{"type":"null"}],"description":"Authentication mode for the HTTP service (always 'none')","default":"none"}},"type":"object","required":["name","port"],"title":"HttpExposeRequest"},"HttpService":{"properties":{"name":{"type":"string","title":"Name"},"port":{"type":"integer","title":"Port"},"url":{"type":"string","title":"Url"},"auth_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Mode"}},"type":"object","required":["name","port","url"],"title":"HttpService"},"HttpServiceAuthMode":{"type":"string","enum":["none"],"title":"HttpServiceAuthMode"},"InstantStartAvailability":{"properties":{"template_id":{"type":"string","title":"Template Id"},"available":{"type":"boolean","title":"Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["template_id","available"],"title":"InstantStartAvailability"},"InstantStartRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","default":{}},"never_sleep":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Never Sleep"},"handoff_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":1.0},{"type":"null"}],"title":"Handoff Ttl Seconds"},"handoff_ttl_action":{"anyOf":[{"type":"string","enum":["stop","pause"]},{"type":"null"}],"title":"Handoff Ttl Action"}},"type":"object","title":"InstantStartRequest"},"Networking":{"properties":{"internal_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Ip"},"http_services":{"items":{"$ref":"#/components/schemas/HttpService"},"type":"array","title":"Http Services","default":[]}},"type":"object","title":"Networking"},"SaveRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"SaveRequest"},"SavedTemplateLink":{"properties":{"alias":{"type":"string","title":"Alias"},"template_id":{"type":"string","title":"Template Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"type":"number","title":"Updated At"}},"type":"object","required":["alias","template_id","updated_at"],"title":"SavedTemplateLink"},"SavedTemplateListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/SavedTemplateLink"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"SavedTemplateListResponse"},"SecretListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/SecretMetadataResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"SecretListResponse"},"SecretMetadataResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["id","name","created","updated"],"title":"SecretMetadataResponse"},"SecretValueResponse":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"}},"type":"object","required":["name","value"],"title":"SecretValueResponse"},"SeedRecentDevboxesRequest":{"properties":{"devbox_ids":{"items":{"type":"string"},"type":"array","maxItems":32,"minItems":1,"title":"Devbox Ids","description":"Devbox IDs ordered by recency (most recent first)"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Audit reason for seeding interaction timestamps"}},"type":"object","required":["devbox_ids"],"title":"SeedRecentDevboxesRequest"},"SeedRecentDevboxesResponse":{"properties":{"object":{"type":"string","title":"Object","default":"seed_recent_devboxes"},"seeded":{"items":{"type":"string"},"type":"array","title":"Seeded","default":[]},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped","default":[]}},"type":"object","title":"SeedRecentDevboxesResponse"},"SnapshotResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"snapshot"},"created":{"type":"integer","title":"Created"},"instance_id":{"type":"string","title":"Instance Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","created","instance_id","name","status"],"title":"SnapshotResponse"},"SuccessResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"instance"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","message"],"title":"SuccessResponse"},"TTL":{"properties":{"ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Seconds"},"ttl_expire_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Expire At"},"ttl_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttl Action"}},"type":"object","title":"TTL"},"TemplateAliasBuildResponse":{"properties":{"alias":{"type":"string","title":"Alias"},"previous_template_id":{"type":"string","title":"Previous Template Id"},"template_id":{"type":"string","title":"Template Id"},"run_id":{"type":"string","title":"Run Id"},"events_path":{"type":"string","title":"Events Path"}},"type":"object","required":["alias","previous_template_id","template_id","run_id","events_path"],"title":"TemplateAliasBuildResponse"},"TemplateAliasPublishRequest":{"properties":{"yaml":{"type":"string","title":"Yaml"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"devboxSpec":{"anyOf":[{"$ref":"#/components/schemas/DevboxTier"},{"type":"null"}]},"baseSnapshotId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basesnapshotid"}},"type":"object","required":["yaml"],"title":"TemplateAliasPublishRequest"},"TemplateAliasRefreshRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"devboxSpec":{"anyOf":[{"$ref":"#/components/schemas/DevboxTier"},{"type":"null"}]},"baseSnapshotId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basesnapshotid"}},"type":"object","title":"TemplateAliasRefreshRequest"},"TemplateCacheRequest":{"properties":{"runtime_secrets":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Runtime Secrets"},"workflow_context":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Workflow Context"},"prompt_optional_saved_secrets":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prompt Optional Saved Secrets","description":"When true, optional saved secrets pause for user input/timer instead of being consumed immediately."},"force":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Force","description":"Bypass blessed/private snapshot caches and rebuild all non-secret steps for this run."},"base_devbox_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Devbox Id"},"base_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Snapshot Id"},"handoff_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":1.0},{"type":"null"}],"title":"Handoff Ttl Seconds"},"handoff_ttl_action":{"anyOf":[{"type":"string","enum":["stop","pause"]},{"type":"null"}],"title":"Handoff Ttl Action"}},"type":"object","title":"TemplateCacheRequest"},"TemplateCacheStartResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"}},"type":"object","required":["run_id"],"title":"TemplateCacheStartResponse"},"TemplateCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"yaml":{"type":"string","title":"Yaml"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"devboxSpec":{"anyOf":[{"$ref":"#/components/schemas/DevboxTier"},{"type":"null"}]},"baseSnapshotId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basesnapshotid"}},"type":"object","required":["name","yaml"],"title":"TemplateCreateRequest"},"TemplateDetail":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"yaml":{"type":"string","title":"Yaml"},"base_snapshot_id":{"type":"string","title":"Base Snapshot Id"},"content_hash":{"type":"string","title":"Content Hash"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"step_count":{"type":"integer","title":"Step Count"},"cached_step_count":{"type":"integer","title":"Cached Step Count"},"final_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Snapshot Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"steps":{"items":{"$ref":"#/components/schemas/TemplateStepModel"},"type":"array","title":"Steps","default":[]},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"}},"type":"object","required":["id","user_id","name","yaml","base_snapshot_id","content_hash","status","step_count","cached_step_count","created_at","updated_at"],"title":"TemplateDetail"},"TemplateListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/TemplateSummary"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"TemplateListResponse"},"TemplatePreviewRequest":{"properties":{"baseSnapshotId":{"type":"string","title":"Basesnapshotid"},"steps":{"items":{"$ref":"#/components/schemas/TemplatePreviewStep"},"type":"array","title":"Steps"},"normalizeVersion":{"anyOf":[{"type":"string","const":"v1"},{"type":"null"}],"title":"Normalizeversion","default":"v1"}},"type":"object","required":["baseSnapshotId","steps"],"title":"TemplatePreviewRequest"},"TemplatePreviewResponse":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/TemplatePreviewStepResult"},"type":"array","title":"Steps"}},"type":"object","required":["steps"],"title":"TemplatePreviewResponse"},"TemplatePreviewStep":{"properties":{"type":{"anyOf":[{"type":"string","enum":["command","exposeHttpService","tmuxSession"]},{"type":"null"}],"title":"Type","default":"command"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"http_service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Http Service"},"tmux_session":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tmux Session"}},"type":"object","title":"TemplatePreviewStep"},"TemplatePreviewStepResult":{"properties":{"index":{"type":"integer","title":"Index"},"blessed_digest":{"type":"string","title":"Blessed Digest"},"private_digest":{"type":"string","title":"Private Digest"},"hit_service":{"type":"boolean","title":"Hit Service","default":false},"hit_user":{"type":"boolean","title":"Hit User","default":false}},"type":"object","required":["index","blessed_digest","private_digest"],"title":"TemplatePreviewStepResult"},"TemplateShareRequest":{"properties":{"alias":{"type":"string","title":"Alias"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Tags","description":"At least one tag is required when sharing"}},"type":"object","required":["alias","tags"],"title":"TemplateShareRequest"},"TemplateShareResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"TemplateShareResponse"},"TemplateStatus":{"type":"string","enum":["draft","caching","ready","failed"],"title":"TemplateStatus"},"TemplateStepModel":{"properties":{"id":{"type":"string","title":"Id"},"index":{"type":"integer","title":"Index"},"type":{"type":"string","title":"Type","default":"command"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"http_service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Http Service"},"export_secret":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Export Secret"},"tmux_session":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tmux Session"},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint"},"status":{"$ref":"#/components/schemas/TemplateStepStatus"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Finished At"},"updated_at":{"type":"number","title":"Updated At"}},"type":"object","required":["id","index","status","updated_at"],"title":"TemplateStepModel"},"TemplateStepStatus":{"type":"string","enum":["pending","executing","cached","failed","skipped"],"title":"TemplateStepStatus"},"TemplateSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"step_count":{"type":"integer","title":"Step Count"},"cached_step_count":{"type":"integer","title":"Cached Step Count"},"updated_at":{"type":"number","title":"Updated At"},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"}},"type":"object","required":["id","name","status","step_count","cached_step_count","updated_at"],"title":"TemplateSummary"},"TemplateUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"devboxSpec":{"anyOf":[{"$ref":"#/components/schemas/DevboxTier"},{"type":"null"}]}},"type":"object","title":"TemplateUpdateRequest"},"TimelineEvent":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"timestamp":{"type":"number","title":"Timestamp"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"name":{"type":"string","title":"Name"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"branch_instance_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Instance Id"},"inherited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Inherited","default":false}},"type":"object","required":["id","type","timestamp","name"],"title":"TimelineEvent"},"TmuxDebugInfoResponse":{"properties":{"transport":{"type":"string","title":"Transport","default":"sdk_ssh"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"tmux_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tmux Version"},"tmux_env":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tmux Env"},"sockets":{"items":{"type":"string"},"type":"array","title":"Sockets","default":[]},"sessions":{"items":{"$ref":"#/components/schemas/TmuxSession"},"type":"array","title":"Sessions","default":[]}},"type":"object","title":"TmuxDebugInfoResponse"},"TmuxInstallResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"installed":{"type":"boolean","title":"Installed"},"tmux_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tmux Version"}},"type":"object","required":["installed"],"title":"TmuxInstallResponse"},"TmuxNewSessionRequest":{"properties":{"name":{"type":"string","title":"Name"},"detached":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Detached","default":true},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"}},"type":"object","required":["name"],"title":"TmuxNewSessionRequest"},"TmuxNewSessionResponse":{"properties":{"session":{"$ref":"#/components/schemas/TmuxSession"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["session"],"title":"TmuxNewSessionResponse"},"TmuxPasteRequest":{"properties":{"pane_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pane Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"data_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data B64"},"enter":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enter","default":true},"bracketed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bracketed","default":true},"delete_buffer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Delete Buffer","default":true},"target":{"anyOf":[{"$ref":"#/components/schemas/TmuxTarget"},{"type":"null"}]},"socket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Socket"},"timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout Ms"}},"type":"object","title":"TmuxPasteRequest"},"TmuxPasteResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"resolved_pane_id":{"type":"string","title":"Resolved Pane Id"},"bytes_pasted":{"type":"integer","title":"Bytes Pasted"},"lines_detected":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lines Detected"},"bracketed":{"type":"boolean","title":"Bracketed","default":true},"enter_sent":{"type":"boolean","title":"Enter Sent","default":true}},"type":"object","required":["resolved_pane_id","bytes_pasted"],"title":"TmuxPasteResponse"},"TmuxRenameRequest":{"properties":{"new_name":{"type":"string","title":"New Name"}},"type":"object","required":["new_name"],"title":"TmuxRenameRequest"},"TmuxSendKeysRequest":{"properties":{"pane_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pane Id"},"keys":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Keys"},"enter":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enter","default":false},"target":{"anyOf":[{"$ref":"#/components/schemas/TmuxTarget"},{"type":"null"}]},"socket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Socket"},"sequence":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sequence"},"literal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Literal","default":false},"pause_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pause Ms"},"timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout Ms"}},"type":"object","title":"TmuxSendKeysRequest"},"TmuxSendKeysResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"resolved_pane_id":{"type":"string","title":"Resolved Pane Id"},"sent":{"type":"string","title":"Sent"}},"type":"object","required":["resolved_pane_id","sent"],"title":"TmuxSendKeysResponse"},"TmuxSession":{"properties":{"name":{"type":"string","title":"Name"},"windows":{"type":"integer","title":"Windows"},"clients":{"type":"integer","title":"Clients"},"created":{"type":"string","title":"Created"},"activity":{"type":"string","title":"Activity"},"id":{"type":"string","title":"Id"}},"type":"object","required":["name","windows","clients","created","activity","id"],"title":"TmuxSession"},"TmuxSessionsList":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/TmuxSession"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"TmuxSessionsList"},"TmuxSetDefaultSessionRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"TmuxSetDefaultSessionRequest"},"TmuxSnapshotResponse":{"properties":{"pane_id":{"type":"string","title":"Pane Id"},"lines":{"type":"integer","title":"Lines"},"ansi":{"type":"boolean","title":"Ansi","default":false},"content":{"type":"string","title":"Content"}},"type":"object","required":["pane_id","lines","content"],"title":"TmuxSnapshotResponse"},"TmuxTarget":{"properties":{"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"window":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window"},"pane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pane"}},"type":"object","title":"TmuxTarget"},"UploadResponse":{"properties":{"path":{"type":"string","title":"Path"},"filename":{"type":"string","title":"Filename"},"size":{"type":"integer","title":"Size"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["path","filename","size","content_type"],"title":"UploadResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WakeOn":{"properties":{"wake_on_ssh":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wake On Ssh"},"wake_on_http":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wake On Http"}},"type":"object","title":"WakeOn"},"WakeOnUpdateRequest":{"properties":{"wake_on_ssh":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wake On Ssh","description":"Enable/disable wake-on-SSH"},"wake_on_http":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wake On Http","description":"Enable/disable wake-on-HTTP"}},"type":"object","title":"WakeOnUpdateRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}