> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/ja/api-integration/endpoint-behaviors/branding-api.md).

# サイトのブランド設定 API

サイトのドメインに基づいて公開ブランド表示設定を取得する方法を、連携システム向けに説明します。

一つのバックエンドサービスが異なるブランドのサイトを提供する場合、ログイン前のページにもサイト名、画像、リンクの情報が必要です。連携システムは**現在のサイトのドメイン**から `GET /api/branding/` を呼び出し、そのサイトの公開表示設定を取得できます。この読み取りエンドポイントにログインは不要です。

## 設定の取得と適用 <a href="#read-and-apply" id="read-and-apply"></a>

1. 対象サイトを提供するドメインから `GET /api/branding/` を送信します。ブランドはリクエストの Host で決まり、ユーザー、組織 ID、クエリパラメーターでは選択しません。
2. レスポンスから必要な表示項目を読み取ります。たとえば、サイト名には `siteName`、フルサイズのロゴには `logoFullUrl`、メインカラーには `primaryColor` を使用します。
3. 項目が `null` の場合は、対応する要素を非表示にしてください。他のブランドのデフォルト素材を代わりに設定しないでください。ドメイン固有の設定がない場合、サービスはまずシステムのデフォルトブランドを使用します。デフォルトブランドもない場合、すべての項目が `null` になります。

{% hint style="info" %}
連携システムがリバースプロキシを経由する場合は、API に転送される Host が、表示したいブランドのサイトのドメインのままであることを確認してください。共通の API ドメインから直接呼び出すと、その API ドメインに対応するブランド、またはシステムのデフォルトブランドが返されます。
{% endhint %}

## レスポンス項目 <a href="#response-fields" id="response-fields"></a>

HTTP 200 では、項目名が camelCase の JSON オブジェクトを返します。

| 用途     | 項目                                                                                         |
| ------ | ------------------------------------------------------------------------------------------ |
| テキスト   | `siteName`、`assistantName`、`supportEmail`、`poweredByText`                                  |
| 画像 URL | `faviconUrl`、`logoMarkUrl`、`logoFullUrl`、`logoAnimatedUrl`、`assistantIconUrl`、`ogImageUrl` |
| 色      | `primaryColor`、`splashBackgroundColor`、`splashTextColor`、`progressBarColor`                |
| リンク    | `docsUrl`、`termsUrl`、`privacyUrl`、`loginRedirectUrl`                                       |

すべての項目が `null` になる可能性があります。画像項目には表示に使用できる URL が入ります。連携システムではレスポンスの値をそのまま使用し、メディアパスを組み立てないでください。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/tech/ja/api-integration/endpoint-behaviors/branding-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
