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

# Get Group List

GET https://api.staple.io/v1/groups/list

Get the list of all your groups, their details and the queues that exist in each of the groups.

Reference: https://docs.staple.ai/api-reference/v1/groups/get-group-list

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/groups/list:
    get:
      operationId: getGroupList
      summary: Get Group List
      description: >-
        Get the list of all your groups, their details and the queues that exist
        in each of the groups.
      tags:
        - groups
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Groups_getGroupList_Response_200'
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Groups_getGroupList_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Groups_getGroupList_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples



**Response**

```json
{
  "getGroupsList": [
    {
      "createdAt": 1577369282259,
      "id": 1,
      "name": "Initial reports",
      "queueCount": 5,
      "queues": [
        {
          "accountType": "",
          "createdAt": 1578641364665,
          "customer": "czxczxczxc",
          "docType": "INVOICE",
          "documentCount": 182,
          "gid": 3,
          "id": 14,
          "language": "en",
          "name": "Company account for stationary",
          "supplier": "czxczxc",
          "tags": "",
          "uid": 20
        },
        {
          "accountType": "",
          "createdAt": 1578641372516,
          "customer": "czxczxczxc",
          "docType": "INVOICE",
          "documentCount": 40,
          "gid": 3,
          "id": 15,
          "language": "en",
          "name": "expenses",
          "supplier": "czxczxc",
          "tags": "",
          "uid": 20
        },
        {
          "accountType": "",
          "createdAt": 1578720955737,
          "customer": "",
          "docType": "RECEIPT",
          "documentCount": 25,
          "gid": 3,
          "id": 30,
          "language": "en",
          "name": "Test Q 12",
          "supplier": "",
          "tags": "",
          "uid": 20
        },
        {
          "accountType": "",
          "createdAt": 1584529233813,
          "customer": "",
          "docType": "INVOICE",
          "documentCount": 4,
          "gid": 3,
          "id": 69,
          "language": "en",
          "name": "synchronous",
          "supplier": "",
          "tags": "",
          "uid": 20
        },
        {
          "accountType": "",
          "createdAt": 1586010434014,
          "customer": "test",
          "docType": "MRC",
          "documentCount": 3,
          "gid": 3,
          "id": 118,
          "language": "en",
          "name": "test2",
          "supplier": "test",
          "tags": "",
          "uid": 20
        }
      ],
      "uid": 1
    },
    {
      "createdAt": 1578368846424,
      "id": 2,
      "name": "Luc Group",
      "queueCount": 2,
      "queues": [
        {
          "accountType": "",
          "createdAt": 1588734595763,
          "customer": "",
          "docType": "RECEIPT",
          "documentCount": 3,
          "gid": 8,
          "id": 258,
          "language": "multi",
          "name": "Test Q 01",
          "supplier": "",
          "tags": "",
          "uid": 20
        },
        {
          "accountType": "",
          "createdAt": 1591542331283,
          "customer": "",
          "docType": "INVOICE",
          "documentCount": 7,
          "gid": 8,
          "id": 276,
          "language": "en",
          "name": "Test Q 001",
          "supplier": "",
          "tags": "",
          "uid": 20
        }
      ],
      "uid": 20
    }
  ]
}
```

**SDK Code**

```python Get Group List
import requests

url = "https://api.staple.io/v1/groups/list"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Get Group List
const url = 'https://api.staple.io/v1/groups/list';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go Get Group List
package main

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

func main() {

	url := "https://api.staple.io/v1/groups/list"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby Get Group List
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/groups/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

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

HttpResponse<String> response = Unirest.get("https://api.staple.io/v1/groups/list")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Get Group List
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.staple.io/v1/groups/list', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Get Group List
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/groups/list");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Get Group List
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/groups/list")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```