---
title: "Get GitHub organization policy"
method: GET
path: "/api/apps/{app_id}/github/org-policy"
---

# Get GitHub organization policy

`GET /api/apps/{app_id}/github/org-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>

## Path parameters

- `app_id` string, required — ID of the app whose workspace decides which GitHub organizations you can use.

## Response `200`

Whether the workspace limits which GitHub organizations you can use.

- GithubOrgPolicyStatus — Whether the app's workspace restricts GitHub orgs (create-repo modal notice).
  - `restricted` boolean, required — `true` when the app's workspace limits GitHub repositories to an approved list of organizations.

## Other responses

- `401` — Missing or invalid credentials.
- `403` — You don't have access to this app, or you used a workspace API key. These endpoints take a personal API key.
- `404` — App not found.
- `422` — Validation Error

---

[API](https://skmtc.dev/idealspot/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/idealspot/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/idealspot/base44-app-management-api/revisions/31ef75eb64ab/schema)
