---
title: "UpdateOrganizationPolicies"
method: POST
path: "/gitpod.v1.OrganizationService/UpdateOrganizationPolicies"
tags: ["gitpod.v1.OrganizationService"]
---

# UpdateOrganizationPolicies

`POST /gitpod.v1.OrganizationService/UpdateOrganizationPolicies`

Updates organization policy settings.

 Use this method to:
 - Configure editor restrictions
 - Set environment resource limits
 - Define project creation permissions
 - Customize default configurations

 ### Examples

 - Update editor policies:

   Restricts available editors and sets a default.

   ```yaml
   organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
   allowedEditorIds:
     - "vscode"
     - "jetbrains"
   defaultEditorId: "vscode"
   ```

 - Set environment limits:

   Configures limits for environment usage.

   ```yaml
   organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
   maximumEnvironmentTimeout: "3600s"
   maximumRunningEnvironmentsPerUser: "5"
   maximumEnvironmentsPerUser: "20"
   ```

## Request body

- GitpodV1UpdateOrganizationPoliciesRequest
  - `agentPolicy` GitpodV1UpdateOrganizationPoliciesRequestUpdateAgentPolicy
    - `commandDenyList` string[] — command_deny_list contains a list of commands that agents are not allowed to execute
    - `conversationSharingPolicy` 'CONVERSATION_SHARING_POLICY_UNSPECIFIED' | 'CONVERSATION_SHARING_POLICY_DISABLED' | 'CONVERSATION_SHARING_POLICY_ORGANIZATION' — ConversationSharingPolicy controls how agent conversations can be shared.
    - `maxSubagentsPerEnvironment` integer, nullable — max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5).
    - `mcpDisabled` boolean, nullable — mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents
    - `scmToolsAllowedGroupId` string, nullable — scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled).
    - `scmToolsDisabled` boolean, nullable — scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents
  - `allowLocalRunners` boolean, nullable — allow_local_runners controls whether local runners are allowed to be used in the organization
  - `allowedEditorIds` string[] — allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization
  - `defaultEditorId` string, nullable — default_editor_id is the default editor ID to be used when a user doesn't specify one
  - `defaultEnvironmentImage` string, nullable — default_environment_image is the default container image when none is defined in repo
  - `deleteArchivedEnvironmentsAfter` string, regex — A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".
  - `editorVersionRestrictions` object — editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy with allowed major versions.
  - `maximumEnvironmentLifetime` string, regex — A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".
  - `maximumEnvironmentLifetimeStrict` boolean, nullable — maximum_environment_lifetime_strict controls whether environments past their lockdown_at timestamp are blocked from starting.
  - `maximumEnvironmentTimeout` string, regex — A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".
  - `maximumEnvironmentsPerUser` string, nullable — maximum_environments_per_user limits total environments (running or stopped) per user
  - `maximumRunningEnvironmentsPerUser` string, nullable — maximum_running_environments_per_user limits simultaneously running environments per user
  - `membersCreateProjects` boolean, nullable — members_create_projects controls whether members can create projects
  - `membersRequireProjects` boolean, nullable — members_require_projects controls whether environments can only be created from projects by non-admin users
  - `organizationId` string, uuid, required — organization_id is the ID of the organization to update policies for
  - `portSharingDisabled` boolean, nullable — port_sharing_disabled controls whether user-initiated port sharing is disabled in the organization. System ports (VS Code Browser, agents) are always exempt from this policy.
  - `requireCustomDomainAccess` boolean, nullable — require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked.
  - `restrictAccountCreationToScim` boolean, nullable — restrict_account_creation_to_scim controls whether account creation is restricted to SCIM-provisioned users only. When true and SCIM is configured for the organization, only users provisioned via SCIM can create accounts.
  - `securityAgentPolicy` GitpodV1UpdateOrganizationPoliciesRequestUpdateSecurityAgentPolicy — UpdateSecurityAgentPolicy contains security agent configuration updates
    - `crowdstrike` GitpodV1UpdateOrganizationPoliciesRequestUpdateCrowdStrikeConfig — UpdateCrowdStrikeConfig contains CrowdStrike Falcon configuration updates
      - `additionalOptions` object — additional_options contains additional FALCONCTL_OPT_* options as key-value pairs
      - `cidSecretId` string, uuid, nullable — cid_secret_id references an organization secret containing the Customer ID (CID)
      - `enabled` boolean, nullable — enabled controls whether CrowdStrike Falcon is deployed to environments
      - `image` string, nullable — image is the CrowdStrike Falcon sensor container image reference
      - `tags` string, nullable — tags are optional tags to apply to the Falcon sensor
    - `customAgents` GitpodV1CustomSecurityAgent[] — custom_agents contains custom security agent definitions. Callers must read-then-write the full list.
      - `description` string — description is a human-readable description of what this agent does
      - `enabled` boolean — enabled controls whether this custom agent is deployed to environments
      - `envMappings` GitpodV1CustomAgentEnvMapping[] — env_mappings maps script placeholders to organization secret names, resolved to secret values at runtime.
        - `name` string — name is the environment variable name used as a placeholder in the start command.
        - `secretName` string — secret_name is the name of the organization secret whose value populates this placeholder.
      - `id` string — id is a unique identifier for this custom agent within the organization. Server-generated at save time if empty.
      - `name` string — name is the display name for this custom agent
      - `startCommand` string — start_command is the shell script that starts the agent
  - `vetoExecPolicy` GitpodV1VetoExecPolicy — VetoExecPolicy defines the policy for blocking or auditing executable execution in environments.
    - `action` 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' | 'KERNEL_CONTROLS_ACTION_BLOCK' | 'KERNEL_CONTROLS_ACTION_AUDIT' — KernelControlsAction defines how a kernel-level policy violation is handled.
    - `enabled` boolean — enabled controls whether executable blocking is active
    - `executables` string[] — executables is the list of executable paths or names to block
    - `safelist` string[] — Output only. Executable paths that are protected by the safelist and cannot be blocked by the denylist. Populated by the server from the built-in default safelist. Ignored on update requests.

## Response `200`

Success

- GitpodV1UpdateOrganizationPoliciesResponse

## Other responses

- `default` — Error

## Changes

- **2026-04-02** `dabc0ff98cd7` — 1 warning, 5 info
  - removed the request property `executableDenyList`
  - added the new optional request property `agentPolicy/conversationSharingPolicy`
  - added the new optional request property `agentPolicy/maxSubagentsPerEnvironment`
  - added the new optional request property `maximumEnvironmentLifetimeStrict`
  - …2 more
- **2026-02-18** `1923b5d38655` — 1 info
  - added the new optional request property `executableDenyList/action`
- **2026-02-11** `b97dcde84128` — 2 info
  - added the new optional request property `executableDenyList`
  - added the new optional request property `restrictAccountCreationToScim`
- **2026-01-09** `3935e467f9c1` — 1 info
  - added the new optional request property `agentPolicy/scmToolsAllowedGroupId`
- **2025-12-15** `d62ef4b9187c` — 6 info
  - added the new optional request property `agentPolicy`
  - added the new optional request property `deleteArchivedEnvironmentsAfter`
  - added the new optional request property `editorVersionRestrictions`
  - added the new optional request property `maximumEnvironmentLifetime`
  - …2 more

[Full history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.OrganizationService/UpdateOrganizationPolicies/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/dabc0ff98cd7/schema)
