# List all warehouse source groups

Returns a paginated list of all Warehouse source groups for your team.

[endpoint]
base_url = "https://warehouse.betterstack.com"
path = "/api/v1/source-groups"
method = "GET"

[[query_param]]
name = "page"
description = "The page number to retrieve. Defaults to 1."
required = false
type = "integer"

[[query_param]]
name = "per_page"
description = "The number of items per page. Defaults to 50, maximum of 100."
required = false
type = "integer"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''A paginated list of Warehouse source groups.'''
body = '''{
  "data": [
    {
      "id": "1234",
      "type": "warehouse_source_group",
      "attributes": {
        "name": "Analytics",
        "created_at": "2025-11-13T10:00:00Z",
        "updated_at": "2025-11-25T20:44:50Z",
        "sort_index": null,
        "team_name": "example-team"
      }
    }
  ],
  "pagination": {
    "first": "https://warehouse.betterstack.com/api/v1/source-groups?page=1",
    "last": "https://warehouse.betterstack.com/api/v1/source-groups?page=1",
    "prev": null,
    "next": null
  }
}'''

[[response]]
status = 401
description = '''Unauthorized'''
body = '''{
  "errors":"Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}'''
[/responses]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url https://warehouse.betterstack.com/api/v1/source-groups \
  --header "Authorization: Bearer $TOKEN"
```
