Fork the workspace at a point in its task history
const url = 'https://your-org.evershell.ai/v1/workspaces/example/fork';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"fork_point_task_count":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-org.evershell.ai/v1/workspaces/example/fork \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "fork_point_task_count": 1 }'Permissions: workspace:read or workspace:read:own
(creator-match on :own) — reading the parent is
sufficient; the fork creates a new workspace owned by the
forker.
Creates a new workspace whose snapshot is a copy of the
parent’s at the boundary after fork_point_task_count
completed tasks. Useful for branching conversations /
experiments without losing the parent line.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Snapshot the parent at the boundary right after this many completed tasks. 0 means “fork from workspace creation, before any tasks ran”.
Example generated
{ "fork_point_task_count": 1}Responses
Section titled “ Responses ”Fork initiated
object
Child workspace id.
Example
{ "status": "provisioning"}Validation failure
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Resource not found in the caller’s org
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}invalid_state — parent isn’t in a forkable state (busy
parents return this), or
role_archived / provider_archived — the role or
provider is archived; unarchive before forking.
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Tenant is past_due, decommissioning, or trial-expired
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}