> For the complete documentation index, see [llms.txt](https://docs.immedio.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.immedio.io/company-settings/integrations/webhook.md).

# Webhook連携

immedioで面談予約が発生した際に、外部システムへリアルタイムで通知を送信する機能です。

## Webhook連携とは

Webhook連携とは、immedioで面談予約が発生した際に、指定したWebhook URLに対してHTTPリクエストを送信し、外部システムとリアルタイムで連携する機能です。面談予約完了時に自動的に通知が送信されるため、CRMシステムやマーケティングオートメーションツールなどの外部サービスと即座にデータを連携することができます。

## Webhook連携でできること

| 機能              | 説明                              |
| --------------- | ------------------------------- |
| Webhook URL一覧表示 | 登録済みのWebhook URLを一覧で表示します       |
| Webhook URL登録   | 通知を受信するWebhook URLを最大3つまで登録できます |

## Webhook通知設定

### 設定項目

| 項目          | 説明                            |
| ----------- | ----------------------------- |
| イベントタイプ     | 通知を受け取るイベントの種類（現在は「面談予約」のみ対応） |
| Webhook URL | 通知先のURL（有効なURLである必要があります）     |

### Webhook通知の追加方法

1. 管理画面から「企業設定」→「外部ツール連携」→「Webhook連携」を選択します
2. 「イベントタイプ」で「面談予約」を選択します
3. 「Webhook URL」に通知を受信するURLを入力します
4. 「追加」ボタンをクリックして設定を保存します

追加されたWebhook通知設定は一覧表に表示され、必要に応じて削除することができます。

### Webhook通知の削除方法

登録済みのWebhook通知を削除するには、通知一覧の「削除」ボタンをクリックします。削除すると、そのURLへの通知は停止されます。

## 通知仕様

### 送信タイミング

* 面談予約完了時：顧客が面談予約を完了した直後に通知が送信されます

### HTTPリクエスト仕様

| 項目           | 値                |
| ------------ | ---------------- |
| メソッド         | POST             |
| Content-Type | application/json |
| ボディ          | 後述               |
| リクエスト元IPアドレス | 34.146.162.33    |

### 送信されるペイロード

面談予約完了時に以下の構造のJSONデータが送信されます：

```json
{
  "event": {
    "event_id": "xxxxxxxxxxxxx",
    "start_at": "2024-07-15T10:00:00Z",
    "end_at": "2024-07-15T11:00:00Z",
    "video_url": "https://zoom.us/j/1234567890",
    "reschedule_url": "https://meetings.immedio.io/reschedule?uk=xxxxxx",
    "created_at": "2024-07-14T15:30:00Z"
  },
  "lead": {
    "name": "田中太郎",
    "company": "株式会社immedio",
    "email": "tanaka@immedio.io",
    "phone_number": "03-1234-5678",
    "form_url": "https://example.com/form",
    "custom_items": {
      "corporate_number": "9011001146789",
    }
  },
  "owner": {
    "name": "佐藤花子",
    "email": "sato@example.com"
  }
}
```

### ペイロード詳細

#### eventオブジェクト

| フィールド           | 型      | 説明            |
| --------------- | ------ | ------------- |
| event\_id       | string | 面談イベントの一意識別子  |
| start\_at       | string | 面談開始日時（UTC）   |
| end\_at         | string | 面談終了日時（UTC）   |
| video\_url      | string | Web会議のURL     |
| reschedule\_url | string | 面談のリスケ用URL    |
| created\_at     | string | 面談予約作成日時（UTC） |

#### leadオブジェクト

| フィールド         | 型      | 説明                           |
| ------------- | ------ | ---------------------------- |
| name          | string | 顧客の氏名                        |
| company       | string | 顧客の会社名                       |
| email         | string | 顧客のメールアドレス                   |
| phone\_number | string | 顧客の電話番号                      |
| form\_url     | string | 予約時に使用されたフォームのURL            |
| custom\_items | object | カスタムフォーム項目の入力値（キー：項目名、値：入力値） |

#### ownerオブジェクト

| フィールド | 型      | 説明          |
| ----- | ------ | ----------- |
| name  | string | 担当者の氏名      |
| email | string | 担当者のメールアドレス |

## 注意事項

* 同一企業で登録できるWebhook URLは最大3つまでです
* 現在サポートされているイベントタイプは「面談予約」のみです
* 通知の送信に失敗した場合、自動的な再試行は行われません


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.immedio.io/company-settings/integrations/webhook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
