> ## 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`, you can create the app's repository only under one of the approved organizations. The approved list itself is managed in workspace settings.

Workspace owners and admins can connect under any organization, even when the policy restricts organizations for other users. However, the organization list they read is filtered by the restriction policy, so [List GitHub organizations](/api-reference/list-github-organizations) returns the same list for them as it does for other users.



## 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`, you can create the app's repository only
        under one of the approved organizations. The approved list itself is
        managed in workspace settings.


        Workspace owners and admins can connect under any organization, even
        when the policy restricts organizations for other users. However, the
        organization list they read is filtered by the restriction policy, so
        [List GitHub organizations](/api-reference/list-github-organizations)
        returns the same list for them as it does for other users.
      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.
components:
  schemas:
    GithubOrgPolicyStatus:
      properties:
        restricted:
          type: boolean
          title: Restricted
          description: >-
            Whether 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 limits which GitHub organizations it can
        use.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````