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

# Get Organization

> Fetch the details of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.



## OpenAPI

````yaml get /api/organization/{organization_id}
openapi: 3.0.3
info:
  title: Trieve API
  description: >-
    Trieve OpenAPI Specification. This document describes all of the operations
    available through the Trieve API.
  contact:
    name: Trieve Team
    url: https://trieve.ai
    email: developers@trieve.ai
  license:
    name: BSL
    url: https://github.com/devflowinc/trieve/blob/main/LICENSE.txt
  version: 0.13.0
servers:
  - url: https://api.trieve.ai
    description: Production server
  - url: http://localhost:8090
    description: Local development server
security: []
tags:
  - name: Invitation
    description: Invitation endpoint. Exists to invite users to an organization.
  - name: Auth
    description: Authentication endpoint. Serves to register and authenticate users.
  - name: User
    description: User endpoint. Enables you to modify user roles and information.
  - name: Organization
    description: >-
      Organization endpoint. Enables you to modify organization roles and
      information.
  - name: Dataset
    description: >-
      Dataset endpoint. Datasets belong to organizations and hold configuration
      information for both client and server. Datasets contain chunks and chunk
      groups.
  - name: Chunk
    description: >-
      Chunk endpoint. Think of chunks as individual searchable units of
      information. The majority of your integration will likely be with the
      Chunk endpoint.
  - name: Chunk Group
    description: >-
      Chunk groups endpoint. Think of a chunk_group as a bookmark folder within
      the dataset.
  - name: Crawl
    description: Crawl endpoint. Used to create and manage crawls for datasets.
  - name: File
    description: >-
      File endpoint. When files are uploaded, they are stored in S3 and broken
      up into chunks with text extraction from Apache Tika. You can upload files
      of pretty much any type up to 1GB in size. See chunking algorithm details
      at `docs.trieve.ai` for more information on how chunking works. Improved
      default chunking is on our roadmap.
  - name: Events
    description: >-
      Notifications endpoint. Files are uploaded asynchronously and events are
      sent to the user when the upload is complete.
  - name: Topic
    description: >-
      Topic chat endpoint. Think of topics as the storage system for gen-ai chat
      memory. Gen AI messages belong to topics.
  - name: Message
    description: >-
      Message chat endpoint. Messages are units belonging to a topic in the
      context of a chat with a LLM. There are system, user, and assistant
      messages.
  - name: Stripe
    description: >-
      Stripe endpoint. Used for the managed SaaS version of this app. Eventually
      this will become a micro-service. Reach out to the team using contact info
      found at `docs.trieve.ai` for more information.
  - name: Health
    description: Health check endpoint. Used to check if the server is up and running.
  - name: Metrics
    description: Metrics endpoint. Used to get information for monitoring
  - name: Analytics
    description: Analytics endpoint. Used to get information for search and RAG analytics
  - name: Experiment
    description: Experiment endpoint. Used to create and manage experiments
paths:
  /api/organization/{organization_id}:
    get:
      tags:
        - Organization
      summary: Get Organization
      description: >-
        Fetch the details of an organization by its id. Auth'ed user or api key
        must have an admin or owner role for the specified dataset's
        organization.
      operationId: get_organization
      parameters:
        - name: TR-Organization
          in: header
          description: The organization id to use for the request
          required: true
          schema:
            type: string
            format: uuid
        - name: organization_id
          in: path
          description: The id of the organization you want to fetch.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Organization with the id that was requested
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationWithSubAndPlan'
        '400':
          description: Service error relating to finding the organization by id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
      security:
        - ApiKey:
            - admin
components:
  schemas:
    OrganizationWithSubAndPlan:
      type: object
      required:
        - organization
      properties:
        organization:
          $ref: '#/components/schemas/Organization'
        plan:
          allOf:
            - $ref: '#/components/schemas/TrievePlan'
          nullable: true
        subscription:
          allOf:
            - $ref: '#/components/schemas/TrieveSubscription'
          nullable: true
      example:
        organization:
          created_at: '2021-01-01 00:00:00.000'
          id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
          name: Trieve
          registerable: true
          updated_at: '2021-01-01 00:00:00.000'
        plan:
          amount: 1000
          chunk_count: 1000
          created_at: '2021-01-01 00:00:00.000'
          dataset_count: 1
          file_storage: 512
          id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
          message_count: 1000
          name: Free
          stripe_id: plan_123
          updated_at: '2021-01-01 00:00:00.000'
          user_count: 5
        subscription:
          created_at: '2021-01-01 00:00:00.000'
          current_period_end: '2021-01-01 00:00:00.000'
          id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
          organization_id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
          plan_id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
          stripe_id: sub_123
          updated_at: '2021-01-01 00:00:00.000'
    ErrorResponseBody:
      type: object
      required:
        - message
      properties:
        message:
          type: string
      example:
        message: Bad Request
    Organization:
      type: object
      required:
        - id
        - name
        - created_at
        - updated_at
        - deleted
        - partner_configuration
      properties:
        created_at:
          type: string
          format: date-time
          description: Timestamp of the creation of the dataset
        deleted:
          type: integer
          format: int32
          description: >-
            Flag to indicate if the organization has been deleted. Deletes are
            handled async after the flag is set so as to avoid expensive search
            index compaction.
        id:
          type: string
          format: uuid
          description: >-
            Unique identifier of the dataset, auto-generated uuid created by
            Trieve
        name:
          type: string
          description: Name of the organization
        partner_configuration:
          description: >-
            Configuration of the organization for the Trieve partner program.
            Contact partnerships@trieve.ai for more details.
        registerable:
          type: boolean
          description: >-
            Flag to indicate whether or not new users may join the organization.
            Default is true.
          nullable: true
        updated_at:
          type: string
          format: date-time
          description: Timestamp of the last update of the dataset
      example:
        created_at: '2021-01-01 00:00:00.000'
        id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        name: Trieve
        partner_configuration:
          COMPANY_NAME: Trieve
          DEMO_DOMAIN: demos.trieve.ai
          FAVICON_URL: https://cdn.trieve.ai/favicon.ico
        registerable: true
        updated_at: '2021-01-01 00:00:00.000'
    TrievePlan:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/StripePlan'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - flat
        - allOf:
            - $ref: '#/components/schemas/StripeUsageBasedPlan'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - usage_based
      discriminator:
        propertyName: type
    TrieveSubscription:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/StripeSubscription'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - flat
        - allOf:
            - $ref: '#/components/schemas/StripeUsageBasedSubscription'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - usage_based
      discriminator:
        propertyName: type
    StripePlan:
      type: object
      required:
        - id
        - stripe_id
        - chunk_count
        - user_count
        - dataset_count
        - message_count
        - amount
        - created_at
        - updated_at
        - name
        - visible
        - file_storage
      properties:
        amount:
          type: integer
          format: int64
        chunk_count:
          type: integer
          format: int32
        created_at:
          type: string
          format: date-time
        dataset_count:
          type: integer
          format: int32
        file_storage:
          type: integer
          format: int64
        id:
          type: string
          format: uuid
        message_count:
          type: integer
          format: int32
        messages_per_month:
          type: integer
          format: int32
          nullable: true
        name:
          type: string
        stripe_id:
          type: string
        updated_at:
          type: string
          format: date-time
        user_count:
          type: integer
          format: int32
        visible:
          type: boolean
      example:
        amount: 1000
        chunk_count: 1000
        created_at: '2021-01-01 00:00:00.000'
        dataset_count: 1
        file_storage: 512
        id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        message_count: 1000
        messages_per_month: 1000
        name: Free
        stripe_id: plan_123
        updated_at: '2021-01-01 00:00:00.000'
        user_count: 5
    StripeUsageBasedPlan:
      type: object
      required:
        - id
        - name
        - visible
        - ingest_tokens_price_id
        - bytes_ingested_price_id
        - search_tokens_price_id
        - message_tokens_price_id
        - analytics_events_price_id
        - ocr_pages_price_id
        - pages_crawls_price_id
        - datasets_price_id
        - users_price_id
        - chunks_stored_price_id
        - files_storage_price_id
        - created_at
      properties:
        analytics_events_price_id:
          type: string
        bytes_ingested_price_id:
          type: string
        chunks_stored_price_id:
          type: string
        created_at:
          type: string
          format: date-time
        datasets_price_id:
          type: string
        files_storage_price_id:
          type: string
        id:
          type: string
          format: uuid
        ingest_tokens_price_id:
          type: string
        message_tokens_price_id:
          type: string
        name:
          type: string
        ocr_pages_price_id:
          type: string
        pages_crawls_price_id:
          type: string
        platform_price_amount:
          type: integer
          format: int32
          nullable: true
        platform_price_id:
          type: string
          nullable: true
        search_tokens_price_id:
          type: string
        users_price_id:
          type: string
        visible:
          type: boolean
      example:
        created_at: '2021-01-01 00:00:00.000'
        current_period_end: '2021-01-01 00:00:00.000'
        id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        organization_id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        plan_id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        stripe_id: sub_123
        updated_at: '2021-01-01 00:00:00.000'
    StripeSubscription:
      type: object
      required:
        - id
        - stripe_id
        - plan_id
        - organization_id
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          format: date-time
        current_period_end:
          type: string
          format: date-time
          nullable: true
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        plan_id:
          type: string
          format: uuid
        stripe_id:
          type: string
        updated_at:
          type: string
          format: date-time
      example:
        created_at: '2021-01-01 00:00:00.000'
        current_period_end: '2021-01-01 00:00:00.000'
        id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        organization_id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        plan_id: e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3
        stripe_id: sub_123
        updated_at: '2021-01-01 00:00:00.000'
    StripeUsageBasedSubscription:
      type: object
      required:
        - id
        - organization_id
        - stripe_subscription_id
        - usage_based_plan_id
        - created_at
        - last_recorded_meter
        - last_cycle_timestamp
        - last_cycle_dataset_count
        - last_cycle_users_count
        - last_cycle_chunks_stored_mb
        - last_cycle_files_storage_mb
      properties:
        created_at:
          type: string
          format: date-time
        current_period_end:
          type: string
          format: date-time
          nullable: true
        id:
          type: string
          format: uuid
        last_cycle_chunks_stored_mb:
          type: integer
          format: int64
        last_cycle_dataset_count:
          type: integer
          format: int64
        last_cycle_files_storage_mb:
          type: integer
          format: int64
        last_cycle_timestamp:
          type: string
          format: date-time
        last_cycle_users_count:
          type: integer
          format: int32
        last_recorded_meter:
          type: string
          format: date-time
        organization_id:
          type: string
          format: uuid
        stripe_subscription_id:
          type: string
        usage_based_plan_id:
          type: string
          format: uuid
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````