Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Move session

Move a session to another project directory, optionally transferring local changes.

POST/api/session/{sessionID}/move
Path parameters
sessionIDobjectrequired
Request body
requiredapplication/json
directorystringrequired
workspaceIDobject
Show properties
object
Responses
204<No Content>
400InvalidRequestError
Any of:
InvalidRequestError1
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
404SessionNotFoundError
Any of:
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
Request
curl -X POST "/api/session/%5Bobject%20Object%5D/move" \
  -H "Content-Type: application/json" \
  -d '{
  "directory": "string",
  "workspaceID": {}
}'
Response
<No Content>