# List a group's connections

List a group's own connected accounts and accounts that need reauthorization.

`GET https://api.smallworld.sh/api/v1/groups/:groupId/connections`

## Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| groupId | path | string | Yes | Your application's group ID, URL-encoded. At most 512 characters, with no surrounding whitespace or null bytes. |

## Request examples

### curl

```curl
curl --fail-with-body -X GET 'https://api.smallworld.sh/api/v1/groups/team_42/connections' \
  -H "Authorization: Bearer $SMALLWORLD_API_KEY"
```

### typescript

```typescript
const response = await fetch("https://api.smallworld.sh/api/v1/groups/team_42/connections", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
```

### python

```python
response = requests.get(
    "https://api.smallworld.sh/api/v1/groups/team_42/connections",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```

## Responses

Returns items, without a pagination cursor. Returns the shape of a user's connection with userId null: integration, groupId, source (group, or null when not connected), overridesGroup (always false), authScheme, status (connected, needs_reauth, or not_connected), and nullable accountId, accountName, workspaceId, connectedAt, updatedAt, and error. Credentials are never returned.

### 200 · Connected

The group's own account, which members without a connection of their own use. Secret credential values are never returned.

```json
{
  "items": [
    {
      "integration": "github",
      "userId": null,
      "groupId": "team_42",
      "source": "group",
      "overridesGroup": false,
      "authScheme": "api_key",
      "status": "connected",
      "accountId": "654321",
      "accountName": "support-bot",
      "workspaceId": null,
      "connectedAt": "2026-10-10T12:00:01.000Z",
      "updatedAt": "2026-10-10T12:00:01.000Z",
      "error": null
    }
  ]
}
```

### 200 · Needs reauth

The group's credentials no longer work. Connect the group again through a new connect session.

```json
{
  "items": [
    {
      "integration": "github",
      "userId": null,
      "groupId": "team_42",
      "source": "group",
      "overridesGroup": false,
      "authScheme": "api_key",
      "status": "needs_reauth",
      "accountId": "654321",
      "accountName": "support-bot",
      "workspaceId": null,
      "connectedAt": "2026-10-10T12:00:01.000Z",
      "updatedAt": "2026-10-10T12:00:01.000Z",
      "error": "GitHub rejected the stored credentials. Ask the user to connect again."
    }
  ]
}
```

### 200 · Empty

The group has no connections. Disconnected accounts are omitted.

```json
{
  "items": []
}
```

### 400

invalid_request: A parameter is invalid; the message names the problem. Unknown query parameters are rejected.

#### invalid_request

A parameter is invalid; the message names the problem. Unknown query parameters are rejected.

```json
{
  "statusCode": 400,
  "code": "invalid_request",
  "message": "Unknown query parameter: color"
}
```

### 401

authentication_required: The Authorization header is missing or empty. invalid_api_key: The API key is invalid or revoked, or the header doesn't use the Bearer scheme.

#### authentication_required

The Authorization header is missing or empty.

```json
{
  "statusCode": 401,
  "code": "authentication_required",
  "message": "Authentication is required"
}
```

#### invalid_api_key

The API key is invalid or revoked, or the header doesn't use the Bearer scheme.

```json
{
  "statusCode": 401,
  "code": "invalid_api_key",
  "message": "The API key is invalid or revoked"
}
```

### 403

ip_not_allowed: The request came from an address outside the workspace's IP allowlist.

#### ip_not_allowed

The request came from an address outside the workspace's IP allowlist.

```json
{
  "statusCode": 403,
  "code": "ip_not_allowed",
  "message": "The source IP address is not allowed by this account's security settings"
}
```

### 404

group_not_found: The group does not exist in your workspace. Create groups from your backend with POST /groups.

#### group_not_found

The group does not exist in your workspace. Create groups from your backend with POST /groups.

```json
{
  "statusCode": 404,
  "code": "group_not_found",
  "message": "Group not found"
}
```

### 500

internal_error: An unexpected server error.

#### internal_error

An unexpected server error.

```json
{
  "statusCode": 500,
  "code": "internal_error",
  "message": "Internal server error"
}
```

## Notes

- Only the group's own connections are listed, not its members'. Disconnected accounts and built-in integrations are omitted.

- Members without a connection of their own use these accounts in their sessions for this group. GET /users/:userId/connections shows which account a member's calls use.
