Skip to content

List teams

The teams in a company you can see, with search, sorting, filters and membership counts.

On this page

The teams in a company, with their custom fields and how many people are on each. Search them, sort them, narrow them to the teams of one person or several, and page through the result.

The accounts you can act under are on Get identity, which already returns them. This endpoint answers a different question: what teams exist in a company, and who is on them.

GEThttps://api2.rundiffusion.com/api/v2/teams
AcceptsOAuth device flowCompany API Access Token

Who sees what

What comes back depends on who is asking:

The callerWhat comes back
MANAGE_TEAMS on the companyEvery team in the company
Anyone elseThe teams they have joined
Someone who has joined none of the company's teams403 PERMISSION_DENIED

A Company API Access Token acts as the member it was made for, so it reads what that member would read with their own sign-in.

MANAGE_TEAMS comes from the caller's company role, which is a separate grant from their team role. Get identity returns it under company_permissions, not in the permissions map beside it. See Two roles, two maps. MANAGE_COMPANY on its own does not widen this listing. To read everyone in the company, use List members.

Request

Headers

AuthorizationstringRequired
Bearer token. This endpoint accepts an OAuth device flow token or a Company API Access Token. A Personal API Access Token is refused, because it reaches only its owner's own resources and is not scoped to a company. See Authentication.Authorization: Bearer eyJhbGciOi…

Query

company_idstringoptional
The company to read. Required with OAuth, which names a person rather than a company. A Company API Access Token already names its company, so it does not need this. Get identity returns it on every TEAM account.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…
cursorstringoptional
Opaque pagination token. When a response has has_more true, pass its next_cursor here to get the following page. Do not construct or parse one.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&cursor=eyJ2IjoxL…
limitintegeroptionaldefault 24
Teams per page, from 1 to 100.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&limit=50
sortstringoptionaldefault created
Result order. created is when the team was made, name ignores case, member_count counts the members who have joined, and custom_field orders by the value of the field named in custom_field_key. Teams with no creation time, or no value for the field, sort last in either direction. Ties always break on the team ID, so two pages never overlap.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&sort=name
orderstringoptional
Which direction sort runs in. Defaults to desc for created, which is newest first, and to asc for every other sort.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&sort=member_count&order=desc
custom_field_keystringoptional
The key of the company custom field to sort by. Required with sort=custom_field, and refused as a 400 without it. Every team's custom_fields lists the keys.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&sort=custom_field&custom_field_key=project_number
qstringoptional
Case-insensitive substring match on the team name or on the value of any custom field the company defines, up to 200 characters. Percent and underscore match themselves rather than acting as wildcards.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&q=studio
is_activebooleanoptional
Filter by activation state. true returns activated teams, false returns deactivated ones. Omit it to get both, which is the default.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&is_active=true
member_emailstringoptionalAccepts multiple
Only the teams these addresses have a membership on, joined or pending, as exact and case-insensitive matches. One address, or several separated by commas, up to 100. With one address, each team carries that membership in membership; with several, membership is null. See One person's teams.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&member_email=sam@example.com,lee@example.com
member_statusstringoptional
Used with member_email. joined returns the teams they have joined, pending the teams they are invited to. Omit it for both.https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&member_email=sam@example.com&member_status=joined
curl "https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&sort=name&q=studio" \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"

Naming the company

A Company API Access Token already names the company it acts on, so it needs no parameter:

bash
curl "https://api2.rundiffusion.com/api/v2/teams" \
  -H "Authorization: Bearer $RUNDIFFUSION_COMPANY_TOKEN"

OAuth is a user credential with no company of its own, and a user can belong to teams in more than one company, so there is nothing to infer. Name the company with company_id, which Get identity returns on every TEAM account:

bash
curl "https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…" \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"

Note that company_id is not the account selection team_id performs everywhere else: this endpoint answers for a company, never for one team inside it.

A Personal API Access Token is refused.

Searching, filtering and sorting

q matches the team name and the value of every custom field the company defines, so a search for a project number finds its team:

bash
curl "https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&q=P-1042" \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"

The filters combine with it and with each other: is_active picks activated or deactivated teams, and member_email narrows the list to the teams of one person or several.

Results are newest first unless you sort otherwise. sort=name ignores case, sort=member_count puts the largest teams first with order=desc, and sort=custom_field orders by one field, named in custom_field_key:

bash
curl "https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&sort=custom_field&custom_field_key=project_number" \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"

Response

200 OK with one page of teams.

json
{
  "data": [
    {
      "id": "2D8NEx…",
      "created": "2026-03-14T09:02:11+00:00",
      "name": "Design Studio",
      "is_active": true,
      "custom_fields": [
        { "key": "project_number", "label": "Project #", "value": "P-1042" }
      ],
      "member_count": 12,
      "pending_count": 2,
      "membership": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}
dataarray
The teams on this page. Empty when nothing matches, which is not an error.
has_moreboolean
Whether more pages exist beyond this one. This is the flag to branch on when paging.
next_cursorstring | null
Pass this back as cursor to fetch the next page. Null on the last page.

Team object

idstring
The team ID. This is the value you send as team_id on the endpoints that take an account selection.
createdstring (ISO 8601) | null
When the team was created, in UTC.
namestring | null
The team's display name.
is_activeboolean
Whether the team is activated. A deactivated team still appears here unless you filter it out.
custom_fieldsarray
Every custom field the company defines for its teams, in the company's order, with this team's value. See Custom fields.
member_countinteger
How many members have joined the team.
pending_countinteger
How many invitations to the team are still outstanding.
membershipobject | null
The membership of the person named in member_email, when it names exactly one address. null otherwise.

Custom fields

A company can define its own fields for its teams, such as a project number or a cost center, and every team carries all of them. Each entry has the field's key, the label people see, and this team's value:

keystring
The field's key, which is what custom_field_key takes.
labelstring | null
The field's name as the company defines it, such as Project
valuestring | null
This team's value, or null when it has none.

Only the fields the company currently defines are listed, in the order the company defines them. A value left behind by a field that has since been removed is neither returned nor searched.

Members

The listing counts each team's people (member_count, pending_count) but does not list them. List a team's members pages through one team's people with their roles, and searches and filters them. Get a team returns one team's whole membership at once.

One person's teams

member_email turns the listing into one person's teams. Each team then carries their membership: when they joined, whether they are still invited, and their role on that team.

bash
curl "https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&member_email=sam@example.com" \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"
json
{
  "id": "2D8NEx…",
  "name": "Design Studio",
  "membership": {
    "joined": "2026-03-14T09:04:52+00:00",
    "invited": "2026-03-14T09:03:40+00:00",
    "is_pending": false,
    "team_role": { "id": "Rk7Vq2…", "name": "Editor" }
  }
}
joinedstring (ISO 8601) | null
When the person joined this team, in UTC, or null while the invitation is pending.
invitedstring (ISO 8601) | null
When the invitation was created, in UTC.
is_pendingboolean
Whether the invitation is still outstanding.
team_roleobject | null
The person's role on this team, with id and name. Once they have joined it is the role they hold; while the invitation is pending it is the role the invitation will grant. null when there is none.

The filter applies inside what you can see, like everything else here. A holder of MANAGE_TEAMS gets every team the person is on; anyone else gets the teams they share with them.

Several people's teams

Send several addresses, separated by commas, for the teams any of those people is on. Each team is listed once:

bash
curl "https://api2.rundiffusion.com/api/v2/teams?company_id=Cm4pQ7…&member_email=sam@example.com,lee@example.com" \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"

member_status applies to them all: joined keeps the teams any of them has joined, and pending the teams any of them is invited to. With several people there is no single membership to report, so membership is null on every team. Ask about one address when you need it.

Freshness

This listing is read from a copy of the data that trails live changes by up to about 20 seconds. A team created a moment ago, or a member who just joined, may not be reflected yet. Get a team reads live, so use it right after a change you need to confirm.

Paging

Cursor paginated, the same way as every other listing. Read has_more, and when it is true send next_cursor back as cursor.

A cursor belongs to the listing it was issued for: the company, the sort, the order and every filter. Change any of them partway through a walk and the cursor returns 400 INVALID_CURSOR rather than quietly resuming somewhere else in a different result set, so keep them constant for the length of a walk.

Two things deliberately do not invalidate a cursor. limit may change between pages, because a cursor is a position and not an offset. And your scope is re-applied to every request, so a cursor is never a way to reach teams you could not otherwise see.

A page never says how many teams there are in all.

Errors

Status codes

400INVALID_REQUEST
A query parameter failed validation, such as a limit above 100, a sort this endpoint does not offer, or sort=custom_field without custom_field_key. details names the field.
400INVALID_CURSOR
The cursor no longer matches this listing, which happens if you change the sort, the order or a filter partway through a walk. Restart the walk without a cursor.
401TOKEN_INVALID
Missing or unrecognized token, or a Personal API Access Token, which this endpoint refuses because it is not scoped to a company.
401TOKEN_EXPIRED
The OAuth token has expired. Refresh it and retry.
403PERMISSION_DENIED
The caller has joined none of the company's teams and does not hold MANAGE_TEAMS on it, or presented a user credential without naming a company. The message says which.
429RATE_LIMITED
Too many requests. See Rate limits.

View as Markdown