GET /groups

List all groups.

This request retrieves a list of all groups associated with the authenticated company.

curl -XGET \
--header "Content-Type: application/json" \
--header "Authorization: Bearer your_api_token_here" \
https://api.invisiblecollector.com/groups
require "net/https"
require "uri"

uri = URI.parse("https://api.invisiblecollector.com/groups")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer your_api_token_here'

response = http.request(request)
import com.ic.invisiblecollector.IcApiFacade;
import com.ic.invisiblecollector.model.Group;

IcApiFacade apiFacade = new IcApiFacade("your_api_token_here");
List<Group> groups = apiFacade.listGroups();
using InvisibleCollectorLib;
using System.Collections.Generic;

var ic = new InvisibleCollector("your_api_token_here");
List<Group> groups = await ic.ListGroupsAsync();
iC, err := ic.NewInvisibleCollector("your_api_token_here", ic.InvisibleCollectorUri)

var channel = make(chan []ic.Group)
go iC.ListGroups(channel)
groups := <-channel

fmt.Println(groups)

This request does not require a request body.

Endpoint

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

Response body

If successful, this request will return a JSON array of groups:

[
  {
    "id": "1234567890",
    "name": "Group 1"
  },
  {
    "id": "0987654321",
    "name": "Group 2"
  }
]

Errors

This endpoint may return the following errors

HTTP Code Description
401 Unauthorized - Invalid credentials were supplied.