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

# List GitHub organizations

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Lists the GitHub accounts you can create the app's repository in: your personal account first, then your organizations alphabetically.

Only accounts with the Base44 GitHub App installed appear, so install it on the account you want before you call this. Your own GitHub account also has to be connected to Base44, which happens in the builder and is not part of this API.

When the app's workspace limits GitHub repositories to approved organizations, this returns only the approved ones. That filtering applies to workspace admins too, so a missing organization does not mean you can't use it. Call [Get GitHub organization policy](/api-reference/get-github-organization-policy) to see whether the limit is on.

Read `repository_selection` before you connect. An account set to `selected` rejects a new repository until its installation covers all repositories.

Pass an account's `login` and `installation_id` to [Connect a GitHub repository](/api-reference/connect-a-github-repository).

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/github/organizations
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/github/organizations:
    get:
      summary: List GitHub organizations
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Lists the GitHub accounts you can create the app's repository in: your
        personal account first, then your organizations alphabetically.


        Only accounts with the Base44 GitHub App installed appear, so install it
        on the account you want before you call this. Your own GitHub account
        also has to be connected to Base44, which happens in the builder and is
        not part of this API.


        When the app's workspace limits GitHub repositories to approved
        organizations, this returns only the approved ones. That filtering
        applies to workspace admins too, so a missing organization does not mean
        you can't use it. Call [Get GitHub organization
        policy](/api-reference/get-github-organization-policy) to see whether
        the limit is on.


        Read `repository_selection` before you connect. An account set to
        `selected` rejects a new repository until its installation covers all
        repositories.


        Pass an account's `login` and `installation_id` to [Connect a GitHub
        repository](/api-reference/connect-a-github-repository).


        <Note>This endpoint accepts a personal API key. Workspace API keys are
        not authorized for it and are rejected with a 403.</Note>
      operationId: get_organizations_api_apps__app_id__github_organizations_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the app whose workspace decides which GitHub organizations
              you can use.
            title: App Id
          description: >-
            ID of the app whose workspace decides which GitHub organizations you
            can use.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: The GitHub accounts you can create the app's repository in.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GitHubOrganization'
                title: GitHubOrganizations
        '400':
          description: Your GitHub account isn't connected to Base44.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: Your workspace plan doesn't include the GitHub integration.
        '403':
          description: >-
            You don't have access to this app, or you used a workspace API key.
            These endpoints take a personal API key.
        '404':
          description: App not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GitHubOrganization:
      properties:
        id:
          type: integer
          title: Id
          description: GitHub's numeric ID for the account.
          example: 1024547
        login:
          type: string
          title: Login
          description: >-
            GitHub username or organization name. Pass it as `org_name` to
            [Connect a GitHub
            repository](/api-reference/connect-a-github-repository).
          example: base44
        avatar_url:
          type: string
          title: Avatar Url
          description: URL of the account's GitHub profile picture.
          example: https://avatars.githubusercontent.com/u/1024547?v=4
        installation_id:
          type: string
          title: Installation Id
          description: >-
            ID of the Base44 GitHub App installation on this account. Pass it as
            `installation_id` to [Connect a GitHub
            repository](/api-reference/connect-a-github-repository).
          example: '58231904'
        type:
          type: string
          enum:
            - User
            - Organization
          title: Type
          description: >-
            `User` for your personal account, `Organization` for an
            organization.
          example: Organization
        repository_selection:
          type: string
          enum:
            - all
            - selected
          title: Repository Selection
          description: >-
            Which repositories the Base44 GitHub App can reach on this account.
            `selected` means it is installed on specific repositories only, so
            creating a new repository under this account fails until you switch
            the installation to all repositories.
          default: all
          example: all
      type: object
      required:
        - id
        - login
        - avatar_url
        - installation_id
        - type
      title: GitHubOrganization
      description: |-
        GitHub organization or user account where the GitHub App is installed.

        Represents an account (organization or personal) where the user has
        installed the GitHub App. Includes installation_id for API calls.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````