---
title: "Update a group"
method: POST
path: "/v1/groups/{id}"
tags: ["Groups"]
---

# Update a group

`POST /v1/groups/{id}`

## Request

- Base URL: `https://api.affiliaterail.com`
- URL: `https://api.affiliaterail.com/v1/groups/{id}`
- Auth: HTTP bearer

`is_default: true` makes this the group new partners land in and clears the flag on the previous default.

**Scope:** `partners:write` (or `write`)

## Path parameters

- `id` string, required: Prefixed id (`grp_…`)

## Request body

- GroupUpdate
  - `name` string
  - `description` string, nullable
  - `landing_url` string, uri, nullable
  - `is_private` boolean
  - `is_default` true

## Response `200`

The updated group

- Group
  - `id` string, required: Prefixed id (`grp_…`)
  - `object` 'group', required
  - `program_id` string, required: Prefixed id (`prg_…`)
  - `name` string, required
  - `slug` string, required
  - `description` string, nullable, required
  - `landing_url` string, nullable, required
  - `is_private` boolean, required
  - `is_default` boolean, required
  - `stats` object
    - `partners` integer, required
  - `created_at` string, date-time, required: ISO-8601, UTC
  - `updated_at` string, date-time, required: ISO-8601, UTC

## Other responses

- `400`: Invalid request
- `401`: Missing or unknown API key
- `403`: Key lacks the required scope
- `404`: No such object in your organization
- `422`: The request was understood and refused
- `429`: Rate limited: see Retry-After

---

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