GET
/
v1
/
api
/
workspaces
curl --request GET \
  --url https://api.trillet.ai/v1/api/workspaces \
  --header 'x-api-key: <api-key>'
{
  "_id": "<string>",
  "name": "<string>",
  "initials": "<string>",
  "pricingTier": "<string>",
  "isMasterWorkspace": true,
  "isExternal": true,
  "teamMembers": [
    {}
  ],
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Description

This endpoint returns a list of workspaces where the authenticated user is either:

  • The owner of the workspace,
  • An internal team member, or
  • An external team member.

If the user is signing in for the first time, the system will:

  1. Check for any pending invitations and join the user to an existing workspace if one exists.
  2. If no invitation exists, create a default workspace for the user.

The response includes both direct workspaces and external workspaces, sorted in the following order:

  1. Master workspace (if owned),
  2. Owned workspaces,
  3. Internal team memberships,
  4. External guest workspaces.

Response Fields

_id
string

Unique identifier of the workspace.

name
string

Name of the workspace.

initials
string

Initials of the workspace.

pricingTier
string

Pricing tier of the workspace (e.g., “build_plan”).

isMasterWorkspace
boolean

Indicates whether this workspace is the master workspace.

isExternal
boolean

Indicates whether the user is accessing this workspace as an external guest.

teamMembers
array

List of team members associated with the workspace, including their roles and optional external workspace details.

createdAt
string

Timestamp when the workspace was created (ISO 8601 format).

updatedAt
string

Timestamp when the workspace was last updated (ISO 8601 format).

GET
/
v1
/
api
/
workspaces
curl --request GET \
  --url https://api.trillet.ai/v1/api/workspaces \
  --header 'x-api-key: <api-key>'
{
  "_id": "<string>",
  "name": "<string>",
  "initials": "<string>",
  "pricingTier": "<string>",
  "isMasterWorkspace": true,
  "isExternal": true,
  "teamMembers": [
    {}
  ],
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Description

This endpoint returns a list of workspaces where the authenticated user is either:

  • The owner of the workspace,
  • An internal team member, or
  • An external team member.

If the user is signing in for the first time, the system will:

  1. Check for any pending invitations and join the user to an existing workspace if one exists.
  2. If no invitation exists, create a default workspace for the user.

The response includes both direct workspaces and external workspaces, sorted in the following order:

  1. Master workspace (if owned),
  2. Owned workspaces,
  3. Internal team memberships,
  4. External guest workspaces.

Response Fields

_id
string

Unique identifier of the workspace.

name
string

Name of the workspace.

initials
string

Initials of the workspace.

pricingTier
string

Pricing tier of the workspace (e.g., “build_plan”).

isMasterWorkspace
boolean

Indicates whether this workspace is the master workspace.

isExternal
boolean

Indicates whether the user is accessing this workspace as an external guest.

teamMembers
array

List of team members associated with the workspace, including their roles and optional external workspace details.

createdAt
string

Timestamp when the workspace was created (ISO 8601 format).

updatedAt
string

Timestamp when the workspace was last updated (ISO 8601 format).