> ## Documentation Index
> Fetch the complete documentation index at: https://docs.riseworks.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Teams & Talent

> List teams and manage contractors

<Note>
  All team endpoints here require `Authorization: Bearer <jwt>` — see [Authentication](/v1-legacy/authentication).
</Note>

<Note>
  `teamId`/`talentId` accept a legacy numeric id, V1 RiseID, V2 RiseID, RiseAccount address, or nanoid interchangeably — see [Identifier formats](/v1-legacy/overview#identifier-formats).
</Note>

## List teams

**GET** `/v1/teams`

Lists every team the authenticated user is associated with (as payer or admin).

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://b2b-api.riseworks.io/v1/teams" \
    -H "Authorization: Bearer <jwt>"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": [
      {
        "id": "123",
        "riseId": "te-abc123def456",
        "name": "Engineering Team",
        "owner": "us-xyz789abc123",
        "address1": null,
        "address2": null,
        "city": null,
        "state": null,
        "zip": null,
        "country": "US",
        "phone": null,
        "website": null,
        "avatar": null,
        "colors": null,
        "tax_id": null,
        "usWork": 1,
        "hasAMLCheck": true,
        "incorporationState": null,
        "incorporationType": null,
        "created_at": "2024-01-01T00:00:00.000Z",
        "updated_at": "2024-01-01T00:00:00.000Z"
      }
    ]
  }
  ```
</ResponseExample>

<Warning>
  Returns `403 Forbidden` in the [B2B\_ACCESS\_DENIED envelope](/v1-legacy/overview#response-format) if the user has team memberships but every owning company is disabled for B2B API access — matching V1's original behavior. If the user simply has no team memberships at all, this returns `200` with `"data": []`, not a 403. Teams owned by a company with no B2B-access record at all (never explicitly enabled or disabled) are also silently left out of `data` rather than causing an error.
</Warning>

**SDK:**

```javascript theme={null}
const teams = await client.v1Legacy.listTeams();
```

## List team talent

**GET** `/v1/teams/{teamId}/talent`

Lists a team's contractors, optionally filtered by email and paginated. Only `contractor`/`aor_contractor` roles are included — `team_employee` members exist on the team but never appear here (they also can't be looked up via [Get a single talent](#get-a-single-talent) below, though they *can* be removed via [DELETE](#remove-a-talent-from-a-team)).

<ParamField path="teamId" type="string" required>Legacy numeric id, V1/V2 RiseID, RiseAccount address, or team nanoid.</ParamField>
<ParamField query="email" type="string">Filter talent by email.</ParamField>
<ParamField query="page" type="number">1-indexed page number. Pagination only activates when `page` or `offset` is set.</ParamField>
<ParamField query="offset" type="number">Row offset (alternative to `page`).</ParamField>
<ParamField query="count" type="number">Page size, 1–500 (default 100).</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://b2b-api.riseworks.io/v1/teams/te-abc123def456/talent?email=contractor@example.com" \
    -H "Authorization: Bearer <jwt>"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": [
      {
        "id": "456",
        "nanoid": "us-xyz789abc123",
        "riseId": "us-xyz789abc123",
        "email": "contractor@example.com",
        "firstname": "Jane",
        "lastname": "Doe",
        "middlename": null,
        "alias": null,
        "role": "contractor",
        "phone": null,
        "avatar": null,
        "city": null,
        "state": null,
        "country": null,
        "usWork": 0,
        "hasKYC": 1,
        "hasPSASigned": true,
        "external_reference_id": null,
        "created_at": "2024-01-01T00:00:00.000Z",
        "updated_at": "2024-01-01T00:00:00.000Z"
      }
    ]
  }
  ```

  When `page`/`offset` is supplied, a `pagination` object is also included:

  ```json theme={null}
  {
    "data": [ ],
    "pagination": {
      "page": 1,
      "count": 100,
      "offset": 0,
      "has_more": false,
      "next_page": null,
      "next_offset": null
    }
  }
  ```
</ResponseExample>

<Note>
  If a talent owns their own company, their object also includes a `company` field with that company's data. The key is **omitted entirely** when there's no owned company — it's never present-but-`null`.
</Note>

**SDK:**

```javascript theme={null}
const talent = await client.v1Legacy.listTalent('te-abc123def456', { email: 'contractor@example.com' });
```

## Get a single talent

**GET** `/v1/teams/{teamId}/talent/{talentId}`

<ParamField path="teamId" type="string" required>Legacy numeric id, V1/V2 RiseID, RiseAccount address, or team nanoid.</ParamField>
<ParamField path="talentId" type="string" required>Legacy numeric id, V1/V2 RiseID, RiseAccount address, or user nanoid.</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://b2b-api.riseworks.io/v1/teams/te-abc123def456/talent/us-xyz789abc123" \
    -H "Authorization: Bearer <jwt>"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "id": "456",
      "nanoid": "us-xyz789abc123",
      "email": "contractor@example.com",
      "firstname": "Jane",
      "lastname": "Doe",
      "role": "contractor"
    }
  }
  ```
</ResponseExample>

Same object shape as one item from [List team talent](#list-team-talent) — including the conditional `company` field.

**SDK:**

```javascript theme={null}
const talent = await client.v1Legacy.getTalent('te-abc123def456', 'us-xyz789abc123');
```

## Remove a talent from a team

**DELETE** `/v1/teams/{teamId}/talent/{talentId}`

Terminates the relationship. Valid for `contractor`, `aor_contractor`, and `team_employee` roles — a broader set than [List team talent](#list-team-talent)/[Get a single talent](#get-a-single-talent), which only ever surface `contractor`/`aor_contractor`. This means a `team_employee` can be removed via this endpoint even though they never appear in those other two.

<ParamField path="teamId" type="string" required>Legacy numeric id, V1/V2 RiseID, RiseAccount address, or team nanoid.</ParamField>
<ParamField path="talentId" type="string" required>Legacy numeric id, V1/V2 RiseID, RiseAccount address, or user nanoid.</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X DELETE "https://b2b-api.riseworks.io/v1/teams/te-abc123def456/talent/us-xyz789abc123" \
    -H "Authorization: Bearer <jwt>"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": "ok"
  }
  ```
</ResponseExample>

**SDK:**

```javascript theme={null}
await client.v1Legacy.removeTalent('te-abc123def456', 'us-xyz789abc123');
```

## Errors

| Status | Cause                                                                            |
| ------ | -------------------------------------------------------------------------------- |
| `400`  | Invalid `teamId`/`talentId` format, or the talent isn't a contractor (`DELETE`). |
| `401`  | Missing or expired JWT.                                                          |
| `403`  | Caller lacks `READ_TEAM_PAYROLL`/`WRITE_TEAM_PAYROLL` permission on the team.    |
| `404`  | Team or talent not found.                                                        |

Still stuck? See [Troubleshooting](/v1-legacy/troubleshooting).
