---
title: "Create a group"
method: POST
path: "/v1/groups"
tags: ["Groups"]
---

# Create a group

`POST /v1/groups`

## Request

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

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

## Request body

- GroupCreate
  - `program_id` string, required: Prefixed id (`prg_…`)
  - `name` string, required
  - `description` string
  - `landing_url` string, uri
  - `is_private` boolean

## Response `201`

The new 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)
