---
title: "Create or Update Group"
method: POST
path: "/v2/groups"
tags: ["Groups"]
---

# Create or Update Group

`POST /v2/groups`

## Request

- Base URL: `https://api.village.ai`
- URL: `https://api.village.ai/v2/groups`
- Auth: HTTP bearer

Create a new group or update an existing one. Groups enable network sharing between members. To create: provide a name (id is auto-generated). To update: provide group_id (requires admin permissions). The creator automatically becomes group admin. Returns: group id, name, logo, and invite_link for inviting others.

## Request body

- UpsertGroupRequest: Request body for creating or updating a group
  - `group_id` string
  - `name` string, required
  - `logo` string

## Response `200`

Group created or updated successfully

- object
  - `data` UpsertGroupResponse, required: Response after creating or updating a group
    - `id` string, required
    - `name` string, required
    - `logo` string, nullable, required
    - `invite_link` string, required
  - `metadata` object, required
    - `request_id` string, required

## Other responses

- `400`: Bad request - invalid parameters
- `401`: Unauthorized - missing or invalid authentication
- `404`: Group not found
- `422`: Validation error

---

[API](https://skmtc.dev/village/apis/village-v2-api.md) - [All operations](https://skmtc.dev/village/apis/village-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/village/apis/village-v2-api/revisions/aebe21a1a544?raw)
