Skip to main content
The ShareLink interface represents a shareable link that provides access to a goal without requiring a direct collaboration invitation. Share links can be revoked at any time.

Properties

id
string
required
Unique identifier for the share link
goal_id
string
required
ID of the goal this share link provides access to
token
string
required
Unique token used in the shareable URL for authentication
permission
SharePermission
required
The permission level granted to users accessing via this link.Enum values:
  • view - Read-only access to the goal
  • edit - Read and write access to the goal
created_at
string
required
ISO 8601 timestamp when the share link was created
revoked_at
string | null
required
ISO 8601 timestamp when the share link was revoked, or null if still active

Example

{
  "id": "share_123",
  "goal_id": "goal_456",
  "token": "a1b2c3d4e5f6g7h8i9j0",
  "permission": "view",
  "created_at": "2026-03-01T09:00:00Z",
  "revoked_at": null
}

Type definitions

export type SharePermission = 'view' | 'edit'

export interface ShareLink {
  id: string
  goal_id: string
  token: string
  permission: SharePermission
  created_at: string
  revoked_at: string | null
}

Build docs developers (and LLMs) love