> ## 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.

# 着信拒否する

> 特定の着信をプログラム的に拒否します。 このエンドポイントでは、アプリケーションロジックに基づいて選択的な呼び出し拒否
を許可します(たとえば、時間帯ルール、発信者ホワイトリスト、エージェントの利用可否)。

呼び出しが鳴っている必要があります。呼び出しがすでに終了しているか、応答されている場合、拒否は失敗します。

これは、グローバルに
すべての着信を拒否する自動拒否機能 (`WHATSAPP_AUTO_REJECT_CALL=true` ) を補完します。 詳細な制御には、この API を使用します。

**Webhook から取得する必須フィールド:**
- `caller_jid`: `call.offer` Webhook イベントの `payload.from` を使用
- `call_id`: `call.offer` Webhook イベントの `payload.call_id` を使用




## OpenAPI

````yaml /ja/openapi.yml post /call/reject
openapi: 3.0.0
info:
  title: WhatsApp API マルチデバイス
  version: 9.7.0
  description: |
    この API は API 経由で whatsapp を送信するために使用されます。

    Web ダッシュボードは別のプロジェクトです (gowa-ui); サーバーは
    最新のリリースアセットをダウンロードし、`/`で動作します（または、
    APP_UI_ENABLED=falseの場合はJSONバナーを返します）。

    デバイススコープ:
    - すべてのデバイススコープの REST コールで `X-Device-Id` を送信します。
    - WebSocket: `/wsに接続しますか？device_id=<id> ` 。
    - WebSocket 認証（Basic Auth が有効な場合）: ブラウザーは WebSocket 接続で
      Authorization ヘッダーを設定できないため、クエリ文字列にも
      `&authorization=<base64(user:pass)>` を渡してください。 認証情報が URL に表示されるため、本番環境では
      TLS を使用してください。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Whatsappサーバーへの初期接続
  - name: device
    description: マルチデバイスサポートのためのデバイス管理
  - name: user
    description: 情報の取得
  - name: send
    description: メッセージ (テキスト/イメージ/ファイル/ビデオ) を送信します。
  - name: message
    description: メッセージ操作 (revoke/react/update)
  - name: call
    description: 通話管理 (着信拒否)
  - name: chat
    description: チャットとメッセージ
  - name: group
    description: グループ設定
  - name: newsletter
    description: ニュースレターの設定
  - name: chatwoot
    description: カスタマーサポートのためのChatwoot統合
paths:
  /call/reject:
    post:
      tags:
        - call
      summary: 着信拒否する
      description: >
        特定の着信をプログラム的に拒否します。 このエンドポイントでは、アプリケーションロジックに基づいて選択的な呼び出し拒否

        を許可します(たとえば、時間帯ルール、発信者ホワイトリスト、エージェントの利用可否)。


        呼び出しが鳴っている必要があります。呼び出しがすでに終了しているか、応答されている場合、拒否は失敗します。


        これは、グローバルに

        すべての着信を拒否する自動拒否機能 (`WHATSAPP_AUTO_REJECT_CALL=true` ) を補完します。 詳細な制御には、この
        API を使用します。


        **Webhook から取得する必須フィールド:**

        - `caller_jid`: `call.offer` Webhook イベントの `payload.from` を使用

        - `call_id`: `call.offer` Webhook イベントの `payload.call_id` を使用
      operationId: rejectCall
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - caller_jid
                - call_id
              properties:
                caller_jid:
                  type: string
                  example: 628987654321@s.whatsapp.net
                  description: JID of the caller (from webhook `payload.from`)
                call_id:
                  type: string
                  example: ABC123DEF456
                  description: 一意の呼び出し識別子 (webhook `payload.call_id` から)
      responses:
        '200':
          description: 通話が正常に拒否されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '400':
          description: 不正なリクエスト（不足しているか無効なフィールド）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '500':
          description: Internal Server Error (通話はすでに終了しています、接続されていませんなど)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: |
        マルチデバイスサポート用のデバイス識別子 複数のデバイスが登録されている場合に必要です。
        1つのデバイスのみ登録されている場合は、デフォルトとして使用されます。
        `device_id`クエリパラメータとして提供することもできます。
      schema:
        type: string
        example: my-device-id
  schemas:
    GenericResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success
        results:
          type: string
          example: null
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP ステータスコードです
        message:
          type: string
          example: field cannot be blank
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: システムのコードにエラー
        message:
          type: string
          example: you are not loggin
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [グループへの参加リクエストを拒否する](https://gowa-docs.mintlify.site/ja/api-reference/group/グループへの参加リクエストを拒否する.md)
- [グループ管理](https://gowa-docs.mintlify.site/ja/examples/group-management.md)
- [構成の参照](https://gowa-docs.mintlify.site/ja/configuration.md)
- [エラー](https://gowa-docs.mintlify.site/ja/api-reference/errors.md)
- [メディア処理](https://gowa-docs.mintlify.site/ja/examples/media-handling.md)


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