Skip to main content
The Collaborator interface represents a user who has been granted access to collaborate on a goal. Collaborators can have different roles that determine their permissions.

Properties

goal_id
string
required
ID of the goal this collaboration is for
user_id
string
required
ID of the user who is collaborating on the goal
role
CollaboratorRole
required
The role assigned to this collaborator.Enum values:
  • viewer - Can view the goal but not edit
  • editor - Can view and edit the goal
  • owner - Full control over the goal including deletion and access management
invited_at
string
required
ISO 8601 timestamp when the collaboration invitation was sent
joined_at
string | null
required
ISO 8601 timestamp when the user accepted the invitation, or null if not yet accepted
user
object
User details (computed/joined field)

Example

{
  "goal_id": "goal_123",
  "user_id": "user_789",
  "role": "editor",
  "invited_at": "2026-02-15T10:00:00Z",
  "joined_at": "2026-02-15T11:30:00Z",
  "user": {
    "id": "user_789",
    "email": "[email protected]"
  }
}

Type definitions

export type CollaboratorRole = 'viewer' | 'editor' | 'owner'

export interface Collaborator {
  goal_id: string
  user_id: string
  role: CollaboratorRole
  invited_at: string
  joined_at: string | null
  user?: {
    id: string
    email: string
  }
}

Build docs developers (and LLMs) love