Skip to content

hailer.team

MethodHost opReturns
list()team.listPromise<TeamsByWorkspace>

list()

Teams the app can see, keyed by workspace id.

ts
const teamsByWorkspace = await hailer.team.list();
// { [workspaceId]: { _id, name }[] }
  • Workspace app — only the app's workspace key is present.
  • Private app — every workspace the user belongs to is a key.

Iterate the keys rather than assuming a single workspace. See Private vs workspace apps.

Hailer Developer Documentation