> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://uploadcare.com/docs/_mcp/server.

# List of groups

GET https://api.uploadcare.com/groups/

Get a paginated list of groups.

Reference: https://uploadcare.com/docs/api/rest/group/groups-list

## Authentication

- `Authorization` header (required) — Every request made to `https://api.uploadcare.com/` MUST be signed. HTTPS SHOULD be used with any authorization scheme. Requests MUST contain the `Authorization` header defining `auth-scheme` and `auth-param`: `Authorization: auth-scheme auth-param`. Every request MUST contain the `Accept` header identifying the REST API version: `Accept: application/vnd.uploadcare-v0.7+json`. There are two available authorization schemes: * For production: `Uploadcare`, a scheme where a `signature`, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend. * For quick tests: `Uploadcare.Simple`, a simple scheme where your [Secret API Key](https://app.uploadcare.com/projects/-/api-keys/) MUST be specified in every request's `auth-param`.

## Request

### Query parameters

- `limit` (integer, optional) — A preferred amount of groups in a list for a single response. Defaults to 100, while the maximum is 1000.
- `from` (datetime, optional) — A starting point for filtering the list of groups. If passed, MUST be a date and time value in ISO-8601 format.
- `ordering` (enum, optional, default: datetime_created) — Specifies the way groups should be sorted in the returned list. `datetime_created` for the ascending order (default), `-datetime_created` for the descending one.
  - Allowed values: `datetime_created`, `-datetime_created`

### Headers

- `Accept` (enum, required) — Version header.
  - Allowed values: `application/vnd.uploadcare-v0.7+json`

## Response

### 200

A list of groups, paginated.

- `next` (string, optional, nullable) — Next page URL.
- `previous` (string, optional, nullable) — Previous page URL.
- `total` (integer, optional) — Total number of groups in the project.
- `per_page` (integer, optional) — Number of groups per page.
- `results` (list of group, optional)

## Errors

### 400 Bad Request Error

Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead.

- `detail` (string, optional, default: Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead.)

### 401 Unauthorized Error

Authorization errors.

- `detail` (enum, optional)
  - Allowed values: `Incorrect authentication credentials.`, `Public key {public_key} not found.`, `Secret key not found.`, `Invalid signature. Please check your Secret key.`

### 406 Not Acceptable Error

Invalid version header `Accept` for this endpoint.

- `detail` (string, optional, default: Incorrect Accept header provided. Make sure to specify API version. Refer to REST API docs for details.)

### 429 Too Many Requests Error

Request was throttled.

- `detail` (string, optional)

## Types

### group

- `id` (string, optional) — Group's identifier.
- `datetime_created` (datetime, optional) — ISO-8601 date and time when the group was created.
- `files_count` (integer, optional) — Number of the files in the group.
- `cdn_url` (string, optional) — Group's CDN URL.
- `url` (string, optional) — Group's API resource URL.

## Examples

**Response**

```json
{
  "next": "https://api.uploadcare.com/groups/?limit=3&from=2016-11-09T14%3A30%3A22.421889%2B00%3A00&offset=0",
  "previous": null,
  "total": 100,
  "per_page": 2,
  "results": [
    {
      "id": "dd43982b-5447-44b2-86f6-1c3b52afa0ff~1",
      "datetime_created": "2018-11-27T14:14:37.583654Z",
      "files_count": 1,
      "cdn_url": "https://ucarecdn.com/dd43982b-5447-44b2-86f6-1c3b52afa0ff~1/",
      "url": "https://api.uploadcare.com/groups/dd43982b-5447-44b2-86f6-1c3b52afa0ff~1/"
    },
    {
      "id": "fd59dbcb-40a1-4f3a-8062-cc7d23f66885~1",
      "datetime_created": "2018-11-27T15:14:39.586674Z",
      "files_count": 1,
      "cdn_url": "https://ucarecdn.com/fd59dbcb-40a1-4f3a-8062-cc7d23f66885~1/",
      "url": "https://api.uploadcare.com/groups/fd59dbcb-40a1-4f3a-8062-cc7d23f66885~1/"
    }
  ]
}
```

**SDK Code**

```javascript JS
import {
  listOfGroups,
  UploadcareSimpleAuthSchema,
} from '@uploadcare/rest-client';

const uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({
  publicKey: 'YOUR_PUBLIC_KEY',
  secretKey: 'YOUR_SECRET_KEY',
});

const result = await listOfGroups({}, { authSchema: uploadcareSimpleAuthSchema })

```

```php PHP
<?php
$configuration = Uploadcare\Configuration::create((string) $_ENV['UPLOADCARE_PUBLIC_KEY'], (string) $_ENV['UPLOADCARE_SECRET_KEY']);

$api = (new Uploadcare\Api($configuration))->group();
$list = $api->listGroups();
foreach ($list->getResults() as $group) {
    \sprintf('Group URL: %s, ID: %s', $group->getUrl(), $group->getUuid());
}
while (($next = $api->nextPage($list)) !== null) {
    foreach ($next->getResults() as $group) {
        \sprintf('Group URL: %s, ID: %s', $group->getUrl(), $group->getUuid());
    }
}

```

```python Python
from pyuploadcare import Uploadcare
uploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')

groups_list = uploadcare.list_file_groups()
print('Number of groups is', groups_list.count())

```

```ruby Ruby
require 'uploadcare'
Uploadcare.config.public_key = 'YOUR_PUBLIC_KEY'
Uploadcare.config.secret_key = 'YOUR_SECRET_KEY'

groups = Uploadcare::GroupList.list(limit: 10)
groups.each { |group| puts group.inspect }

```

```swift Swift
import Uploadcare

let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY")

let query = GroupsListQuery()
  .limit(10)
  .ordering(.datetimeCreatedDESC)
  
let groupsList = uploadcare.listOfGroups()

let list = try await groupsList.get(withQuery: query)
print(list)

// Next page
let next = try await groupsList.nextPage()
print(list)

// Previous page
let previous = try await groupsList.previousPage()
print(list)

```

```kotlin Kotlin
import com.uploadcare.android.library.api.UploadcareClient

val uploadcare = UploadcareClient(publicKey = "YOUR_PUBLIC_KEY", secretKey = "YOUR_SECRET_KEY")

val groupsQueryBuilder = uploadcare.getGroups()
val groups = groupsQueryBuilder
    .ordering(Order.UPLOAD_TIME_DESC)
    .asList()
Log.d("TAG", groups.toString())

```

```go List
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.uploadcare.com/groups/?from=2015-01-02T10%3A00%3A00.463352Z&limit=150&ordering=-datetime_created"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/vnd.uploadcare-v0.7+json")
	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java List
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.uploadcare.com/groups/?from=2015-01-02T10%3A00%3A00.463352Z&limit=150&ordering=-datetime_created")
  .header("Accept", "application/vnd.uploadcare-v0.7+json")
  .header("Authorization", "<apiKey>")
  .asString();
```

```csharp List
using RestSharp;

var client = new RestClient("https://api.uploadcare.com/groups/?from=2015-01-02T10%3A00%3A00.463352Z&limit=150&ordering=-datetime_created");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/vnd.uploadcare-v0.7+json");
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```