---
title: "Update Group"
method: PUT
path: "/v1/farm/{farm_id}/groups/{group_id}"
tags: ["groups"]
---

# Update Group

`PUT /v1/farm/{farm_id}/groups/{group_id}`

## Request

- Base URL: `https://api.ranch.bot`
- URL: `https://api.ranch.bot/v1/farm/{farm_id}/groups/{group_id}`
- Auth: HTTP bearer

Current groups HTTP operation. External credential scopes: write:groups. Minimum farm role: EDITOR. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window per device account, 1000 per browser session, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429. Update the group name/description and/or add animals. animal_ids is additive: it connects the listed animals and never removes existing members. Omit animal_ids (or send []) to leave membership unchanged. Every requested animal must be an active animal on this farm; any unknown, archived or other-farm animal rejects the whole request. A request with a nonempty animal_ids cannot be undone.

## Path parameters

- `farm_id` string, uuid, required
- `group_id` string, uuid, required

## Request body

- object
  - `name` string
  - `description` string
  - `animal_ids` string[]: Animal UUIDs to ADD to the group (additive; existing members are preserved). Omit or pass [] to leave membership unchanged. Cannot be undone.

## Response `200`

Success

- object
  - `id` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `name` string, required
  - `is_active` boolean, required
  - `farm_id` string, required
  - `description` string, nullable, required

## Other responses

- `400`: Request validation failed.
- `401`: Missing/invalid authentication or insufficient farm role.
- `403`: Missing required scope or credential type is disallowed.
- `404`: Resource or active farm membership not found.
- `429`: Rate limit exceeded. Retry after the indicated delay.
- `500`: Unexpected server failure.

---

[API](https://skmtc.dev/ranch/apis/ranch-bot-http-api.md) · [All operations](https://skmtc.dev/ranch/apis/ranch-bot-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranch/apis/ranch-bot-http-api/revisions/24109d33fa02?raw)
