---
title: "ユーザーが会員登録を行う"
method: POST
path: "/app/users"
tags: ["app"]
---

# ユーザーが会員登録を行う

`POST /app/users`

招待コードを用いて登録した場合は、招待クーポンを付与する

## Request body

- object
  - `username` string, required — ユーザー名 (ユニーク)
  - `firstname` string, required — 名前
  - `lastname` string, required — 名字
  - `date_of_birth` string, date, required — 生年月日
  - `invitation_code` string — 他の人の招待コード

## Response `201`

ユーザー登録が完了した

- object
  - `id` string, required — ユーザーID
  - `invitation_code` string, required — 自分の招待コード

## Other responses

- `400` — Bad Request

## Changes

> 2 revisions in range; 1 could not be searched.

- **2024-12-04** `5f71dd0e9c7f` — 5 info
  - the `date_of_birth` request property's minLength was decreased from `1` to `0`
  - the `firstname` request property's minLength was decreased from `1` to `0`
  - the `lastname` request property's minLength was decreased from `1` to `0`
  - the `username` request property's minLength was decreased from `1` to `0`
  - …1 more

[Change history](https://skmtc.dev/isucon/apis/isuride-api-specification/changes/app/users/post.md)

---

[API](https://skmtc.dev/isucon/apis/isuride-api-specification.md) · [All operations](https://skmtc.dev/isucon/apis/isuride-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/isucon/isuride-api-specification/revisions/9ded46d2bf61/schema)
