> ## Documentation Index
> Fetch the complete documentation index at: https://gowa-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# APIリファレンス

> GOWA REST API のベースURL、認証、デバイス選択、リクエストフォーマット、レスポンスエンベロープ。

## ベースURL

```text theme={null}
http://<host>:3000<APP_BASE_PATH>
```

デフォルトは `http://localhost:3000` です。`APP_BASE_PATH=/gowa` の場合、`/health` を除くすべてのルートは `/gowa` の下に移動します。

## 認証

`APP_BASIC_AUTH`が設定されている場合、`/health`、`/statics/*`、Chatwootウェブフック、MCP OAuthエンドポイントを除くすべてのルートでHTTPベーシック認証が必要になります。 [Authentication](https://gowa-docs.mintlify.site/ja/api-reference/authentication.md) を参照してください。

## デバイス選択

ほとんどのルートは、1つのWhatsAppデバイス上で動作します。`X-Device-Id`ヘッダー（スロットIDまたはJID）または`device_id`クエリパラメータで選択します。 サーバーが正確に1つのデバイスを持っている場合は、それを省略することができます。

| 端末スコープ付きです | デバイススコープではありません |
| - | - |
| `/app/*` (`/app/info` と `/app/metrics`を除く), `/send/*`, `/message/*`, `/chat/*`, `/chats`, `/user/*`, `/group/*`, `/newsletter/*`, `/call/*` | `/devices*`, `/app/info`, `/app/metrics`, `/health`, `/mcp`, `/chatwoot/*` |

[Multi-device](https://gowa-docs.mintlify.site/ja/concepts/multidevice.md) を参照してください。

## エンドポイントグループ

| グループ | 目的 |
| - | - |
| デバイス | デバイススロットの作成、リスト、ログイン、ログアウト、削除、デバイスごとのWebhookおよびChatwoot設定。 |
| アプリ | ログイン(QR、ペアリングコード、パスキー)、ログアウト、再接続、状態、サーバー情報とプロセス、メモリ、ディスク、デバイスのメトリクス。 |
| 送信 | テキスト、メディア、連絡先、場所、リンク、ポーリング、プレゼンス、スケジューリング; 即時実験的なインタラクティブな送信。 |
| メッセージ | React, edit, revoke, delete, read, star, forward, download media |
| チャット | チャットとメッセージの一覧; ピン、アーカイブ、タイマー、履歴リクエストを消去します。 |
| ユーザー | プロフィール情報, アバター, プッシュ名, プライバシー, 連絡先, グループ, 番号チェック. |
| グループ | 作成、参加、管理者、参加リクエスト、設定、招待リンクを作成します。 |
| ニュースレター | フォロー、フォロー解除、チャンネル情報、ディレクトリ、メッセージ、カウンター、ライブアップデート、およびメディアのダウンロード。 |
| 電話 | 着信拒否。 |

このタブのエンドポイントページはGOWAのOpenAPI仕様から生成されます。権威あるコントラクトは、サーバーリポジトリの[`docs/openapi.yaml`](https://github.com/aldinokemal/go-whatsapp-web-multidevice/blob/main/docs/openapi.yaml)です。 このサイトは `openapi.yml` で同期されたコピーを使用しており、`/send/interactive` を含みます。[interactive guide](https://gowa-docs.mintlify.site/ja/examples/interactive-messages.md) は現在の制限を記録します。

## リクエスト

* JSON body: `Content-Type: application/json` 。
* ファイルアップロード: `multipart/form-data` 。
* 電話番号: 国コード (`628123456789`) または完全な JID (`...@s.whatsapp.net`, `...@g.us`) の桁数。

## 回答

```json theme={null}
{
  "code": "SUCCESS",
  "message": "Success",
  "results": {}
}
```

`code` は `SUCCESS` またはエラーコードです。`results` はデータを保持しています。 [Errors](https://gowa-docs.mintlify.site/ja/api-reference/errors.md) を参照してください。

## 例

```bash theme={null}
curl -u admin:changeme -X POST http://localhost:3000/send/message \
  -H "Content-Type: application/json" \
  -H "X-Device-Id: my-device" \
  -d '{"phone": "628123456789", "message": "Hello from GOWA"}'
```

## 連絡先名

`GET /user/my/contacts` は各コンタクトの表示名を返します。GOWA `main` after v9.9. で保存されている `full_name` 、 `first_name` 、 `push_name` 、 `business_name` を個別のフィールドとして取得するには、 `GET /user/my/contacts/detailed` を呼び出します。 GOWAは空の名前を省略し、デバイスにマッピングがある場合は電話番号のJIDに`lid`を含みます。 結果には、選択したデバイスの連絡先が`jid`でソートされています。

```bash theme={null}
curl -u admin:changeme -H "X-Device-Id: my-device" \
  http://localhost:3000/user/my/contacts/detailed
```

## その他のインターフェース

* **[WebSocket](https://gowa-docs.mintlify.site/ja/api-reference/websocket.md)** の `/ws` でライブダッシュボードイベントを表示します。
* **MCP** at `/mcp` for AI agents ([MCP server](https://gowa-docs.mintlify.site/ja/integrations/mcp.md)).
* **Webhooks** があなたの URL ([Webhooks](https://gowa-docs.mintlify.site/ja/concepts/webhooks.md)にプッシュしました。


## Related topics

- [クイックスタート](https://gowa-docs.mintlify.site/ja/quickstart.md)
- [API 認証](https://gowa-docs.mintlify.site/ja/api-reference/authentication.md)
- [ファイルを送信](https://gowa-docs.mintlify.site/ja/api-reference/send/ファイルを送信.md)
- [エラー](https://gowa-docs.mintlify.site/ja/api-reference/errors.md)
- [レート制限](https://gowa-docs.mintlify.site/ja/api-reference/rate-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.