---
title: "ユーザーグループの作成"
---

> Documentation Index
> Fetch the complete documentation index at: https://apidocs.cs-cart.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# ユーザーグループの作成

<span class="api-method api-method-post">`POST`</span> `/usergroups`

新しいユーザーグループを作成するには、`/api/usergroups`エンドポイントに`POST`リクエストを送信します。

## リクエスト：ヘッダー

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Basic <認証情報>`     |

> **認証情報について**
>
> 認証情報は、ユーザーのEメールアドレスとAPIキーをコロンで連結したものをBase64エンコードしたものです。

## リクエスト：ボディ

| Name         | Type   | 必須 | 説明                            | デフォルト値 |
| ------------ | ------ | -- | ----------------------------- | ------ |
| `type`       | string | ○  | ユーザーグループのタイプ（`A`, `C`）        |        |
| `status`     | string | ○  | ユーザーグループのステータス（`A`, `D`, `H`） |        |
| `usergroup`  | string | ○  | ユーザーグループ名                     |        |
| `privileges` | array  |    | 管理者の権限 typeが`A`の場合のみ有効        |        |

## レスポンス

### 200

```json
{
  "usergroup_id": 5
}
```

### 400

```json
{}
```

Source: https://apidocs.cs-cart.jp/usergroups/api-usergroup-create/index.mdx
