---
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
  - `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
  - `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 port sharing is disabled in the organization

## Response `200`

Success

- GitpodV1UpdateOrganizationPoliciesResponse

## Other responses

- `default` — Error

## Changes

- **2025-06-10** `ca9a49ac7fbb` — 1 info
  - endpoint added

[Change 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/ca9a49ac7fbb/schema)
