## List Organizations `client.user.organizations.list(OrganizationListParamsquery?, RequestOptionsoptions?): V4PagePaginationArray` **get** `/user/organizations` Lists organizations the user is associated with. ### Parameters - `query: OrganizationListParams` - `direction?: "asc" | "desc"` Direction to order organizations. - `"asc"` - `"desc"` - `match?: "any" | "all"` Whether to match all search requirements or at least one (any). - `"any"` - `"all"` - `name?: string` Organization name. - `order?: "id" | "name" | "status"` Field to order organizations by. - `"id"` - `"name"` - `"status"` - `page?: number` Page number of paginated results. - `per_page?: number` Number of organizations per page. - `status?: "member" | "invited"` Whether the user is a member of the organization or has an inivitation pending. - `"member"` - `"invited"` ### Returns - `Organization` - `id?: string` Identifier - `name?: string` Organization name. - `permissions?: Array` Access permissions for this User. - `roles?: Array` List of roles that a user has within an organization. - `status?: Status` Whether the user is a member of the organization or has an invitation pending. - `"member"` - `"invited"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const organization of client.user.organizations.list()) { console.log(organization.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "name": "Cloudflare, Inc.", "permissions": [ "#zones:read" ], "roles": [ "All Privileges - Super Administrator" ], "status": "member" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ```