1. Syncode
Syncode
  • Syncode
    • Conventions
    • Response Schemas
    • Error Taxonomy
    • Resource Model
    • Permission Model
    • Cross-Cutting Concerns
    • Security
    • Collab-Plane
    • Execution-Plane
    • AI-Plane
    • Schemas
      • RoomStatus
      • RoomRole
      • RoomMode
      • SupportedLanguage
      • Difficulty
      • UserRole
      • ErrorResponse
      • Pagination
      • UserProfile
      • PublicProfile
      • RoomConfig
      • RoomParticipantSummary
      • RoomSummary
      • RoomDetail
      • RoomPreview
      • ProblemSummary
      • ProblemDetail
      • ProblemExample
      • TestCase
      • TagInfo
      • AiMessage
      • WeaknessEntry
      • PeerFeedbackRatings
      • PeerFeedbackEntry
      • SessionSummary
      • SessionDetail
      • SessionParticipant
      • SessionEvent
      • CodeSnapshot
      • Evidence
      • ReportDimension
      • AdminDashboard
      • AdminUserEntry
      • AdminUserDetail
      • AdminRoomEntry
      • AuditLogEntry
      • HealthResponse
      • MatchOpponent
  • SynCode Control Plane API
    • Auth
      • Create a new account
      • Authenticate and get tokens
      • Refresh access token
      • Invalidate refresh token
      • Change current user's password
      • Request password reset email
      • Reset password with token
    • Users
      • Get current user profile
      • Update current user profile
      • Soft-delete account
      • Get public profile of another user
      • Upload avatar (presigned URL)
      • Get usage quotas and limits
      • Get current active room (for reconnection)
      • Get time-series training statistics
    • Rooms
      • Participants
        • List all participants in a room
        • Update participant (role, mute)
        • Kick a participant from the room
      • Control
        • Advance room phase
        • Select or change the problem
        • Update room settings
        • Lock code editor, run, and submit
        • Unlock code editor, run, and submit
        • Pause the coding timer
        • Resume the coding timer
      • Media
        • Generate LiveKit access token
        • Record participant's recording consent
        • Start session recording
        • Stop session recording
      • AI
        • Send a message to AI interviewer
        • Poll AI message result
        • Get AI conversation history
        • Request a targeted hint
        • Get hint result
        • Request code review
        • Get review result
        • Get cross-session weakness tracking
      • StaticAnalysis
        • Request static analysis
        • Get analysis result
      • Feedback
        • Submit peer evaluation
        • Get all feedback for this room
        • Get my submitted feedback
      • Create a new room
      • List rooms for current user
      • Get room details
      • Destroy a room (host only)
      • Join a room via room code
      • Leave a room
      • Lookup room by invite code
      • Execute code (interactive run)
      • Submit code against test cases
      • List past runs in this room
      • List past submissions in this room
      • Transfer room ownership
    • Problems
      • List and search problems
      • Create a problem (admin)
      • List all available tags
      • Get problem details
      • Update a problem (admin)
      • Delete a problem (admin)
    • Bookmarks
      • List bookmarked problems
      • Bookmark a problem
      • Remove bookmark
    • Execution
      • Get execution result (single run)
      • Get submission status and aggregated results
    • Sessions
      • List my session history
      • Get session details
      • Soft-delete a session
      • Get training report
      • Get session event timeline
      • Get code snapshots
      • Get recording download URL
      • Get peer feedback for this session
      • Get whiteboard export
      • Get AI conversation history
      • Compare multiple session reports
    • Matchmaking
      • Enter the matchmaking queue
      • Cancel matchmaking
      • Get current match status
      • Accept a proposed match
      • Decline a proposed match
    • Admin
      • System overview stats
      • List all users
      • Get user details (admin view)
      • Update user (ban, role change)
      • List all rooms
      • Force-close a room
      • Query audit logs
    • Health
      • Deep health check
    • Schemas
      • RoomStatus
      • CreateDocumentRequest
      • RoomRole
      • CreateDocumentResponse
      • RoomMode
      • DestroyDocumentResponse
      • SupportedLanguage
      • KickUserRequest
      • Difficulty
      • KickUserResponse
      • UserRole
      • LockEditorRequest
      • ErrorResponse
      • LockEditorResponse
      • Pagination
      • SnapshotReadyPayload
      • UserProfile
      • UserDisconnectedPayload
      • PublicProfile
      • CallbackAckResponse
      • RoomConfig
      • RoomParticipantSummary
      • RoomSummary
      • RoomDetail
      • RoomPreview
      • ProblemSummary
      • ProblemDetail
      • ProblemExample
      • TestCase
      • TagInfo
      • AiMessage
      • WeaknessEntry
      • PeerFeedbackRatings
      • PeerFeedbackEntry
      • SessionSummary
      • SessionDetail
      • SessionParticipant
      • SessionEvent
      • CodeSnapshot
      • Evidence
      • ReportDimension
      • AdminDashboard
      • AdminUserEntry
      • AdminUserDetail
      • AdminRoomEntry
      • AuditLogEntry
      • HealthResponse
      • MatchOpponent
  • SynCode Collab Plane API
    • Documents
      • Create a Yjs document
      • Destroy a Yjs document
      • Kick a user from the document
      • Toggle editor lock
      • Update room state
    • Health
      • Health check
    • Callbacks
      • [Callback] Snapshot ready
      • [Callback] User disconnected
    • Schemas
      • CreateDocumentRequest
      • CreateDocumentResponse
      • DestroyDocumentResponse
      • KickUserRequest
      • KickUserResponse
      • SnapshotReadyPayload
      • LockEditorRequest
      • UpdateRoomStateRequest
      • UserDisconnectedPayload
      • LockEditorResponse
      • UpdateRoomStateResponse
      • CallbackAckResponse
      • ErrorResponse
  1. Syncode

Permission Model

Global Capabilities#

23 capabilities across two roles.
CapabilityUSERADMIN
room:createYesYes
room:joinYesYes
room:listYesYes
room:delete-ownYesYes
room:delete-anyNoYes
room:join-anyNoYes
room:force-closeNoYes
problem:viewYesYes
problem:createNoYes
problem:editNoYes
problem:deleteNoYes
user:view-profileYesYes
user:edit-selfYesYes
user:listNoYes
user:manageNoYes
user:banNoYes
session:view-ownYesYes
session:view-anyNoYes
report:view-ownYesYes
report:view-anyNoYes
report:exportNoYes
platform:view-analyticsNoYes
platform:manage-settingsNoYes

Room Capabilities#

Room capabilities come from participant role plus host ownership overrides.
CapabilityINTERVIEWERCANDIDATEOBSERVER
code:viewYesYesYes
code:editYesYesNo
code:runYesYesNo
code:submitYesYesNo
whiteboard:viewYesYesYes
whiteboard:drawYesYesNo
media:audioYesYesNo
media:videoYesYesNo
media:screenshareYesYesNo
chat:sendYesYesYes
room:change-phaseYesNoNo
room:select-problemNoNoNo
recording:toggleNoNoNo
recording:replayYesYesYes
ai:request-hintYesYesNo
ai:request-reviewYesNoNo
Host ownership adds these overrides regardless of participant role:
room:change-phase
room:select-problem
room:settings
participant:invite
participant:kick
participant:assign-role
recording:toggle
recording:replay
Dynamic authorization rules:
Room ownership is stored on rooms.hostId, not in the participant role enum.
Peer rooms allow exactly one active interviewer and one active candidate; all other active participants are observers.
AI rooms allow one active human candidate and any number of observers.
Stage transitions are allowed for the host or the current interviewer.
Participant reassignment and ownership transfer are host-only.

JWT Access Token Claims#

{
  "sub": "userId",
  "email": "user@example.com",
  "username": "johndoe",
  "role": "user",
  "capabilities": ["room:create", "room:join", "room:list", "..."],
  "iat": 1709467200,
  "exp": 1709468100
}
The capabilities array contains resolved global capabilities. The frontend uses this array for all permission checks and never reads role directly.
Room-scoped capabilities are returned in room responses (myCapabilities), not in the JWT.
Modified at 2026-04-09 21:41:14
Previous
Resource Model
Next
Cross-Cutting Concerns
Built with