> ## 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.

# Get GitHub organization policy

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

Tells you whether the app's workspace limits GitHub repositories to an approved list of organizations.

When `restricted` is `true`, [List GitHub organizations](/api-reference/list-github-organizations) returns only approved organizations, and [Connect a GitHub repository](/api-reference/connect-a-github-repository) answers 403 for any other owner. The approved list itself is managed in workspace settings and is not part of this API.

Workspace owners and admins can connect under any organization while the limit is on, but the organization list they read is filtered the same way, so `restricted` is `true` for them too.

<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/org-policy
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/org-policy:
    get:
      summary: Get GitHub organization policy
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Tells you whether the app's workspace limits GitHub repositories to an
        approved list of organizations.


        When `restricted` is `true`, [List GitHub
        organizations](/api-reference/list-github-organizations) returns only
        approved organizations, and [Connect a GitHub
        repository](/api-reference/connect-a-github-repository) answers 403 for
        any other owner. The approved list itself is managed in workspace
        settings and is not part of this API.


        Workspace owners and admins can connect under any organization while the
        limit is on, but the organization list they read is filtered the same
        way, so `restricted` is `true` for them too.


        <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_org_policy_api_apps__app_id__github_org_policy_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: Whether the workspace limits which GitHub organizations you can use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubOrgPolicyStatus'
        '401':
          description: Missing or invalid credentials.
        '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:
    GithubOrgPolicyStatus:
      properties:
        restricted:
          type: boolean
          title: Restricted
          description: >-
            `true` when the app's workspace limits GitHub repositories to an
            approved list of organizations.
          example: false
      type: object
      required:
        - restricted
      title: GithubOrgPolicyStatus
      description: >-
        Whether the app's workspace restricts GitHub orgs (create-repo modal
        notice).
    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.

````