---
title: "Update project"
method: PATCH
path: "/projects/{project_id}"
tags: ["Project"]
---

# Update project

`PATCH /projects/{project_id}`

Updates the specified project.
Configurable properties include the project name, default compute settings, history retention period, and IP allowlist.

## Request body

- ProjectUpdateRequest
  - `project` object, required
    - `settings` ProjectSettingsData
      - `quota` ProjectQuota — Per-project consumption quotas. If a quota is exceeded, all active computes are automatically suspended and cannot be started via API calls or incoming connections. The exception is `logical_size_bytes`, which is enforced per branch. If a branch exceeds its `logical_size_bytes` quota, computes can still be started, but write operations will fail—allowing data to be deleted to free up space. Computes on other branches are not affected. Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting. Quotas are enforced using per-project consumption metrics with the same names. These metrics reset at the start of each billing period. `logical_size_bytes` is also an exception—it reflects the total data stored in a branch and does not reset. A zero or empty quota value means “unlimited.”
        - `active_time_seconds` integer — The total amount of wall-clock time allowed to be spent by the project's compute endpoints.
        - `compute_time_seconds` integer — The total amount of CPU seconds allowed to be spent by the project's compute endpoints.
        - `written_data_bytes` integer — Total amount of data written to all of a project's branches.
        - `data_transfer_bytes` integer — Total amount of data transferred from all of a project's branches using the proxy.
        - `logical_size_bytes` integer — Limit on the logical size of every project's branch. If a branch exceeds its `logical_size_bytes` quota, computes can still be started, but write operations will fail—allowing data to be deleted to free up space. Computes on other branches are not affected. Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.
      - `allowed_ips` AllowedIps — A list of IP addresses that are allowed to connect to the compute endpoint. If the list is empty or not set, all IP addresses are allowed. If protected_branches_only is true, the list will be applied only to protected branches.
        - `ips` string[] — A list of IP addresses that are allowed to connect to the endpoint.
        - `protected_branches_only` boolean — If true, the list will be applied only to protected branches.
      - `enable_logical_replication` boolean — Sets wal_level=logical for all compute endpoints in this project. All active endpoints will be suspended. Once enabled, logical replication cannot be disabled.
      - `maintenance_window` MaintenanceWindow — A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure. During this time, the project's compute endpoints may be unavailable and existing connections can be interrupted.
        - `weekdays` integer[], required — A list of weekdays when the maintenance window is active. Encoded as ints, where 1 - Monday, and 7 - Sunday.
        - `start_time` string, required — Start time of the maintenance window, in the format of "HH:MM". Uses UTC.
        - `end_time` string, required — End time of the maintenance window, in the format of "HH:MM". Uses UTC.
      - `block_public_connections` boolean — When set, connections from the public internet are disallowed. This supersedes the AllowedIPs list. This parameter is under active development and its semantics may change in the future.
      - `block_vpc_connections` boolean — When set, connections using VPC endpoints are disallowed. This parameter is under active development and its semantics may change in the future.
      - `audit_log_level` 'base' | 'extended' | 'full'
      - `hipaa` boolean
      - `preload_libraries` PreloadLibraries — The shared libraries to preload into the project's compute instances.
        - `use_defaults` boolean
        - `enabled_libraries` string[]
    - `name` string — The project name
    - `default_endpoint_settings` DefaultEndpointSettings — A collection of settings for a Neon endpoint
      - `pg_settings` PgSettingsData — A raw representation of Postgres settings
      - `pgbouncer_settings` PgbouncerSettingsData — DEPRECATED. A raw representation of PgBouncer settings. This schema is deprecated and will be removed after 2026-06-20.
      - `autoscaling_limit_min_cu` number
      - `autoscaling_limit_max_cu` number
      - `suspend_timeout_seconds` integer — Duration of inactivity in seconds after which the compute endpoint is automatically suspended. The value `0` means use the default value. The value `-1` means never suspend. The default value is `300` seconds (5 minutes). The minimum value is `60` seconds (1 minute). The maximum value is `604800` seconds (1 week). For more information, see [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).
    - `history_retention_seconds` integer — The number of seconds to retain the shared history for all branches in this project. The default is 1 day (604800 seconds).

## Response `200`

Updated the specified project

- object
  - `project` Project, required
    - `data_storage_bytes_hour` integer, required — Bytes-Hour. Project consumed that much storage hourly during the billing period. The value has some lag. The value is reset at the beginning of each billing period.
    - `data_transfer_bytes` integer, required — Bytes. Egress traffic from the Neon cloud to the client for given project over the billing period. Includes deleted endpoints. The value has some lag. The value is reset at the beginning of each billing period.
    - `written_data_bytes` integer, required — Bytes. Amount of WAL that travelled through storage for given project across all branches. The value has some lag. The value is reset at the beginning of each billing period.
    - `compute_time_seconds` integer, required — Seconds. The number of CPU seconds used by the project's compute endpoints, including compute endpoints that have been deleted. The value has some lag. The value is reset at the beginning of each billing period. Examples: 1. An endpoint that uses 1 CPU for 1 second is equal to `compute_time=1`. 2. An endpoint that uses 2 CPUs simultaneously for 1 second is equal to `compute_time=2`.
    - `active_time_seconds` integer, required — Seconds. Control plane observed endpoints of this project being active this amount of wall-clock time. The value has some lag. The value is reset at the beginning of each billing period.
    - `cpu_used_sec` integer, required — DEPRECATED, use compute_time instead.
    - `id` string, required — The project ID
    - `platform_id` string, required — The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`.
    - `region_id` string, required — The region identifier
    - `name` string, required — The project name
    - `provisioner` string, required — The Neon compute provisioner. Specify the `k8s-neonvm` provisioner to create a compute endpoint that supports Autoscaling. Provisioner can be one of the following values: * k8s-pod * k8s-neonvm * serverless-platform Clients must expect, that any string value that is not documented in the description above should be treated as a error. UNKNOWN value if safe to treat as an error too.
    - `default_endpoint_settings` DefaultEndpointSettings — A collection of settings for a Neon endpoint
      - `pg_settings` PgSettingsData — A raw representation of Postgres settings
      - `pgbouncer_settings` PgbouncerSettingsData — DEPRECATED. A raw representation of PgBouncer settings. This schema is deprecated and will be removed after 2026-06-20.
      - `autoscaling_limit_min_cu` number
      - `autoscaling_limit_max_cu` number
      - `suspend_timeout_seconds` integer — Duration of inactivity in seconds after which the compute endpoint is automatically suspended. The value `0` means use the default value. The value `-1` means never suspend. The default value is `300` seconds (5 minutes). The minimum value is `60` seconds (1 minute). The maximum value is `604800` seconds (1 week). For more information, see [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).
    - `settings` ProjectSettingsData
      - `quota` ProjectQuota — Per-project consumption quotas. If a quota is exceeded, all active computes are automatically suspended and cannot be started via API calls or incoming connections. The exception is `logical_size_bytes`, which is enforced per branch. If a branch exceeds its `logical_size_bytes` quota, computes can still be started, but write operations will fail—allowing data to be deleted to free up space. Computes on other branches are not affected. Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting. Quotas are enforced using per-project consumption metrics with the same names. These metrics reset at the start of each billing period. `logical_size_bytes` is also an exception—it reflects the total data stored in a branch and does not reset. A zero or empty quota value means “unlimited.”
        - `active_time_seconds` integer — The total amount of wall-clock time allowed to be spent by the project's compute endpoints.
        - `compute_time_seconds` integer — The total amount of CPU seconds allowed to be spent by the project's compute endpoints.
        - `written_data_bytes` integer — Total amount of data written to all of a project's branches.
        - `data_transfer_bytes` integer — Total amount of data transferred from all of a project's branches using the proxy.
        - `logical_size_bytes` integer — Limit on the logical size of every project's branch. If a branch exceeds its `logical_size_bytes` quota, computes can still be started, but write operations will fail—allowing data to be deleted to free up space. Computes on other branches are not affected. Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.
      - `allowed_ips` AllowedIps — A list of IP addresses that are allowed to connect to the compute endpoint. If the list is empty or not set, all IP addresses are allowed. If protected_branches_only is true, the list will be applied only to protected branches.
        - `ips` string[] — A list of IP addresses that are allowed to connect to the endpoint.
        - `protected_branches_only` boolean — If true, the list will be applied only to protected branches.
      - `enable_logical_replication` boolean — Sets wal_level=logical for all compute endpoints in this project. All active endpoints will be suspended. Once enabled, logical replication cannot be disabled.
      - `maintenance_window` MaintenanceWindow — A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure. During this time, the project's compute endpoints may be unavailable and existing connections can be interrupted.
        - `weekdays` integer[], required — A list of weekdays when the maintenance window is active. Encoded as ints, where 1 - Monday, and 7 - Sunday.
        - `start_time` string, required — Start time of the maintenance window, in the format of "HH:MM". Uses UTC.
        - `end_time` string, required — End time of the maintenance window, in the format of "HH:MM". Uses UTC.
      - `block_public_connections` boolean — When set, connections from the public internet are disallowed. This supersedes the AllowedIPs list. This parameter is under active development and its semantics may change in the future.
      - `block_vpc_connections` boolean — When set, connections using VPC endpoints are disallowed. This parameter is under active development and its semantics may change in the future.
      - `audit_log_level` 'base' | 'extended' | 'full'
      - `hipaa` boolean
      - `preload_libraries` PreloadLibraries — The shared libraries to preload into the project's compute instances.
        - `use_defaults` boolean
        - `enabled_libraries` string[]
    - `pg_version` integer, required — The major Postgres version number. Generally available versions are `14`, `15`, `16`, `17`, and `18`. `19` is being rolled out and is only accepted in regions where it has been enabled; requesting it in a region where it is not yet available returns an error.
    - `proxy_host` string, required — The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`).
    - `branch_logical_size_limit` integer, required — The logical size limit for a branch. The value is in MiB.
    - `branch_logical_size_limit_bytes` integer, required — The logical size limit for a branch. The value is in B.
    - `store_passwords` boolean, required — Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.
    - `maintenance_starts_at` string, date-time — A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time.
    - `creation_source` string, required — The project creation source
    - `history_retention_seconds` integer, required — The number of seconds to retain the shared history for all branches in this project.
    - `created_at` string, date-time, required — A timestamp indicating when the project was created
    - `updated_at` string, date-time, required — A timestamp indicating when the project was last updated
    - `synthetic_storage_size` integer — The current space occupied by the project in storage, in bytes. Synthetic storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches in a project.
    - `consumption_period_start` string, date-time, required — A date-time indicating when Neon Cloud started measuring consumption for current consumption period.
    - `consumption_period_end` string, date-time, required — A date-time indicating when Neon Cloud plans to stop measuring consumption for current consumption period.
    - `quota_reset_at` string, date-time — DEPRECATED. Use `consumption_period_end` from the getProject endpoint instead. A timestamp indicating when the project quota resets.
    - `owner_id` string, required
    - `owner` ProjectOwnerData
      - `email` string, email, required
      - `name` string, required
      - `branches_limit` integer, required
      - `subscription_type` 'UNKNOWN' | 'direct_sales' | 'direct_sales_v3' | 'aws_marketplace' | 'free_v2' | 'free_v3' | 'launch' | 'launch_v3' | 'scale' | 'scale_v3' | 'business' | 'vercel_pg_legacy', required — Type of subscription to Neon Cloud. Notice that for users without billing account this will be "UNKNOWN"
    - `compute_last_active_at` string, date-time — The most recent time when any endpoint of this project was active. Omitted when observed no activity for endpoints of this project.
    - `org_id` string
    - `maintenance_scheduled_for` string, date-time — A timestamp indicating when project update begins. If set, computes might experience a brief restart around this time.
    - `hipaa_enabled_at` string, date-time — A timestamp indicating when HIPAA was enabled for this project
    - `effective_project_permission` 'VIEWER' | 'EDITOR' | 'ADMIN' — The caller's effective permission for a project when per-project permissions are enabled. `VIEWER` grants read access, `EDITOR` adds update access, and `ADMIN` grants full management. Omitted for personal projects, flag-off organizations, and non-user subjects.
  - `operations` Operation[], required
    - `id` string, uuid, required — The operation ID
    - `project_id` string, required — The Neon project ID
    - `branch_id` string — The branch ID
    - `endpoint_id` string — The endpoint ID
    - `action` 'create_compute' | 'create_timeline' | 'start_compute' | 'suspend_compute' | 'apply_config' | 'check_availability' | 'delete_timeline' | 'create_branch' | 'import_data' | 'tenant_ignore' | 'tenant_attach' | 'tenant_detach' | 'tenant_detach_safekeepers' | 'tenant_attach_safekeepers' | 'tenant_reattach' | 'replace_safekeeper' | 'disable_maintenance' | 'apply_storage_config' | 'prepare_secondary_pageserver' | 'switch_pageserver' | 'detach_parent_branch' | 'timeline_archive' | 'timeline_unarchive' | 'start_reserved_compute' | 'sync_dbs_and_roles_from_compute' | 'apply_schema_from_branch' | 'timeline_mark_invisible' | 'timeline_update_protected_config' | 'prewarm_replica' | 'promote_replica' | 'set_storage_non_dirty' | 'swap_binding_id' | 'finalize_migration' | 'mark_migration_prepared' | 'update_catalog' | 'epc_sync', required — The action performed by the operation
    - `status` 'scheduling' | 'running' | 'finished' | 'failed' | 'error' | 'cancelling' | 'cancelled' | 'skipped', required — The status of the operation
    - `error` string — The error that occurred
    - `failures_count` integer, required — The number of times the operation failed
    - `retry_at` string, date-time — A timestamp indicating when the operation was last retried
    - `created_at` string, date-time, required — A timestamp indicating when the operation was created
    - `updated_at` string, date-time, required — A timestamp indicating when the operation status was last updated
    - `total_duration_ms` integer, required — The total duration of the operation in milliseconds

## Other responses

- `default` — General Error. The request may or may not be safe to retry, depending on the HTTP method, response status code, and whether a response was received. - If no response is returned from the API, a network error or timeout likely occurred. - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. Any request that returns a `503 Service Unavailable` response is always safe to retry. Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

---

[API](https://skmtc.net/neon/apis/neon-api.md) · [All operations](https://skmtc.net/neon/apis/neon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neon/neon-api/versions/cfde79a5c713/schema)
