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

# 組織のセキュリティプロファイル設定を更新する

> 組織のデフォルトとして選択するセキュリティプロファイルの設定を更新します。
省略されたフィールドは変更されません。固定するプロファイルには、org-ownedのプロファイル、または
組織が属するエンタープライズの共有プロファイルを指定できます。

組織のデフォルトのセキュリティプロファイルの選択項目を更新し、更新後の設定を返します。

## 権限

組織レベルで `ManageSecureModeProfiles` 権限を持つ[サービスユーザー](https://docs.devin.ai/ja/api-reference/v3/service-users/members-service-users.md)または[個人用アクセストークン](https://docs.devin.ai/ja/api-reference/personal-access-tokens.md)が必要です。実行中の Devin セッションが利用するトークンは拒否されるため、セッションが自身に適用されるプロファイルを変更することはできません。

## 動作

* 省略したフィールドは変更されません。`null` は拒否されます。デフォルトをクリアするには、`inherit` を設定してください (例：`{"default": {"selection": "inherit"}}` または `{"automations_default": {"selection": "inherit"}}`) 。
* `profile_id` は、`selection` が `profile` の場合は必須で、それ以外の場合は省略する必要があります。固定するプロファイルには、org-owned のプロファイル、またはエンタープライズの共有プロファイルのいずれかを指定できます。
* 実行中のセッションには、次回の起動時または復帰時に変更が反映されます。


## OpenAPI

````yaml ja/v3-openapi.json PATCH /v3beta1/organizations/{org_id}/security-profile-settings
openapi: 3.1.0
info:
  title: Devin API v3
  description: サービスユーザー認証とRBACに対応したDevin v3 API
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/organizations/{org_id}/security-profile-settings:
    patch:
      tags:
        - security-profiles
      summary: 組織のセキュリティプロファイル設定を更新する
      description: |-
        組織のデフォルトとして選択するセキュリティプロファイルの設定を更新します。
        省略されたフィールドは変更されません。固定するプロファイルには、org-ownedのプロファイル、または
        組織が属するエンタープライズの共有プロファイルを指定できます。
      operationId: >-
        handle_update_security_profile_settings_v3beta1_organizations__org_id__security_profile_settings_patch
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            title: Org Id
            example: org-abc123def456
          description: 組織ID（プレフィックス：org-）
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecurityProfileSettingsUpdateRequest'
      responses:
        '200':
          description: 成功レスポンス
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityProfileSettingsResponse'
        '401':
          description: 認証されていません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '403':
          description: アクセスが禁止されています
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          description: 見つかりません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '409':
          description: 競合
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '410':
          description: 削除済み
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '422':
          description: 処理できないコンテンツ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '429':
          description: リクエスト過多
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
components:
  schemas:
    SecurityProfileSettingsUpdateRequest:
      properties:
        default:
          anyOf:
            - $ref: '#/components/schemas/SecurityProfileDefaultSelection'
            - type: 'null'
        automations_default:
          anyOf:
            - $ref: '#/components/schemas/SecurityProfileDefaultSelection'
            - type: 'null'
      additionalProperties: false
      type: object
      title: SecurityProfileSettingsUpdateRequest
      description: PATCHの動作：省略されたフィールドは変更されません。
    SecurityProfileSettingsResponse:
      properties:
        default:
          $ref: '#/components/schemas/SecurityProfileDefaultState'
        automations_default:
          $ref: '#/components/schemas/SecurityProfileDefaultState'
          description: >-
            自動化によってトリガーされるセッションのデフォルト。組織またはエンタープライズのデフォルトより優先されますが、各自動化固有のバインドより優先度は低くなります。
      additionalProperties: false
      type: object
      required:
        - default
        - automations_default
      title: SecurityProfileSettingsResponse
    ProblemDetail:
      properties:
        type:
          type: string
          title: Type
          description: 問題タイプを識別する URI 参照。
          default: about:blank
        title:
          type: string
          title: Title
          description: 問題タイプの、人が読める短い要約。
        status:
          type: integer
          title: Status
          description: HTTP ステータスコード。
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: この発生事象に固有の、人が読める説明。
        instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance
          description: この発生事象の URI 参照（リクエストパス）。
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: フィールド単位のバリデーションエラー（422レスポンスの場合のみ）。
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: ブロックされた操作の拒否理由を示す機械可読コード（例："user_frozen", "migrated_session"）。
      type: object
      required:
        - title
        - status
      title: ProblemDetail
      description: >-
        v3 API 向けの RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き続き保持されています。その他のメンバーは追加式です。errors にはフィールド単位の検証エラーが格納されます（422
        の場合のみ）。
    SecurityProfileDefaultSelection:
      properties:
        selection:
          type: string
          enum:
            - inherit
            - none
            - profile
          title: Selection
        profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Id
          description: selectionが'profile'の場合は必須です。それ以外の場合は省略する必要があります。
      additionalProperties: false
      type: object
      required:
        - selection
      title: SecurityProfileDefaultSelection
      description: |-
        3つの状態を持つデフォルト設定：inherit（独自のバインドを持たず、
        上位階層のデフォルト設定を継承）、none（明示的なオプトアウト：上位階層に
        推奨のデフォルト設定があってもプロファイルを適用しない）、profile（profile_idを固定）。

        オプトアウトでは、上位階層の必須プロファイルを回避できません。設定自体は
        そのまま保存されますが、必須プロファイルが存在する間は効果がありません。
    SecurityProfileDefaultState:
      properties:
        selection:
          type: string
          enum:
            - inherit
            - none
            - profile
          title: Selection
        profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Id
        profile_scope:
          anyOf:
            - type: string
              enum:
                - org
                - enterprise
            - type: 'null'
          title: Profile Scope
          description: >-
            固定されたプロファイルを所有するスコープ。selectionが'profile'の場合のみ設定されます。組織のデフォルト設定では、エンタープライズで共有されているプロファイルを固定できます。
      additionalProperties: false
      type: object
      required:
        - selection
      title: SecurityProfileDefaultState
      description: 保存済みのデフォルトバインド1件の読み取り用ビュー。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'サービスユーザーの credential（プレフィックス: cog_）'

````

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