---
title: "List GitHub CI Visibility status"
method: GET
path: "/api/v2/ci/github/accounts"
tags: ["CI Visibility GitHub Accounts"]
---

# List GitHub CI Visibility status

`GET /api/v2/ci/github/accounts`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/ci/github/accounts`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `integrations_read`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/ci/github/accounts/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve the list of GitHub accounts (organizations or users) available to this Datadog organization
through its GitHub App installation, along with each account's and repository's CI Visibility opt-in status.

## Response `200`

OK

- CIAppGitHubAccountsResponse: Response object containing a list of GitHub accounts and their CI Visibility opt-in status.
  - `data` CIAppGitHubAccountData[], required
    - `attributes` CIAppGitHubAccountAttributes, required: Attributes describing a GitHub account's CI Visibility opt-in status.
      - `account` string: The GitHub account (organization or user) name.
      - `enabled` boolean: Whether CI Visibility is enabled at the account level.
      - `host` string: The GitHub host (`github.com` or a GitHub Enterprise Server (GHES) hostname) this account belongs to.
      - `repo_count` integer: The number of repositories known for this account.
      - `repositories` CIAppGitHubAccountRepository[]: The repositories belonging to this account, with their individual opt-in status.
        - `enabled` boolean: Whether CI Visibility is enabled for this repository.
        - `name` string: The repository name.
    - `id` string, required: The account's unique identifier, in the form `<host>/<account name>` (for example `github.com/datadog`).
    - `type` 'ci_github_account', required: JSON:API type for the GitHub account resource. The value must always be `ci_github_account`.

## Other responses

- `400`: Bad Request
- `403`: Not Authorized
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
