Codevisor Docs
Api reference

POST Sessions Id Open

POST/v1/sessions/{id}/open

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

project?|null
session*
update?|null
transcriptLimit?number||||null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/sessions/string/open" \  -H "Content-Type: application/json" \  -d '{    "session": {      "projectId": "string",      "harnessId": "string"    }  }'
{  "session": {    "id": "string",    "projectId": "string",    "serverId": "string",    "harnessId": "string",    "harnessAccountId": "string",    "agentSessionId": "string",    "title": "string",    "origin": "codevisor",    "worktreeName": "string",    "workspaceId": "string",    "cwd": "string",    "configSelections": {      "property1": "string",      "property2": "string"    },    "unavailableConfigSelections": {      "property1": "string",      "property2": "string"    },    "createdAt": "string",    "updatedAt": "string",    "sidebarState": "idle",    "sidebarStateChangedAt": "string",    "usage": {      "used": 0,      "size": 0,      "inputTokens": 0,      "cachedInputTokens": 0,      "outputTokens": 0,      "reasoningOutputTokens": 0,      "totalTokens": 0,      "costAmount": 0,      "costCurrency": "string",      "costKind": "reported"    },    "latestAttentionSequence": 0,    "lastSeenAttentionSequence": 0,    "unreadCount": 0,    "hasUnreadError": true,    "actionRequired": true,    "actionRequiredKind": "question",    "pendingPlanApproval": true,    "parentSessionId": "string",    "labels": {      "property1": "string",      "property2": "string"    }  },  "transcript": {    "items": [      {        "id": "string",        "sessionId": "string",        "sequence": 0,        "role": "user",        "text": "string",        "createdAt": "string",        "updatedAt": "string",        "isGenerating": true,        "hasDetails": true,        "turnId": "string",        "startedAt": "string",        "endedAt": "string",        "stopReason": "string",        "stopDetail": "string",        "stopKind": "usageLimit",        "retryable": true,        "planDocument": "string",        "planProposedAt": "string",        "planResumedAt": "string",        "attachments": [          {            "fileId": "string",            "name": "string",            "mimeType": "string",            "sizeBytes": 0,            "kind": "image"          }        ],        "messageId": "string",        "phase": "commentary",        "textResource": {          "itemId": "string",          "entryKey": "string",          "fields": [            {              "name": "string",              "revision": 0,              "encoding": "text",              "sizeBytes": 0,              "pageCount": 0,              "generation": 0            }          ]        },        "planResource": {          "itemId": "string",          "entryKey": "string",          "fields": [            {              "name": "string",              "revision": 0,              "encoding": "text",              "sizeBytes": 0,              "pageCount": 0,              "generation": 0            }          ]        },        "textGeneration": 0,        "textRevision": 0,        "textPosition": 0,        "revision": 0      }    ],    "nextBefore": "string",    "nextAfter": "string",    "hasNewer": true,    "hasMore": true,    "eventCursor": 0,    "stateUpdates": [],    "setupActivities": [],    "pendingQuestion": {      "sessionUpdate": "question",      "questionId": "string",      "message": "string",      "questions": [        {          "id": "string",          "header": "string",          "question": "string",          "options": [            {              "id": "string",              "label": "string",              "description": "string"            }          ],          "multiSelect": true,          "allowsOther": true,          "isSecret": true,          "backOptionLabel": "string",          "presentation": "browserChoice"        }      ],      "autoResolutionMs": 0    },    "pendingPlanApproval": true,    "backgroundTasks": [      {        "id": "string",        "description": "string",        "status": "string",        "taskType": "string",        "toolUseId": "string",        "terminalKey": "string",        "readOnly": true      }    ],    "goal": {      "objective": "string",      "status": "active",      "activity": "planning",      "tokenBudget": 0,      "tokensUsed": 0,      "timeUsedSeconds": 0,      "createdAt": "string",      "updatedAt": "string"    },    "skills": {      "skills": [        {          "name": "string",          "description": "string",          "invocation": "string",          "source": "builtin"        }      ],      "invocationPrefix": "string"    },    "sessionPlan": {      "entries": [        {          "content": "string",          "priority": "high",          "status": "pending"        }      ]    },    "usage": {      "used": 0,      "size": 0,      "inputTokens": 0,      "cachedInputTokens": 0,      "outputTokens": 0,      "reasoningOutputTokens": 0,      "totalTokens": 0,      "costAmount": 0,      "costCurrency": "string",      "costKind": "reported"    },    "updateGate": {      "harnessId": "string",      "harnessName": "string"    }  },  "runtime": null}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}