Skip to main content
ThinkEx enables real-time collaboration through workspace sharing. Workspace owners can invite collaborators with different permission levels and create shareable links.

Permission Levels

owner
string
Full control over the workspace, including deletion and collaborator management
editor
string
Can modify workspace content, invite collaborators, and create share links
viewer
string
Read-only access to workspace content

Collaborator Object

id
string
required
Unique identifier for the collaborator relationship (UUID)
workspaceId
string
required
ID of the workspace
userId
string
required
ID of the collaborating user
permissionLevel
string
required
Permission level: owner, editor, or viewer
createdAt
string
required
ISO 8601 timestamp when collaboration was created
lastOpenedAt
string
ISO 8601 timestamp when collaborator last opened the workspace
name
string
Collaborator’s display name
email
string
Collaborator’s email address
image
string
Collaborator’s profile image URL

List Collaborators

Get all collaborators for a workspace, including the owner and any pending invites.
curl https://thinkex.app/api/workspaces/{id}/collaborators \
  -H "Cookie: your-session-cookie"

Path Parameters

id
string
required
The workspace ID (UUID)

Response

collaborators
array
required
Array of collaborator objects, including the workspace owner
invites
array
required
Array of pending invite objects for users who haven’t accepted yet
{
  "collaborators": [
    {
      "id": "owner-user_123",
      "userId": "user_123",
      "permissionLevel": "owner",
      "createdAt": "2024-01-01T00:00:00Z",
      "name": "John Doe",
      "email": "[email protected]",
      "image": "https://avatar.url/john.jpg"
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "userId": "user_456",
      "permissionLevel": "editor",
      "createdAt": "2024-01-10T08:30:00Z",
      "lastOpenedAt": "2024-01-15T14:20:00Z",
      "name": "Jane Smith",
      "email": "[email protected]",
      "image": "https://avatar.url/jane.jpg"
    }
  ],
  "invites": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "email": "[email protected]",
      "permissionLevel": "editor",
      "createdAt": "2024-01-16T10:00:00Z",
      "expiresAt": "2024-01-23T10:00:00Z",
      "inviterId": "user_123"
    }
  ]
}

Invite Collaborator

Invite a user to collaborate on a workspace. If the user exists in the system, they are added immediately and receive a notification email. If the user doesn’t exist, a pending invite is created and sent via email.
curl -X POST https://thinkex.app/api/workspaces/{id}/collaborators \
  -H "Content-Type: application/json" \
  -H "Cookie: your-session-cookie" \
  -d '{
    "email": "[email protected]",
    "permissionLevel": "editor"
  }'

Path Parameters

id
string
required
The workspace ID (UUID)

Request Body

email
string
required
Email address of the user to invite
permissionLevel
string
Permission level to grant. Options: editor (default), viewer

Response (Existing User)

When inviting an existing user, they are added immediately.
{
  "collaborator": {
    "id": "550e8400-e29b-41d4-a716-446655440003",
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user_789",
    "permissionLevel": "editor",
    "createdAt": "2024-01-20T15:00:00Z"
  }
}

Response (New User)

When inviting a user who doesn’t have an account, a pending invite is created.
{
  "message": "Invitation sent to new user",
  "pending": true,
  "email": "[email protected]"
}
Only workspace owners and editors can invite collaborators. Pending invites expire after 7 days.

Update Collaborator Permission

Update a collaborator’s permission level.
curl -X PATCH https://thinkex.app/api/workspaces/{id}/collaborators/{collaboratorId} \
  -H "Content-Type: application/json" \
  -H "Cookie: your-session-cookie" \
  -d '{
    "permissionLevel": "viewer"
  }'

Path Parameters

id
string
required
The workspace ID (UUID)
collaboratorId
string
required
The collaborator relationship ID (UUID)

Request Body

permissionLevel
string
required
New permission level. Options: editor, viewer

Response

{
  "collaborator": {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user_456",
    "permissionLevel": "viewer",
    "createdAt": "2024-01-10T08:30:00Z"
  }
}
Only workspace owners can update collaborator permissions.

Remove Collaborator

Remove a collaborator from a workspace.
curl -X DELETE https://thinkex.app/api/workspaces/{id}/collaborators/{collaboratorId} \
  -H "Cookie: your-session-cookie"

Path Parameters

id
string
required
The workspace ID (UUID)
collaboratorId
string
required
The collaborator relationship ID (UUID)

Response

{
  "success": true
}
Only workspace owners can remove collaborators.

Revoke Invite

Revoke a pending invite before it’s accepted.
curl -X DELETE https://thinkex.app/api/workspaces/{id}/invites/{inviteId} \
  -H "Cookie: your-session-cookie"

Path Parameters

id
string
required
The workspace ID (UUID)
inviteId
string
required
The invite ID (UUID)

Response

{
  "success": true
}

Generate a shareable link that allows anyone with the link to join the workspace.
curl -X POST https://thinkex.app/api/workspaces/{id}/share-link \
  -H "Cookie: your-session-cookie"

Path Parameters

id
string
required
The workspace ID (UUID)

Response

token
string
required
The unique share token
url
string
required
The complete shareable URL
{
  "token": "abc123def456",
  "url": "https://thinkex.app/invite/link/abc123def456"
}
Share links expire after 7 days. If a share link already exists and hasn’t expired, the existing link is returned. If it has expired, a new link is generated.
Only workspace owners and editors can create share links. Users who join via share link receive editor permissions by default.

Access Control

Access to workspace endpoints is controlled based on permission levels:
EndpointOwnerEditorViewer
List collaborators
Invite collaborator
Update permission
Remove collaborator
Create share link
Revoke invite
Append events
Read events
Update workspace metadata
Delete workspace

Build docs developers (and LLMs) love