Teams & Workspaces

Use Teams to collaborate in a shared workspace. Team trading supports two modes:

  • shared: everyone trades from one shared team account.
  • prop: each trader gets an assigned subaccount (book).

Endpoint Overview

EndpointMethodDescription
/v1/workspaces
GETList personal and team workspaces available to the current user.
/v1/workspaces/active
GETGet the currently selected workspace.
/v1/workspaces/:workspaceId/select
POSTSwitch active workspace (personal or a team workspace).
/v1/teams
POSTCreate a team workspace (`shared` or `prop`).
/v1/teams/:teamId
GETGet team snapshot with members and billing state.
/v1/teams/:teamId/workspace
GETGet consolidated team workspace state: accounts, assignees, grants, and portfolio summaries.
/v1/teams/:teamId/shared-account
GET/POSTRead or create the shared team account (shared mode only).
/v1/teams/:teamId/accounts/subaccounts
GETList visible subaccounts and grants (prop mode only).
/v1/teams/:teamId/accounts/subaccount
POSTCreate a trader-assigned subaccount (prop mode only).
/v1/teams/:teamId/invites
POSTInvite a member to the team.

Create Team

Create a new team workspace with a selected team mode.

Request

POST
/v1/teams
curl -X POST https://api.paperinvest.io/v1/teams \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alpha Desk",
    "mode": "shared",
    "slug": "alpha-desk"
  }'

Team Workspace Aggregate

This endpoint returns everything needed to render team trading context in one call:

  • Team snapshot and members
  • Mode-specific account topology (shared account or prop subaccounts)
  • Grant assignments
  • Portfolio summaries for each team account

Request

GET
/v1/teams/:teamId/workspace
curl -X GET https://api.paperinvest.io/v1/teams/team_123/workspace \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response (shared mode)

200 OK
{
  "team": {
    "teamId": "team_123",
    "name": "Alpha Desk",
    "mode": "shared"
  },
  "members": [
    {
      "teamMemberId": "m_1",
      "entityId": "entity_owner",
      "email": "[email protected]",
      "role": "owner",
      "status": "active"
    }
  ],
  "workspace": {
    "teamId": "team_123",
    "mode": "shared",
    "accountScope": "team_shared",
    "sharedAccount": {
      "account": {
        "accountId": "acc_shared_1",
        "scope": "team_shared"
      },
      "grants": [],
      "ownerMember": {
        "teamMemberId": "m_1",
        "entityId": "entity_owner",
        "email": "[email protected]",
        "role": "owner",
        "status": "active"
      },
      "portfolios": [
        {
          "portfolioId": "port_1",
          "accountId": "acc_shared_1",
          "type": "CASH",
          "accountType": "INDIVIDUAL",
          "totalEquity": 100000
        }
      ]
    },
    "subaccounts": []
  }
}

Response (prop mode)

200 OK
{
  "team": {
    "teamId": "team_456",
    "name": "Prop Desk",
    "mode": "prop"
  },
  "members": [],
  "workspace": {
    "teamId": "team_456",
    "mode": "prop",
    "accountScope": "team_subaccount",
    "sharedAccount": null,
    "subaccounts": [
      {
        "subaccount": {
          "accountId": "acc_book_1",
          "scope": "team_subaccount",
          "traderEntityId": "entity_trader_a"
        },
        "grants": [],
        "assignedMember": {
          "teamMemberId": "m_2",
          "entityId": "entity_trader_a",
          "email": "[email protected]",
          "role": "trader",
          "status": "active"
        },
        "portfolios": [
          {
            "portfolioId": "port_2",
            "accountId": "acc_book_1",
            "type": "MARGIN",
            "accountType": "INDIVIDUAL",
            "totalEquity": 150000
          }
        ]
      }
    ]
  }
}

Workspace Switching

Use workspaces endpoints to move between personal and team contexts:

List workspaces

GET
/v1/workspaces
curl -X GET https://api.paperinvest.io/v1/workspaces \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Select a workspace

POST
/v1/workspaces/:workspaceId/select
curl -X POST https://api.paperinvest.io/v1/workspaces/team_123/select \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"