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

# Create a contact group

`POST /v1/contact-groups`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/contact-groups`
- Auth: API key in header `x-api-key`

Creates a new contact group and returns it with a 201 status.

## Request body

- object
  - `name` string, required
  - `description` string, nullable
  - `type` 'static' | 'dynamic' | 'smart', nullable
  - `criteria` object, nullable
  - `color` 'clay' | 'sand' | 'moss' | 'sky' | 'plum' | 'rose', nullable
  - `icon` string, nullable
  - `parentGroupId` string
  - `isActive` boolean, nullable

## Response `201`

Success

- object
  - `id` string, required
  - `organizationId` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `type` 'static' | 'dynamic' | 'smart', required
  - `criteria` object, nullable, required
  - `color` 'clay' | 'sand' | 'moss' | 'sky' | 'plum' | 'rose', nullable, required: The list's label color, one of six families, or null for the neutral chip. Customer-chosen and purely presentational; it carries no meaning the API enforces.
  - `icon` string, nullable, required
  - `parentGroupId` string, required
  - `contactCount` integer, required
  - `lastCalculatedAt` string, nullable, required
  - `isActive` boolean, required
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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