Update group¶
PATCH/
Endpoint API · Endpoint Groups Management
Update endpoint group.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
fields | query | array of string | No | The fields to return in a partial response. |
groupId | path | string (uuid) | Yes | Endpoint group ID. |
Request body¶
Content type: application/json
Request body fields
namestringNew group name.
Must match the pattern
Must match the pattern
^[^#,+"\\<>;]+$. Must be 1–250 characters long.descriptionstringNew group description.
Must match the pattern
Must match the pattern
^[^#,+"\\<>;]+$. Must be at most 1000 characters long.Request samples¶
curl -X PATCH "https://api-<data-region>.central.sophos.com/endpoint/v1/endpoint-groups/<groupId>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
\"name\": \"Finance servers\"
}"
import requests
response = requests.patch(
"https://api-<data-region>.central.sophos.com/endpoint/v1/endpoint-groups/<groupId>",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
json={'name': 'Finance servers'},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
"Content-Type" = "application/json"
}
$body = '{
"name": "Finance servers"
}'
Invoke-RestMethod -Method PATCH -Uri "https://api-<data-region>.central.sophos.com/endpoint/v1/endpoint-groups/<groupId>" -Headers $headers -Body $body -ContentType "application/json"
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, err := http.NewRequest("PATCH", "https://api-<data-region>.central.sophos.com/endpoint/v1/endpoint-groups/<groupId>", strings.NewReader(`{
"name": "Finance servers"
}`))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Tenant-ID", "<tenant-id>")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
const response = await fetch("https://api-<data-region>.central.sophos.com/endpoint/v1/endpoint-groups/<groupId>", {
method: "PATCH",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Finance servers"
}),
});
const data = await response.json();
console.log(data);
Responses¶
200 — Endpoint group updated.¶
Response fields
idstring (uuid)requiredGroup ID.
namestringrequiredGroup name.
Must match the pattern
Must match the pattern
^[^#,+"\\<>;]+$.descriptionstringGroup description.
Must match the pattern
Must match the pattern
^[^#,+"\\<>;]+$.typestring (enum)requiredEndpoint group types.
Must be one of:
Must be one of:
computer, server.endpointsobjectAssociated endpoints.
Show child attributesHide child attributes
totalintegerTotal number of endpoints in this group.
itemsCountintegerTotal number of items in the list.
itemsarray of objectItems must be unique.
Reference to an endpoint.
Show child attributesHide child attributes
idstring (uuid)requiredUnique endpoint ID.
hostnamestringEndpoint hostname.
tenantobjectrequiredReference to a tenant.
Show child attributesHide child attributes
idstring (uuid)requiredTenant ID.
createdAtstring (date-time)When the group was created.
updatedAtstring (date-time)When the group was last updated.
Errors¶
| Status | Meaning |
|---|---|
404 | Endpoint group not found. |
409 | Group names must be unique. You also can't use this API to update groups synced from Active Directory. |
500 | Internal server error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"type": "computer",
"endpoints": {
"total": 0,
"itemsCount": 0,
"items": [
{
"id": "00000000-0000-0000-0000-000000000000",
"hostname": "string"
}
]
},
"tenant": {
"id": "00000000-0000-0000-0000-000000000000"
},
"createdAt": "2026-07-28T00:00:00Z",
"updatedAt": "2026-07-28T00:00:00Z"
}
See the guide for a narrative walkthrough of this API.