---
title: "POST /webhooks"
method: POST
path: "/webhooks"
tags: ["webhook"]
---

# POST /webhooks

`POST /webhooks`

webhookを作成します。

## Request body

- object
  - `name` string, required — webhookユーザーの表示名(32文字まで)
  - `description` string, required — webhookの説明
  - `channelId` string, uuid, required — デフォルトの投稿先チャンネル(パブリックチャンネルのみ)
  - `secret` string — webhookシークレット

## Response `201`

正常に作成できました。

- Webhook
  - `webhookId` string, uuid — Webhook UUID
  - `botUserId` string, uuid — WebhookユーザーのUUID
  - `displayName` string — Webhookユーザー表示名
  - `description` string — Webhook説明
  - `secure` boolean — Secure Webhookかどうか
  - `channelId` string, uuid — デフォルト投稿先チャンネルUUID
  - `creatorId` string, uuid — Webhook作成者UUID
  - `createdAt` string, date-time — Webhook作成日時
  - `updatedAt` string, date-time — Webhook更新日時

## Other responses

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

## Changes

- **2019-07-05** `6956f2622a20` — 8 info
  - api operation id `createWebhooks` 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/webhooks/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/6956f2622a20/schema)
