client.org.list
List organisations visible to the API key.
Signature
class Client {
org: {
list(all?: boolean): Promise<{ orgs: OrgResponse[] }>
}
}
Parameters
| Name | Type | Required | Notes |
|---|---|---|---|
| boolean | no | List all orgs (default: only the current user's) |
Examples
const { orgs } = await bf.org.list()
orgs.forEach(o => console.log(`${o.name} (${o.slug})`))
Throws
| Error | Condition |
|---|---|
| API request failed |
| Network issue |
Pitfalls
- Scope — by default, only orgs the API key has access to are returned
- Admin only —
requires admin-level credentialsall: true
See also
{auto-injected}
Tested against
{auto-injected}