---
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> `/users`

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

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

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

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

## リクエスト：ボディ

| Name         | Type      | 必須 | 説明                                                                      | デフォルト値 |
| ------------ | --------- | -- | ----------------------------------------------------------------------- | ------ |
| `email`      | string    | ○  | メールアドレス                                                                 |        |
| `user_type`  | string    | ○  | <p>ユーザータイプ<br />（<code>A</code>：管理者, <code>C</code>：お客様）</p>              | `C`    |
| `company_id` | integer   | ○  |                                                                         | 1      |
| `status`     | string    | ○  | <p>ユーザーステータス<br />（<code>A</code>：有効, <code>D</code>：無効）</p>              | `A`    |
| `firstname`  | string    |    | 姓                                                                       |        |
| `lastname`   | string    |    | 名                                                                       |        |
| `company`    | string    |    | 会社名                                                                     |        |
| `is_root`    | string    |    | <p>ルートユーザーかどうか<br />（<code>Y</code>：はい, <code>N</code>：いいえ）</p>           | `N`    |
| `user_login` | string    |    | ユーザーログインID （ユーザーID。「ログインとして電子メールを使用する」設定が無効になっている場合にのみ使用されます。）          |        |
| `timestamp`  | date-time |    | タイムスタンプ                                                                 |        |
| `password`   | string    |    | <p>パスワード<br />このフィールドの値は、ユーザー パスワードのmd5 ハッシュです。ユーザーの作成および更新時にのみ使用されます</p> |        |

## レスポンス

### 200

```json
{
  "user_id": 4,
  "profile_id": "3"
}
```

### 400

```json
{}
```

Source: https://apidocs.cs-cart.jp/users/api-user-create/index.mdx
