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
destinationobjectrequired
Show properties
directorystringrequired
moveChangesboolean | any
Show properties
Any of:
boolean
boolean
any
any
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 '{
  "destination": {
    "directory": "string"
  },
  "moveChanges": true
}'
Response
<No Content>