---
title: "POST /clients"
method: POST
path: "/clients"
tags: ["client"]
---

# POST /clients

`POST /clients`

クライアントを登録します。

## Request body

- PostClient
  - `name` string, required — クライアント名
  - `description` string, required — クライアントの説明
  - `redirectUri` string, uri, required — リダイレクト先のURI
  - `scopes` ClientScope[], required — 要求するスコープ(必ず１つ以上)

## Response `200`

正常に登録できました。クライアント情報を返します。

- OwnedClientInfo
  - `clientId` string — クライアントID
  - `name` string — クライアント名
  - `description` string — クライアント説明
  - `creatorId` string, uuid — クライアント作成者UUID
  - `scopes` ClientScope[] — 要求スコープの配列
  - `redirectUri` string, uri — OAuth2リダイレクトURL
  - `secret` string — クライアントSecret

## Other responses

- `400` — 登録できませんでした。リクエスト内容が不正です。
- `403` — 登録できませんでした。権限がありません。

## Changes

- **2019-09-09** `f291e1b35a23` — 1 breaking
  - request body became required
- **2019-07-24** `66a69a1387ed` — 1 info
  - api operation id `createClient` was added
- **2019-07-22** `d2f7470b1a57` — 2 breaking, 4 warning, 3 info
  - request property `scopes/items/` was restricted to a list of enum values
  - the `name` request property's minLength was increased from `0` to `1`
  - the `name` request property's maxLength was set to `32`
  - added the new `manage_bot` enum value to the `scopes/items/` response property for the response status `200`
  - …5 more
- **2019-07-05** `6956f2622a20` — 8 info
  - api operation id `createClient` removed and replaced with ``
  - the endpoint scheme security `traqOAuth2` was added to the API
  - endpoint reactivated
  - added optional request body
  - …4 more

[Change history](https://skmtc.dev/traptitech/apis/traq-api/changes/clients/post.md)

---

[API](https://skmtc.dev/traptitech/apis/traq-api.md) · [All operations](https://skmtc.dev/traptitech/apis/traq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/traptitech/traq-api/revisions/4ab97bc4eb2c/schema)
