> ## Documentation Index
> Fetch the complete documentation index at: https://docs.greenflash.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Organizations

> Browse through all the organizations (companies, teams, etc.) in your workspace. Search for specific organizations or paginate through the full list. Perfect for building admin dashboards or organization management interfaces.

The response includes a `Link` header with URLs for next/previous pages, making pagination straightforward.



## OpenAPI

````yaml https://www.greenflash.ai/api/openapi get /organizations
openapi: 3.1.0
info:
  title: Greenflash API Reference
  version: 1.0.0
  description: >-
    Greenflash endpoints for capturing interactions, managing prompts, and
    identifying users.
servers:
  - url: https://www.greenflash.ai/api/v1
    description: Greenflash API v1
security: []
tags:
  - name: Interactions
    description: Capture interactions between users and AI
  - name: Business Events
    description: Capture business events
  - name: Analytics
    description: Understand chat and agentic interactions analyses
  - name: Inbox
    description: Review flagged conversations
  - name: Segments
    description: Manage user segments
  - name: Prompts
    description: Manage prompts
  - name: Chat
    description: Stream chat and agentic conversations
  - name: Models
    description: Manage AI models
  - name: Products
    description: Manage products
  - name: Users
    description: Manage users
  - name: Organizations
    description: Manage organizations
paths:
  /organizations:
    get:
      tags:
        - Users
        - Organizations
      summary: List Organizations
      description: >-
        Browse through all the organizations (companies, teams, etc.) in your
        workspace. Search for specific organizations or paginate through the
        full list. Perfect for building admin dashboards or organization
        management interfaces.


        The response includes a `Link` header with URLs for next/previous pages,
        making pagination straightforward.
      parameters:
        - schema:
            type: number
            minimum: 1
            maximum: 100
            default: 50
            description: Maximum number of results to return.
          required: false
          description: Maximum number of results to return.
          name: limit
          in: query
        - schema:
            type: number
            minimum: 0
            description: Offset for pagination.
          required: false
          description: Offset for pagination.
          name: offset
          in: query
        - schema:
            type: number
            minimum: 1
            description: Page number (used to derive offset = (page-1)*limit).
          required: false
          description: Page number (used to derive offset = (page-1)*limit).
          name: page
          in: query
      responses:
        '200':
          description: Organizations retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationsResponse'
              example:
                - id: org-001
                  externalId: org-456
                  name: Acme Corporation
                  properties:
                    industry: technology
                  createdAt: '2025-01-15T10:00:00Z'
                  updatedAt: '2025-01-15T10:00:00Z'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the API call was successful (false for errors).
                  error:
                    type: string
                    description: Error message describing what went wrong.
                description: Error response for list organizations operations.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the API call was successful (false for errors).
                  error:
                    type: string
                    description: Error message describing what went wrong.
                description: Error response for list organizations operations.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Greenflash from 'greenflash';

            const client = new Greenflash({
              apiKey: process.env['GREENFLASH_API_KEY'], // This is the default and can be omitted
            });

            const listOrganizationsResponse = await client.organizations.list();

            console.log(listOrganizationsResponse);
        - lang: Python
          source: |-
            import os
            from greenflash import Greenflash

            client = Greenflash(
                api_key=os.environ.get("GREENFLASH_API_KEY"),  # This is the default and can be omitted
            )
            list_organizations_response = client.organizations.list()
            print(list_organizations_response)
components:
  schemas:
    ListOrganizationsResponse:
      type: array
      items:
        $ref: '#/components/schemas/TenantOrganization'
      description: Array of organizations.
    TenantOrganization:
      type: object
      properties:
        id:
          type: string
          description: The Greenflash organization ID.
        externalId:
          type: string
          description: Your external organization ID.
        name:
          type: string
          description: The organization name.
        properties:
          type: object
          additionalProperties: {}
          description: Custom organization properties.
        createdAt:
          type: string
          format: date-time
          description: When the organization was first created.
        updatedAt:
          type: string
          format: date-time
          description: When the organization was last updated.
      required:
        - id
        - properties
      description: The organization that was created or updated.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````