List organizations
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Query parameters
Comma-separated list of relationship paths. A relationship path is a dot-separated list of relationship names. Allowed relationship paths: item_types, item_types.fields, item_types.fieldsets, item_types.singleton_item, account.
"billing_profile,active_subscription,active_subscription.plan"
Returns
Returns an array of resource objects of type organization
Examples
import { buildClient } from "@datocms/dashboard-client";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const organizations = await client.organizations.list();
for (const organization of organizations) { // Check the 'Returned output' tab for the result ☝️ console.log(organization); }}
run();{ id: "124", name: "", meta: { discount_on_public_plans: 20, agency_partner: null }, active_subscription: { type: "per_owner_pricing_subscription", id: "124" }, billing_profile: null,}