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

# Update enterprise security profile settings

> Update the enterprise's default security-profile selection. Omitted
fields are left unchanged. Only enterprise-owned profiles may be pinned.

Updates the enterprise default security-profile selection and returns the resulting settings.

## Permissions

Requires a [service user](https://docs.devin.ai/api-reference/v3/service-users/members-service-users.md) or [personal access token](https://docs.devin.ai/api-reference/personal-access-tokens.md) with the `ManageAccountSecureModeProfiles` permission at the enterprise level. Only available on enterprise accounts.

## Behavior

* Omitted fields are left unchanged. `null` is rejected; to clear the default, send `{"default": {"selection": "none"}}`.
* `profile_id` is required when `selection` is `profile` and must be omitted otherwise. Only enterprise-owned profiles can be pinned.
* A mandatory enterprise default is a floor: organizations, automations, and sessions can only narrow it. See [mandatory vs. recommended enforcement](https://docs.devin.ai/product-guides/security-profiles.md#mandatory-vs-recommended-enforcement).
* Running sessions pick up the change the next time they boot or wake.


## OpenAPI

````yaml v3-openapi.yaml PATCH /v3beta1/enterprise/security-profile-settings
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/enterprise/security-profile-settings:
    patch:
      tags:
        - security-profiles
      summary: Update enterprise security profile settings
      description: |-
        Update the enterprise's default security-profile selection. Omitted
        fields are left unchanged. Only enterprise-owned profiles may be pinned.
      operationId: >-
        handle_update_security_profile_settings_v3beta1_enterprise_security_profile_settings_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/EnterpriseSecurityProfileSettingsUpdateRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseSecurityProfileSettingsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
components:
  schemas:
    EnterpriseSecurityProfileSettingsUpdateRequest:
      additionalProperties: false
      description: 'PATCH semantics: omitted fields are left unchanged.'
      properties:
        default:
          anyOf:
            - $ref: '#/components/schemas/EnterpriseSecurityProfileDefaultSelection'
            - type: 'null'
      title: EnterpriseSecurityProfileSettingsUpdateRequest
      type: object
    EnterpriseSecurityProfileSettingsResponse:
      additionalProperties: false
      properties:
        default:
          $ref: '#/components/schemas/EnterpriseSecurityProfileDefaultState'
      required:
        - default
      title: EnterpriseSecurityProfileSettingsResponse
      type: object
    ProblemDetail:
      description: >-
        RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat;
        the

        other members are additive. errors carries field-level validation
        failures

        (422 only).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Machine-readable code for blocked-action refusals (e.g.
            "user_frozen", "migrated_session").
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    EnterpriseSecurityProfileDefaultSelection:
      additionalProperties: false
      description: |-
        A two-state default: none (no default profile) or profile (pin
        profile_id). There is no ``inherit`` at the enterprise level — nothing
        sits above the enterprise to inherit from.
      properties:
        profile_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Required when selection is 'profile'; must be omitted otherwise.
          title: Profile Id
        selection:
          enum:
            - none
            - profile
          title: Selection
          type: string
      required:
        - selection
      title: EnterpriseSecurityProfileDefaultSelection
      type: object
    EnterpriseSecurityProfileDefaultState:
      additionalProperties: false
      description: Read view of the enterprise default binding.
      properties:
        profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Id
        selection:
          enum:
            - none
            - profile
          title: Selection
          type: string
      required:
        - selection
      title: EnterpriseSecurityProfileDefaultState
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````

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