Account
listOrganizations
List organizations
Lists the organizations visible to the caller's credential. An organization-scoped API key (pbo_) returns exactly the organization it belongs to. A user credential (account-scoped API key or dashboard session token) returns the organizations the user is a member of, including the caller's role in each.
Usage
const result = await api.account.listOrganizations();Parameters
None.
Response
Promise<ListOrganizationsResponse>: organizations visible to the caller.
Example
import { PgBeamClient } from "pgbeam";
const client = new PgBeamClient({
token: "pbk_...",
baseUrl: "https://api.pgbeam.com",
});
const result = await client.api.account.listOrganizations();Errors
| Status | Description |
|---|---|
| 401 | Missing or invalid authentication. |
| 429 | Rate limited. Try again later. |