Update a group
curl --request PATCH \
--url https://fleet-api.flatpeak.com/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Bristol batteries",
"device_ids": [
"dev_63a6087272941ef077a8fd3e"
],
"filter": {
"device_types": [
"BATTERY_STORAGE"
],
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"zone_id": "zon_9b3c5d7e1f2a4b6c8d0e2f4a",
"min_response_seconds": 60,
"max_response_seconds": 600
}
}
'import requests
url = "https://fleet-api.flatpeak.com/groups/{group_id}"
payload = {
"name": "Bristol batteries",
"device_ids": ["dev_63a6087272941ef077a8fd3e"],
"filter": {
"device_types": ["BATTERY_STORAGE"],
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"zone_id": "zon_9b3c5d7e1f2a4b6c8d0e2f4a",
"min_response_seconds": 60,
"max_response_seconds": 600
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Bristol batteries',
device_ids: ['dev_63a6087272941ef077a8fd3e'],
filter: {
device_types: ['BATTERY_STORAGE'],
program_id: 'vpr_5c8d1f2a7b3e4d6c9a0f1b2c',
zone_id: 'zon_9b3c5d7e1f2a4b6c8d0e2f4a',
min_response_seconds: 60,
max_response_seconds: 600
}
})
};
fetch('https://fleet-api.flatpeak.com/groups/{group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet-api.flatpeak.com/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Bristol batteries',
'device_ids' => [
'dev_63a6087272941ef077a8fd3e'
],
'filter' => [
'device_types' => [
'BATTERY_STORAGE'
],
'program_id' => 'vpr_5c8d1f2a7b3e4d6c9a0f1b2c',
'zone_id' => 'zon_9b3c5d7e1f2a4b6c8d0e2f4a',
'min_response_seconds' => 60,
'max_response_seconds' => 600
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fleet-api.flatpeak.com/groups/{group_id}"
payload := strings.NewReader("{\n \"name\": \"Bristol batteries\",\n \"device_ids\": [\n \"dev_63a6087272941ef077a8fd3e\"\n ],\n \"filter\": {\n \"device_types\": [\n \"BATTERY_STORAGE\"\n ],\n \"program_id\": \"vpr_5c8d1f2a7b3e4d6c9a0f1b2c\",\n \"zone_id\": \"zon_9b3c5d7e1f2a4b6c8d0e2f4a\",\n \"min_response_seconds\": 60,\n \"max_response_seconds\": 600\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://fleet-api.flatpeak.com/groups/{group_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bristol batteries\",\n \"device_ids\": [\n \"dev_63a6087272941ef077a8fd3e\"\n ],\n \"filter\": {\n \"device_types\": [\n \"BATTERY_STORAGE\"\n ],\n \"program_id\": \"vpr_5c8d1f2a7b3e4d6c9a0f1b2c\",\n \"zone_id\": \"zon_9b3c5d7e1f2a4b6c8d0e2f4a\",\n \"min_response_seconds\": 60,\n \"max_response_seconds\": 600\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Bristol batteries\",\n \"device_ids\": [\n \"dev_63a6087272941ef077a8fd3e\"\n ],\n \"filter\": {\n \"device_types\": [\n \"BATTERY_STORAGE\"\n ],\n \"program_id\": \"vpr_5c8d1f2a7b3e4d6c9a0f1b2c\",\n \"zone_id\": \"zon_9b3c5d7e1f2a4b6c8d0e2f4a\",\n \"min_response_seconds\": 60,\n \"max_response_seconds\": 600\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "grp_2f6a9c1d8e3b5a7c4d0e9f1a",
"object": "group",
"live_mode": true,
"name": "Bristol batteries",
"filter": {
"device_types": [
"BATTERY_STORAGE"
],
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"zone_id": "zon_9b3c5d7e1f2a4b6c8d0e2f4a",
"min_response_seconds": null,
"max_response_seconds": 600
},
"device_count": 214,
"account_id": "acc_649d465ede6a785d2fa5f905",
"time_created": "2026-08-12T09:30:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Groups
Update a group
Renames the group or replaces its membership: device_ids for an explicit list, filter for a rule. The previous definition is discarded.
PATCH
/
groups
/
{group_id}
Update a group
curl --request PATCH \
--url https://fleet-api.flatpeak.com/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Bristol batteries",
"device_ids": [
"dev_63a6087272941ef077a8fd3e"
],
"filter": {
"device_types": [
"BATTERY_STORAGE"
],
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"zone_id": "zon_9b3c5d7e1f2a4b6c8d0e2f4a",
"min_response_seconds": 60,
"max_response_seconds": 600
}
}
'import requests
url = "https://fleet-api.flatpeak.com/groups/{group_id}"
payload = {
"name": "Bristol batteries",
"device_ids": ["dev_63a6087272941ef077a8fd3e"],
"filter": {
"device_types": ["BATTERY_STORAGE"],
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"zone_id": "zon_9b3c5d7e1f2a4b6c8d0e2f4a",
"min_response_seconds": 60,
"max_response_seconds": 600
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Bristol batteries',
device_ids: ['dev_63a6087272941ef077a8fd3e'],
filter: {
device_types: ['BATTERY_STORAGE'],
program_id: 'vpr_5c8d1f2a7b3e4d6c9a0f1b2c',
zone_id: 'zon_9b3c5d7e1f2a4b6c8d0e2f4a',
min_response_seconds: 60,
max_response_seconds: 600
}
})
};
fetch('https://fleet-api.flatpeak.com/groups/{group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet-api.flatpeak.com/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Bristol batteries',
'device_ids' => [
'dev_63a6087272941ef077a8fd3e'
],
'filter' => [
'device_types' => [
'BATTERY_STORAGE'
],
'program_id' => 'vpr_5c8d1f2a7b3e4d6c9a0f1b2c',
'zone_id' => 'zon_9b3c5d7e1f2a4b6c8d0e2f4a',
'min_response_seconds' => 60,
'max_response_seconds' => 600
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fleet-api.flatpeak.com/groups/{group_id}"
payload := strings.NewReader("{\n \"name\": \"Bristol batteries\",\n \"device_ids\": [\n \"dev_63a6087272941ef077a8fd3e\"\n ],\n \"filter\": {\n \"device_types\": [\n \"BATTERY_STORAGE\"\n ],\n \"program_id\": \"vpr_5c8d1f2a7b3e4d6c9a0f1b2c\",\n \"zone_id\": \"zon_9b3c5d7e1f2a4b6c8d0e2f4a\",\n \"min_response_seconds\": 60,\n \"max_response_seconds\": 600\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://fleet-api.flatpeak.com/groups/{group_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bristol batteries\",\n \"device_ids\": [\n \"dev_63a6087272941ef077a8fd3e\"\n ],\n \"filter\": {\n \"device_types\": [\n \"BATTERY_STORAGE\"\n ],\n \"program_id\": \"vpr_5c8d1f2a7b3e4d6c9a0f1b2c\",\n \"zone_id\": \"zon_9b3c5d7e1f2a4b6c8d0e2f4a\",\n \"min_response_seconds\": 60,\n \"max_response_seconds\": 600\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Bristol batteries\",\n \"device_ids\": [\n \"dev_63a6087272941ef077a8fd3e\"\n ],\n \"filter\": {\n \"device_types\": [\n \"BATTERY_STORAGE\"\n ],\n \"program_id\": \"vpr_5c8d1f2a7b3e4d6c9a0f1b2c\",\n \"zone_id\": \"zon_9b3c5d7e1f2a4b6c8d0e2f4a\",\n \"min_response_seconds\": 60,\n \"max_response_seconds\": 600\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "grp_2f6a9c1d8e3b5a7c4d0e9f1a",
"object": "group",
"live_mode": true,
"name": "Bristol batteries",
"filter": {
"device_types": [
"BATTERY_STORAGE"
],
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"zone_id": "zon_9b3c5d7e1f2a4b6c8d0e2f4a",
"min_response_seconds": null,
"max_response_seconds": 600
},
"device_count": 214,
"account_id": "acc_649d465ede6a785d2fa5f905",
"time_created": "2026-08-12T09:30:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Authorizations
Authenticate with the bearer_token obtained from the authentication endpoint.
Body
application/json
Group fields to update.
Fields to change on a group. All optional; device_ids or filter replaces the membership definition.
Response
Group response.
A named collection of devices for bulk dispatch and aggregated reads. Membership is either an explicit device list or a filter that Flatpeak re-evaluates continuously. Read the members with list all group devices.
Was this page helpful?

