docs(sessions): replace repo/branch params with organizationId
Merged
SW
5mo ago+4+4+0123456789-26-26-01234567890123456789
Summary
Two cleanups in CreateSessionRequest (the body schema for POST /api/sessions):
- Drift cleanup: drop
repoOwner,repoName,isNewBranch— these were documented but the api's Zod schema never accepted them. They were silently dropped by Zod's default non-strict parsing. Removing them so the docs reflect reality. - Architectural cleanup: drop
cloneUrlandbranch. The api now derives the clone URL itself from auth context (via the unifiedrecoupable/<accountId>naming introduced by recoupable/api#618), so the caller doesn't construct repo URLs anymore.
New shape:
{
title?: string;
organizationId?: string; // uuid; omit for personal session
sandboxType?: "vercel";
}
Contract
| Body | Session type | Workspace repo |
|---|---|---|
{} | personal | recoupable/<auth.accountId> — ensured (created if missing) |
{ organizationId } | org | recoupable/<organizationId> — ensured, with org-access validation |
Paired changes
This docs PR represents the contract; the api PR enforcing it is incoming (will enforce the new Zod schema + forward organizationId to validateAuthContext). Once both ship, the Session response shape still includes branch, cloneUrl, repoOwner, repoName since those are columns on the row — only the request body schema is slimmed here.
Test plan
- Mintlify preview renders
CreateSessionRequestwithout the dropped fields -
organizationIdshows up withformat: uuiddescription - No other MDX page references the dropped fields (verified via grep — only the
Sessionresponse schema still names them, which is correct)
🤖 Generated with Claude Code
Summary by cubic
Simplified CreateSessionRequest to use only organizationId; the server now derives the workspace repo from auth. Also removed sandboxType since only vercel was supported.
- Migration
- Stop sending
repoOwner,repoName,branch,cloneUrl,isNewBranch,sandboxType. - To create an org session, send
organizationId(uuid). Omit it for a personal session. The server provisions or reusesrecoupable/<organizationId>orrecoupable/<accountId>. - Response fields remain unchanged.
- Stop sending
Summary by CodeRabbit
- Breaking Changes
- Updated session creation behavior to support both personal and organization-based provisioning. Sessions now accept
organizationIdfor organization context, with automatic repository workspace provisioning. Removed direct repository configuration fields; the service now handles repository URL generation internally.
- Updated session creation behavior to support both personal and organization-based provisioning. Sessions now accept