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

# 権限と RBAC

> Devin API の権限リファレンス

すべての API エンドポイントは、呼び出し元のサービスユーザーのロールに割り当てられた特定の権限によって制御されています。各エンドポイントに必要な権限は、そのエンドポイントごとの API リファレンスページに記載されています。このページでは、スコープ別にすべての権限の概要を示します。

**ベース URL:**

* `https://api.devin.ai/v3/organizations/*` — 単一の組織をスコープとするエンドポイント
* `https://api.devin.ai/v3/enterprise/*` — Enterprise レベルの権限が必要なエンドポイント

<Note>
  専用デプロイメントをご利用の **Devin Enterprise** 契約のお客様は、`api.devin.ai` をカスタム API ドメイン (例: `api.your-company.devinenterprise.com`) に置き換えてください。セットアップの詳細については、[Enterprise クイックスタート](/ja/api-reference/getting-started/enterprise-quickstart) を参照してください。
</Note>

<Tip>
  組織 ID は **Settings → Service Users** ページで確認できます。
</Tip>

<Note>
  一部の Enterprise エンドポイントは、
  `/v3/enterprise/organizations/{org_id}/...` (たとえば監査ログやタグ) といったパスを使って特定の組織に対して動作します。
  `org_id` パラメーターを含んでいても、**Enterprise レベル**の権限が必要です。
</Note>

<div id="enterprise-permissions">
  ## Enterprise 権限
</div>

| Permission                   | 制御対象                                                                                      |
| ---------------------------- | ----------------------------------------------------------------------------------------- |
| `ReadAccountMeta`            | 自分自身 (デフォルトですべてのサービスユーザーに付与)                                                              |
| `ManageEnterpriseSettings`   | 監査ログ、Organization タグ                                                                      |
| `ManageOrganizations`        | Organization の CRUD、Organization グループ数の上限                                                 |
| `ManageAccountMembership`    | ロール、Enterprise ユーザー、Enterprise IdP グループ、Enterprise サービスユーザーのメンバーシップ、Enterprise IdP グループ登録 |
| `ManageAccountServiceUsers`  | サービスユーザーのプロビジョニング (Enterprise)                                                            |
| `ManageAccountKnowledge`     | Knowledge ノート (Enterprise)                                                                |
| `ManageAccountPlaybooks`     | Playbook (Enterprise)                                                                     |
| `ManageGitIntegrations`      | Git 接続、Git 権限                                                                             |
| `ManageBilling`              | 利用サイクル、日次の利用内訳                                                                            |
| `ViewAccountMetrics`         | 利用状況メトリクス (DAU/WAU/MAU、PR (プルリクエスト) 、セッション、検索、アクティブユーザー) 、キューのステータス                       |
| `ViewEnterpriseInfraDetails` | ハイパーバイザー                                                                                  |
| `ViewAccountSessions`        | セッションの一覧と詳細 (Enterprise、読み取り専用)                                                           |
| `ManageAccountSessions`      | セッションへのメッセージの送信 (Enterprise)                                                              |

<div id="organization-permissions">
  ## 組織権限
</div>

| Permission               | Controls                                    |
| ------------------------ | ------------------------------------------- |
| `ManageOrgSecrets`       | シークレットの CRUD                                |
| `ManageOrgKnowledge`     | Knowledge ノート (組織)                          |
| `ManageOrgPlaybooks`     | Playbook (組織)                               |
| `ManageOrgServiceUsers`  | サービスユーザーのプロビジョニング (組織)                      |
| `ManageOrgSchedules`     | スケジュールされたセッション                              |
| `ViewOrgSessions`        | セッションの一覧および詳細 (組織、読み取り専用)                   |
| `ManageOrgSessions`      | メッセージの送信、セッションの終了およびアーカイブ                   |
| `UseDevinSessions`       | セッションの作成                                    |
| `ImpersonateOrgSessions` | 他のユーザーになり代わってセッションを作成 (`create_as_user_id`) |

<div id="permission-inheritance">
  ## 権限の継承
</div>

**Enterprise サービスユーザー** は `/v3/enterprise/*` エンドポイントで認証を行い、すべての組織をまたいで操作できます。Enterprise レベルのロールが割り当てられ、各ロールに対応する組織レベルの権限を、すべての組織で自動的に継承します (たとえば、`ViewAccountSessions` はすべての組織で `ViewOrgSessions` を付与します) 。

**Organization サービスユーザー** は単一の組織のみにスコープが限定され、`/v3/organizations/{org_id}/*` エンドポイントでのみ認証されます。これらのユーザーには組織レベルのロールが割り当てられます。

<div id="creating-service-users">
  ## サービスユーザーの作成
</div>

サービスユーザーは Devin の UI から作成できます。

1. **Enterprise サービスユーザー**: Enterprise settings → Service Users
2. **Organization サービスユーザー**: Organization settings → Service Users

セットアップ手順については、[Teams クイックスタート](/ja/api-reference/getting-started/teams-quickstart) または [Enterprise クイックスタート](/ja/api-reference/getting-started/enterprise-quickstart) を参照してください。
