> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# エージェントウィジェット設定を取得

GET https://api.elevenlabs.io/v1/convai/agents/{agent_id}/widget

エージェントのウィジェット設定を取得

Reference: https://elevenlabs.io/docs/eleven-agents/api-reference/widget/get

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `agent_id` (string, required) — エージェントのID。エージェント作成時に返されます。

### Query parameters

- `conversation_signature` (string, optional) — WebSocket会話を開始できる、有効期限付きトークンです。エージェント用のトークンは、/v1/convai/conversation/get_signed_urlエンドポイントで生成できます。

## Response

### 200

成功レスポンス。

- `agent_id` (string, required)
- `widget_config` (WidgetConfigResponse, required)

## Errors

### 422 Widget Get Request Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### WidgetConfigResponse

- `language` (string, required)
- `variant` (enum, optional, default: full) — ウィジェットのバリアント
  - Allowed values: `tiny`, `compact`, `full`, `expandable`
- `placement` (enum, optional, default: bottom-right) — 画面上のウィジェットの配置
  - Allowed values: `top-left`, `top`, `top-right`, `bottom-left`, `bottom`, `bottom-right`
- `expandable` (enum, optional, default: never) — ウィジェットを展開できるかどうか
  - Allowed values: `never`, `mobile`, `desktop`, `always`
- `avatar` (WidgetConfigResponseAvatar, optional) — ウィジェットのアバター
- `feedback_mode` (enum, optional, default: none) — ウィジェットのフィードバックモード
  - Allowed values: `none`, `during`, `end`
- `end_feedback` (WidgetEndFeedbackConfig, optional) — 会話終了時に収集するフィードバックの設定
- `bg_color` (string, optional, default: #ffffff) — ウィジェットの背景色
- `text_color` (string, optional, default: #000000) — ウィジェットのテキストカラー
- `btn_color` (string, optional, default: #000000) — ウィジェットのボタン色
- `btn_text_color` (string, optional, default: #ffffff) — ウィジェットのボタンテキスト色
- `border_color` (string, optional, default: #e1e1e1) — ウィジェットの境界線の色
- `focus_color` (string, optional, default: #000000) — ウィジェットのフォーカス時の色
- `border_radius` (integer, optional) — ウィジェットの角丸半径
- `btn_radius` (integer, optional) — ウィジェットのボタンの角丸半径
- `action_text` (string, optional) — ウィジェットのアクションテキスト。
- `start_call_text` (string, optional) — ウィジェットの通話開始テキスト
- `end_call_text` (string, optional) — ウィジェットの通話終了テキスト
- `expand_text` (string, optional) — ウィジェットの展開テキスト
- `listening_text` (string, optional) — エージェントが聞いているときに表示するテキスト
- `speaking_text` (string, optional) — エージェントが話しているときに表示するテキスト
- `shareable_page_text` (string, optional) — 共有時に表示するテキスト
- `shareable_page_show_terms` (boolean, optional, default: true) — 共有可能なページに利用規約を表示するかどうか
- `terms_text` (string, optional) — 利用規約として表示するテキスト
- `terms_html` (string, optional) — 利用規約として表示するHTML
- `terms_key` (string, optional) — 利用規約の表示に使用するキー。
- `show_avatar_when_collapsed` (boolean, optional) — ウィジェットを折りたたんだときにアバターを表示するかどうか
- `disable_banner` (boolean, optional, default: false) — バナーを無効にするかどうか
- `override_link` (string, optional) — ウィジェットのオーバーライドリンク
- `markdown_link_allowed_hosts` (list of AllowlistItem, optional) — クリック可能なMarkdownリンクで許可するホスト名のリスト。任意のドメインを許可するには\{ hostname: '\*' }を使用します。空の場合、リンクは許可されません。
- `markdown_link_include_www` (boolean, optional, default: true) — 許可されたホストのwww.バリアントを自動的に含めるかどうか
- `markdown_link_allow_http` (boolean, optional, default: true) — Whether to allow http:// in addition to https:// for allowed hosts
- `mic_muting_enabled` (boolean, optional, default: true) — マイクのミュートを有効にするかどうか
- `transcript_enabled` (boolean, optional, default: true) — 会話の進行に合わせてウィジェットに会話の文字起こしを表示するかどうか
- `text_input_enabled` (boolean, optional, default: true) — ユーザーがテキストメッセージを送信できるようにするかどうか
- `conversation_mode_toggle_enabled` (boolean, optional, default: false) — ウィジェットで会話モードの切り替えを有効にするかどうか
- `default_expanded` (boolean, optional, default: false) — ウィジェットをデフォルトで展開するかどうか
- `always_expanded` (boolean, optional, default: false) — ウィジェットを常に展開するかどうか
- `dismissible` (boolean, optional, default: false) — ユーザーがウィジェットを閉じられるかどうか
- `show_agent_status` (boolean, optional, default: false) — ツール使用中にエージェントの作業中／完了／エラーステータスを表示するかどうか
- `show_conversation_id` (boolean, optional, default: true) — 切断後に会話IDを表示するかどうか。
- `strip_audio_tags` (boolean, optional, default: true) — メッセージからオーディオマークアップを削除するかどうか。
- `syntax_highlight_theme` (enum, optional) — コードブロックのシンタックスハイライト用テーマです。設定しない場合は、ウィジェットによる自動検出がデフォルトになります。
  - Allowed values: `light`, `dark`
- `text_contents` (WidgetTextContents, optional) — ウィジェットのテキスト内容。
- `styles` (WidgetStyles, optional) — ウィジェットのスタイル。
- `show_resize_button` (boolean, optional, default: true) — サイズ変更ボタンを表示するかどうか
- `end_confirmation_enabled` (boolean, optional, default: false) — チャットまたは通話を終了する前に、ユーザーに確認を求めるかどうか
- `supported_language_overrides` (list of string, optional)
- `language_presets` (map from string to WidgetLanguagePresetResponse, optional) — ウィジェット用の言語プリセット
- `text_only` (boolean, optional, default: false) — エージェントがテキストのみモードを使用するかどうか。
- `supports_text_only` (boolean, optional, default: false) — エージェントをテキストのみモードに切り替えられるかどうか。
- `first_message` (string, optional)
- `use_rtc` (boolean, optional) — 会話の接続にWebRTCを使用するかどうか
- `file_input_config` (FileInputConfig, optional) — ウィジェットでのファイルアップロード設定

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### WidgetConfigResponseAvatar

ウィジェットのアバター

- `type`: `orb`
  - `color_1` (string, optional, default: #2792dc) — アバターの1番目の色
  - `color_2` (string, optional, default: #9ce6e6) — アバターの2番目の色
- `type`: `url`
  - `custom_url` (string, optional, default: ) — アバターのカスタムURL
- `type`: `image`
  - `url` (string, optional, default: ) — アバターのURL

### WidgetEndFeedbackConfig

- `type` ("rating", optional) — 会話終了時に収集するフィードバックのタイプ

### AllowlistItem

- `hostname` (string, required) — 許可されたオリジンのホスト名

### WidgetTextContents

- `main_label` (string, optional) — コンパクト版とフル版の内部に表示する行動喚起。
- `start_call` (string, optional) — 通話開始ボタンのテキストとARIAラベル。
- `start_chat` (string, optional) — チャット開始ボタンのテキストとARIAラベル（テキストのみ）。
- `new_call` (string, optional) — 新しい通話ボタンのテキストとARIAラベル。発信者が次の通話を開始するために、すでに少なくとも1回の通話を完了している場合に表示されます。
- `end_call` (string, optional) — 通話終了ボタンのテキストとARIAラベル。
- `mute_microphone` (string, optional) — マイクをミュートするボタンのARIAラベル。
- `change_language` (string, optional) — 言語変更ドロップダウンのARIAラベル。
- `collapse` (string, optional) — 折りたたみボタンのARIAラベル。
- `expand` (string, optional) — 展開ボタンのARIAラベル。
- `copied` (string, optional) — ユーザーがコピーボタンで値をコピーしたときに表示するテキスト。
- `accept_terms` (string, optional) — 利用規約に同意するボタンのテキストとARIAラベル。
- `dismiss_terms` (string, optional) — 利用規約のキャンセルボタンのテキストとARIAラベル。
- `listening_status` (string, optional) — エージェントが聞き取り中に表示するステータス。
- `speaking_status` (string, optional) — エージェントが話しているときに表示するステータス。
- `connecting_status` (string, optional) — エージェントが接続中に表示するステータス。
- `chatting_status` (string, optional) — エージェントがチャット中に表示するステータス（テキストのみ）。
- `queue_waiting_status` (string, optional) — 利用可能なエージェントをキューで待機中に表示するステータス。
- `queue_waiting_status_short` (string, optional) — 利用可能なエージェントを待機中に表示する短いステータス。
- `input_label` (string, optional) — テキストメッセージ入力欄のARIAラベル。
- `input_placeholder` (string, optional) — テキストメッセージ入力欄のプレースホルダーテキスト。
- `input_placeholder_text_only` (string, optional) — テキストメッセージ入力欄のプレースホルダーテキスト（テキストのみ）
- `input_placeholder_new_conversation` (string, optional) — 新しい会話を開始する際のテキストメッセージ入力欄のプレースホルダーテキスト（テキストのみ）
- `user_ended_conversation` (string, optional) — ユーザーが会話を終了したときに表示される案内メッセージです。
- `agent_ended_conversation` (string, optional) — エージェントが会話を終了したときに表示される案内メッセージです。
- `conversation_id` (string, optional) — 会話IDの横に使用するテキストラベル。
- `error_occurred` (string, optional) — エラー発生時に使用するテキストラベル。
- `queue_timed_out` (string, optional) — キューの待機がタイムアウトした場合に表示するエラーメッセージ。
- `copy_id` (string, optional) — IDコピーボタンに使用するテキストとARIAラベル。
- `initiate_feedback` (string, optional) — ユーザーにフィードバックを促すために表示するテキスト。
- `request_follow_up_feedback` (string, optional) — 追加のフィードバック詳細を求めるために表示するテキスト。
- `thanks_for_feedback` (string, optional) — フィードバックを提供したユーザーに感謝を伝えるために表示するテキスト。
- `thanks_for_feedback_details` (string, optional) — ユーザーフィードバックの価値を説明するために表示される追加テキスト。
- `follow_up_feedback_placeholder` (string, optional) — フォローアップフィードバック入力欄のプレースホルダーテキスト。
- `submit` (string, optional) — 送信ボタンのテキストとARIAラベル。
- `go_back` (string, optional) — 戻るボタンのテキストとARIAラベル。
- `send_message` (string, optional) — メッセージ送信ボタンのテキストとARIAラベル。
- `text_mode` (string, optional) — テキストモード切り替えボタンのテキストとARIAラベル。
- `voice_mode` (string, optional) — 音声モード切り替えボタンのテキストとARIAラベル。
- `switched_to_text_mode` (string, optional) — テキストモードに切り替えた際に表示されるトースト通知。
- `switched_to_voice_mode` (string, optional) — 音声モードに切り替えた際に表示されるトースト通知。
- `copy` (string, optional) — コピーボタンのテキストとARIAラベル。
- `download` (string, optional) — ダウンロードボタンのテキストとARIAラベル。
- `wrap` (string, optional) — 折り返し切り替えボタンのテキストとARIAラベル。
- `agent_working` (string, optional) — エージェントがツール呼び出しを処理中に表示するステータステキスト。
- `agent_done` (string, optional) — エージェントがツール呼び出しの処理を完了したときに表示するステータステキスト。
- `agent_error` (string, optional) — エージェントがツール呼び出し中にエラーに遭遇したときに表示するステータステキスト。
- `attach_file` (string, optional) — ファイル添付ボタンのテキストとARIAラベル。
- `remove_file` (string, optional) — ファイル削除ボタンのARIAラベル。
- `file_upload_error` (string, optional) — ファイルのアップロードに失敗した場合に表示するエラーメッセージです。
- `file_type_unsupported` (string, optional) — サポートされていないファイルタイプが選択された場合に表示するエラーメッセージです。後ろに受け付け可能なタイプの一覧が続きます。
- `file_too_large` (string, optional) — ファイルが最大サイズ制限を超えた場合に表示するエラーメッセージです。
- `file_limit_reached` (string, optional) — 会話で許可されるファイル数の上限に達した場合に表示するエラーメッセージです。
- `typing_indicator` (string, optional) — エージェントが入力中に表示するステータステキスト。
- `rich_content_unavailable` (string, optional) — リッチコンテンツをレンダリングできない場合に表示するフォールバックメッセージ。

### WidgetStyles

- `base` (string, optional) — ベース背景色。
- `base_hover` (string, optional) — ホバー時のベース背景色。
- `base_active` (string, optional) — アクティブ時（クリック時）のベース背景色。
- `base_border` (string, optional) — ベース背景上の境界線の色。
- `base_subtle` (string, optional) — ベース背景上の補助テキストの色。
- `base_primary` (string, optional) — ベース背景上の主要テキストの色。
- `base_error` (string, optional) — ベース背景上のエラーテキストの色。
- `accent` (string, optional) — アクセントの背景色。
- `accent_hover` (string, optional) — ホバー時のアクセント背景色。
- `accent_active` (string, optional) — アクティブ時（クリック時）のアクセント背景色。
- `accent_border` (string, optional) — アクセント背景上の境界線の色。
- `accent_subtle` (string, optional) — アクセント背景上の補助テキストの色。
- `accent_primary` (string, optional) — アクセント背景上の主要テキストの色。
- `overlay_padding` (double, optional) — ビューポートの端の周囲にあるパディング。
- `button_radius` (double, optional) — ボタンの角丸半径。
- `input_radius` (double, optional) — 入力フィールドの角丸半径。
- `bubble_radius` (double, optional) — チャットバブルの角丸半径。
- `sheet_radius` (double, optional) — シートのデフォルトの角丸半径。
- `compact_sheet_radius` (double, optional) — コンパクトモードのシートの角丸半径。
- `dropdown_sheet_radius` (double, optional) — ドロップダウンシートの角丸半径。

### WidgetLanguagePresetResponse

- `first_message` (string, optional)
- `text_contents` (WidgetTextContents, optional) — 選択した言語のテキスト内容
- `terms_text` (string, optional) — この言語で利用規約として表示するテキスト
- `terms_html` (string, optional) — この言語の利用規約として表示するHTML
- `terms_key` (string, optional) — この言語で利用規約を表示するためのキー。

### FileInputConfig

- `enabled` (boolean, optional, default: true) — 有効にすると、LLMがマルチモーダル入力をサポートしている場合、ユーザーはチャットで画像、PDF、またはテキストファイルを添付できます。
- `max_files_in_memory` (integer, optional, default: 10) — 会話中にメモリに保持する最新ファイル数です。古いファイルは要約され、そのバイトデータは解放されます。
- `max_files_per_conversation` (integer, optional, default: 10) — 1回の会話でユーザーがアップロードできるファイルの合計数。アップロードはファイルごとに課金されます。無制限の場合は-1、またはmax_files_in_memory以上の値を使用します。

### ValidationErrorLocItem

## Examples

**Response**

```json
{
  "agent_id": "agent_id",
  "widget_config": {
    "language": "en",
    "variant": "tiny",
    "placement": "top-left",
    "expandable": "never",
    "avatar": {
      "type": "orb",
      "color_1": "#2792dc",
      "color_2": "#9ce6e6"
    },
    "feedback_mode": "none",
    "end_feedback": {
      "type": "rating"
    },
    "bg_color": "bg_color",
    "text_color": "text_color",
    "btn_color": "btn_color",
    "btn_text_color": "btn_text_color",
    "border_color": "border_color",
    "focus_color": "focus_color",
    "border_radius": 1,
    "btn_radius": 1,
    "action_text": "action_text",
    "start_call_text": "start_call_text",
    "end_call_text": "end_call_text",
    "expand_text": "expand_text",
    "listening_text": "listening_text",
    "speaking_text": "speaking_text",
    "shareable_page_text": "shareable_page_text",
    "shareable_page_show_terms": true,
    "terms_text": "terms_text",
    "terms_html": "terms_html",
    "terms_key": "terms_key",
    "show_avatar_when_collapsed": true,
    "disable_banner": true,
    "override_link": "override_link",
    "markdown_link_allowed_hosts": [
      {
        "hostname": "hostname"
      }
    ],
    "markdown_link_include_www": true,
    "markdown_link_allow_http": true,
    "mic_muting_enabled": true,
    "transcript_enabled": true,
    "text_input_enabled": true,
    "conversation_mode_toggle_enabled": true,
    "default_expanded": true,
    "always_expanded": true,
    "dismissible": true,
    "show_agent_status": true,
    "show_conversation_id": true,
    "strip_audio_tags": true,
    "syntax_highlight_theme": "light",
    "text_contents": {
      "main_label": "main_label",
      "start_call": "start_call",
      "start_chat": "start_chat",
      "new_call": "new_call",
      "end_call": "end_call",
      "mute_microphone": "mute_microphone",
      "change_language": "change_language",
      "collapse": "collapse",
      "expand": "expand",
      "copied": "copied",
      "accept_terms": "accept_terms",
      "dismiss_terms": "dismiss_terms",
      "listening_status": "listening_status",
      "speaking_status": "speaking_status",
      "connecting_status": "connecting_status",
      "chatting_status": "chatting_status",
      "queue_waiting_status": "queue_waiting_status",
      "queue_waiting_status_short": "queue_waiting_status_short",
      "input_label": "input_label",
      "input_placeholder": "input_placeholder",
      "input_placeholder_text_only": "input_placeholder_text_only",
      "input_placeholder_new_conversation": "input_placeholder_new_conversation",
      "user_ended_conversation": "user_ended_conversation",
      "agent_ended_conversation": "agent_ended_conversation",
      "conversation_id": "conversation_id",
      "error_occurred": "error_occurred",
      "queue_timed_out": "queue_timed_out",
      "copy_id": "copy_id",
      "initiate_feedback": "initiate_feedback",
      "request_follow_up_feedback": "request_follow_up_feedback",
      "thanks_for_feedback": "thanks_for_feedback",
      "thanks_for_feedback_details": "thanks_for_feedback_details",
      "follow_up_feedback_placeholder": "follow_up_feedback_placeholder",
      "submit": "submit",
      "go_back": "go_back",
      "send_message": "send_message",
      "text_mode": "text_mode",
      "voice_mode": "voice_mode",
      "switched_to_text_mode": "switched_to_text_mode",
      "switched_to_voice_mode": "switched_to_voice_mode",
      "copy": "copy",
      "download": "download",
      "wrap": "wrap",
      "agent_working": "agent_working",
      "agent_done": "agent_done",
      "agent_error": "agent_error",
      "attach_file": "attach_file",
      "remove_file": "remove_file",
      "file_upload_error": "file_upload_error",
      "file_type_unsupported": "file_type_unsupported",
      "file_too_large": "file_too_large",
      "file_limit_reached": "file_limit_reached",
      "typing_indicator": "typing_indicator",
      "rich_content_unavailable": "rich_content_unavailable"
    },
    "styles": {
      "base": "base",
      "base_hover": "base_hover",
      "base_active": "base_active",
      "base_border": "base_border",
      "base_subtle": "base_subtle",
      "base_primary": "base_primary",
      "base_error": "base_error",
      "accent": "accent",
      "accent_hover": "accent_hover",
      "accent_active": "accent_active",
      "accent_border": "accent_border",
      "accent_subtle": "accent_subtle",
      "accent_primary": "accent_primary",
      "overlay_padding": 1.1,
      "button_radius": 1.1,
      "input_radius": 1.1,
      "bubble_radius": 1.1,
      "sheet_radius": 1.1,
      "compact_sheet_radius": 1.1,
      "dropdown_sheet_radius": 1.1
    },
    "show_resize_button": true,
    "end_confirmation_enabled": true,
    "supported_language_overrides": [
      "es",
      "fr"
    ],
    "language_presets": {
      "key": {}
    },
    "text_only": false,
    "supports_text_only": true,
    "first_message": "Hello! How can I help you today?",
    "use_rtc": false,
    "file_input_config": {
      "enabled": false,
      "max_files_in_memory": 10,
      "max_files_per_conversation": 10
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget"

querystring = {"conversation_signature":"conversation_signature"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget?conversation_signature=conversation_signature")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```