Skip to main content
POST
/
api
/
sessions
Create session
curl --request POST \
  --url https://api.recoupable.com/api/sessions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "title": "<string>",
  "repoOwner": "<string>",
  "repoName": "<string>",
  "branch": "<string>",
  "cloneUrl": "<string>",
  "isNewBranch": true,
  "sandboxType": "vercel"
}
'
{
  "session": {
    "id": "<string>",
    "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "status": "running",
    "isNewBranch": true,
    "globalSkillRefs": [
      {}
    ],
    "lifecycleVersion": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "repoOwner": "<string>",
    "repoName": "<string>",
    "branch": "<string>",
    "cloneUrl": "<string>",
    "sandboxState": {},
    "lifecycleState": "provisioning",
    "lastActivityAt": "2023-11-07T05:31:56Z",
    "sandboxExpiresAt": "2023-11-07T05:31:56Z",
    "hibernateAfter": "2023-11-07T05:31:56Z",
    "lifecycleRunId": "<string>",
    "lifecycleError": "<string>",
    "linesAdded": 123,
    "linesRemoved": 123,
    "snapshotUrl": "<string>",
    "snapshotCreatedAt": "2023-11-07T05:31:56Z",
    "snapshotSizeBytes": 123,
    "cachedDiff": {},
    "cachedDiffUpdatedAt": "2023-11-07T05:31:56Z"
  },
  "chat": {
    "id": "<string>",
    "sessionId": "<string>",
    "title": "<string>",
    "modelId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "activeStreamId": "<string>",
    "lastAssistantMessageAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Body

application/json

All fields are optional. An empty body is valid and creates a session with default settings.

title
string

Display title for the session. When omitted, the server generates one.

repoOwner
string

GitHub repository owner (user or org). Validated against GitHub's owner-name rules.

repoName
string

GitHub repository name. Validated against GitHub's repo-name rules.

branch
string

Branch the session should check out. Ignored when isNewBranch is true — the server generates a new branch name in that case.

cloneUrl
string

Clone URL the sandbox should fetch from.

isNewBranch
boolean

When true, the server generates a fresh branch name (e.g. xx/abcdef12) instead of using branch.

sandboxType
enum<string>

Which sandbox provider to use. Currently only vercel is accepted.

Available options:
vercel

Response

Session and initial chat created successfully.

session
object
required
chat
object
required