# List GitHub accounts for Agent source sync

Source: <https://everruns.com/docs/api/operations/list_agent_source_accounts/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Agents & authoring](https://everruns.com/docs/api/groups/agents-authoring/)/List GitHub accounts for Agent source sync

# List GitHub accounts for Agent source sync

Preview

Show the caller’s own GitHub sign-in and the organization’s linked GitHub accounts that source sync can read through, with their repositories. Never the Agent’s runtime GitHub identity.

Public APIEverruns Cloud and self-hosted Platform

GET`/v1/agents/{agent_id}/source/accounts`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**agent_id**

required

string

Prefixed public identifier

## Responses

200Success

### 200

Success

Media typeapplication/json

Development GitHub accounts available to an Agent’s source sync.

object

**available**

required

The deployment has the shared Everruns GitHub App configured.

boolean

**install_url**

Where a person installs the shared Everruns App on another GitHub account.

string | null

**organization**

required

The organization’s links to the shared Everruns GitHub App.

object

**accounts**

required

Linked GitHub accounts.

Array\<string>

**can_connect**

required

The caller may link another GitHub account (organization admins).

boolean

**error**

Why repositories could not be listed, when they could not.

string | null

**repositories**

required

Repositories reachable through the linked installations.

Array\<object>

One repository a development account can reach.

object

**account**

required

GitHub account that owns the repository.

string

**full_name**

required

Repository in owner/name form.

string

**private**

required

boolean

**personal**

required

The caller’s own GitHub sign-in.

object

**connected**

required

The caller has signed in to GitHub.

boolean

**error**

Why repositories could not be listed, when they could not.

string | null

**login**

GitHub login of that sign-in.

string | null

**repositories**

required

Repositories reachable through the shared App’s installations the person can access.

Array\<object>

One repository a development account can reach.

object

**account**

required

GitHub account that owns the repository.

string

**full_name**

required

Repository in owner/name form.

string

**private**

required

boolean

### Example

```json
{
  "organization": {
    "repositories": [
      {
        "account": "acme",
        "full_name": "acme/agents"
      }
    ]
  },
  "personal": {
    "login": "octocat",
    "repositories": [
      {
        "account": "acme",
        "full_name": "acme/agents"
      }
    ]
  }
}
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/agents/example/source/accounts';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/agents/example/source/accounts
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Success

```json
{
  "available": true,
  "organization": {
    "accounts": [
      "string"
    ],
    "can_connect": true,
    "repositories": [
      {}
    ]
  },
  "personal": {
    "connected": true,
    "login": "octocat",
    "repositories": [
      {}
    ]
  }
}
```

## Matching endpoints