{"components":{"parameters":{"CursorParam":{"description":"A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list.","in":"query","name":"cursor","schema":{"type":"string"}},"LimitParam":{"description":"The maximum number of records to be returned in the response","in":"query","name":"limit","schema":{"maximum":10000,"minimum":1,"type":"integer"}},"SortOrderParam":{"description":"Defines the sorting order of entities.","in":"query","name":"sort_order","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},"TimeoutParam":{"description":"Specify an explicit timeout in milliseconds to limit response delay.\nAfter timing out, the incomplete list of project data fetched so far will be returned.\nProjects still being fetched when the timeout occurred are listed in the \"unavailable\" attribute of the response.\nIf not specified, an implicit implementation defined timeout is chosen with the same behaviour as above\n","in":"query","name":"timeout","schema":{"maximum":30000,"minimum":100,"type":"integer"}}},"responses":{"CreatedBranch":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BranchResponse"},{"$ref":"#/components/schemas/EndpointsResponse"},{"$ref":"#/components/schemas/OperationsResponse"},{"$ref":"#/components/schemas/RolesResponse"},{"$ref":"#/components/schemas/DatabasesResponse"},{"$ref":"#/components/schemas/ConnectionURIsOptionalResponse"}]}}},"description":"Created a branch. An endpoint is only created if it was specified in the request."},"CreatedProject":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ProjectResponse"},{"$ref":"#/components/schemas/ConnectionURIsResponse"},{"$ref":"#/components/schemas/RolesResponse"},{"$ref":"#/components/schemas/DatabasesResponse"},{"$ref":"#/components/schemas/OperationsResponse"},{"$ref":"#/components/schemas/BranchResponse"},{"$ref":"#/components/schemas/EndpointsResponse"}]}}},"description":"Created a project.\nThe project includes a connection URI with a database, password, and role.\nAt least one non-protected role is created with a password.\nWait until the operations are finished before attempting to connect to a project database.\n"},"EmptyResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"Empty response"},"GeneralError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"General Error.\n\nThe request may or may not be safe to retry, depending on the HTTP method, response status code,\nand whether a response was received.\n\n- If no response is returned from the API, a network error or timeout likely occurred.\n- 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.\n\nThe following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.\nThe following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.\n\nAny request that returns a `503 Service Unavailable` response is always safe to retry.\n\nAny 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.\n"},"ListOperations":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OperationsResponse"},{"$ref":"#/components/schemas/PaginationResponse"}]}}},"description":"Returned a list of operations\n"},"RestoredSnapshot":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BranchResponse"},{"$ref":"#/components/schemas/EndpointsOptionalResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]}}},"description":"Branch restored from snapshot and its operations."},"SnapshotSchedule":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupSchedule"}}},"description":"Schedule of frequencies to create snapshots"}},"schemas":{"AcceptProjectTransferRequestSatisfiesPlanError":{"properties":{"reasons":{"description":"List of reasons why the target account's plan cannot satisfy the transfer requirements. Each item contains a `code` identifying the constraint and a `message` with a human-readable explanation.","items":{"properties":{"code":{"description":"A short code identifying the reason","type":"string"},"message":{"description":"Description of why the plan is not satisfied","type":"string"}},"required":["code","message"],"type":"object"},"type":"array"}},"required":["reasons"],"type":"object"},"ActiveRegionsResponse":{"properties":{"regions":{"description":"The list of active regions","items":{"$ref":"#/components/schemas/RegionResponse"},"type":"array"}},"required":["regions"],"type":"object"},"AddProjectJWKSRequest":{"description":"Add a new JWKS to a specific endpoint of a project","properties":{"branch_id":{"description":"The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"jwks_url":{"description":"URL of the provider's JWKS endpoint used to verify JWTs.","type":"string"},"jwt_audience":{"description":"Expected `aud` claim in incoming JWTs. When set, tokens with a different audience are rejected; tokens with no audience are still accepted. Omit to skip audience validation.","type":"string"},"provider_name":{"description":"The name of the authentication provider (e.g., Clerk, Stytch, Auth0)","type":"string"},"role_names":{"deprecated":true,"description":"Deprecated. The roles the JWKS should be mapped to. By default, the JWKS is mapped to the `authenticator`, `authenticated`, and `anonymous` roles.","items":{"type":"string"},"maxItems":10,"minItems":0,"type":"array"},"skip_role_creation":{"default":false,"description":"Deprecated. Only used with Neon RLS. If true, role creation is skipped.","type":"boolean"}},"required":["jwks_url","provider_name"],"type":"object"},"AdvisorCategory":{"description":"Category of an advisor issue","enum":["SECURITY","PERFORMANCE"],"type":"string"},"AdvisorIssue":{"properties":{"cache_key":{"description":"Unique key for caching this issue result","type":"string"},"categories":{"description":"Categories this issue belongs to","example":["SECURITY"],"items":{"$ref":"#/components/schemas/AdvisorCategory"},"type":"array"},"description":{"description":"Detailed description of what this check detects","type":"string"},"detail":{"description":"Specific details about this instance of the issue","example":"Table `public.users` is public, but RLS has not been enabled.","type":"string"},"facing":{"description":"Whether this issue affects external API exposure or is internal only","enum":["EXTERNAL","INTERNAL"],"example":"EXTERNAL","type":"string"},"level":{"description":"Severity level of the issue","example":"ERROR","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional context-specific metadata","type":"object"},"name":{"description":"Unique identifier for the issue type","example":"rls_disabled_in_public","type":"string"},"remediation":{"description":"URL to documentation on how to fix this issue","example":"https://neon.com/docs/data-api/database-advisor","type":"string"},"title":{"description":"Human-readable title","example":"RLS Disabled in Public","type":"string"}},"required":["cache_key","categories","description","detail","facing","level","metadata","name","remediation","title"],"type":"object"},"AllowedIps":{"description":"A list of IP addresses that are allowed to connect to the compute endpoint.\nIf the list is empty or not set, all IP addresses are allowed.\nIf protected_branches_only is true, the list will be applied only to protected branches.\n","properties":{"ips":{"description":"A list of IP addresses that are allowed to connect to the endpoint.","items":{"type":"string"},"type":"array"},"protected_branches_only":{"description":"If true, the list will be applied only to protected branches.","type":"boolean"}},"type":"object"},"AnnotationCreateValueRequest":{"properties":{"annotation_value":{"$ref":"#/components/schemas/AnnotationValueData"}},"type":"object","x-tags":["Branch"]},"AnnotationData":{"properties":{"created_at":{"description":"Timestamp when the annotation was created, in RFC 3339 format (UTC).","example":"2025-01-15T10:30:00Z","format":"date-time","type":"string"},"object":{"$ref":"#/components/schemas/AnnotationObjectData","description":"Resource that this annotation is attached to."},"updated_at":{"description":"Timestamp of the most recent update to the annotation, in RFC 3339 format (UTC).","example":"2025-01-15T10:30:00Z","format":"date-time","type":"string"},"value":{"$ref":"#/components/schemas/AnnotationValueData"}},"required":["object","value"],"type":"object","x-tags":["Branch"]},"AnnotationObjectData":{"properties":{"id":{"description":"The annotated object's ID.","type":"string"},"type":{"description":"Kind of resource the annotation is attached to, for example \"branch\" or \"endpoint\".","type":"string"}},"required":["id","type"],"type":"object","x-tags":["Branch"]},"AnnotationResponse":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationData","description":"Annotation data associated with the annotated object."}},"required":["annotation"],"type":"object","x-tags":["Branch"]},"AnnotationValueData":{"additionalProperties":{"type":"string"},"description":"A free-form map of string key-value pairs for attaching metadata to a resource (for example, a git commit reference). Maximum 50 entries.","example":{"github-commit-ref":"github-branch-name"},"maxProperties":50,"type":"object","x-tags":["Branch"]},"AnnotationsMapResponse":{"properties":{"annotations":{"additionalProperties":{"$ref":"#/components/schemas/AnnotationData"},"description":"Map of annotations keyed by resource identifier, where each value contains the annotation data for that resource.","type":"object"}},"required":["annotations"],"type":"object","x-tags":["Branch"]},"AnonymizationRunMetadata":{"description":"Metadata about the most recent anonymization attempt for the branch.","properties":{"completed_at":{"description":"Timestamp indicating when the latest anonymization attempt completed.\nPopulated even if the attempt failed.\n","format":"date-time","type":"string"},"masked_columns":{"description":"Number of columns that had masking rules applied during the attempt.\n","type":"integer"},"started_at":{"description":"Timestamp indicating when the latest anonymization attempt started.\n","format":"date-time","type":"string"},"triggered_by":{"description":"UUID of the user who triggered the latest anonymization attempt.\n","format":"uuid","type":"string"},"triggered_by_username":{"description":"Username of the user who triggered the latest anonymization attempt.\n","type":"string"}},"type":"object"},"AnonymizedBranchStatusResponse":{"example":{"branch_id":"br-aged-salad-637688","created_at":"2022-11-30T18:25:15Z","last_run":{"completed_at":"2022-11-30T18:30:22Z","masked_columns":12,"started_at":"2022-11-30T18:25:15Z","triggered_by":"df6c5f70-6cbf-4c8c-9e7a-74c3ddbd8f9f"},"project_id":"simple-truth-637688","state":"anonymizing","status_message":"Anonymizing table mydb.public.users (3/5)","updated_at":"2022-11-30T18:30:22Z"},"properties":{"branch_id":{"description":"The ID of the anonymized branch.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"A timestamp indicating when the anonymized branch was created\n","format":"date-time","type":"string"},"failed_at":{"description":"A timestamp indicating when the anonymized branch operation failed (if applicable)\n","format":"date-time","type":"string"},"last_run":{"$ref":"#/components/schemas/AnonymizationRunMetadata"},"project_id":{"description":"The ID of the project this branch belongs to.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"state":{"description":"The current state of the anonymized branch. `created`: branch record exists but setup has not started. `initialized`: setup is complete and the branch is ready for anonymization. `initialization_error`: an error occurred during setup. `anonymizing`: the anonymization process is currently running. `anonymized`: anonymization completed successfully. `error`: an error occurred during anonymization.\n","example":"created","type":"string"},"status_message":{"description":"A descriptive message about the current status or any errors\n","type":"string"},"updated_at":{"description":"A timestamp indicating when the anonymized branch status was last updated\n","format":"date-time","type":"string"}},"required":["branch_id","created_at","project_id","state","updated_at"],"type":"object","x-sensitive":["state"]},"ApiKeyCreateRequest":{"properties":{"key_name":{"description":"A user-specified API key name. This value is required when creating an API key.","maxLength":64,"type":"string"}},"required":["key_name"],"type":"object"},"ApiKeyCreateResponse":{"properties":{"created_at":{"description":"A timestamp indicating when the API key was created","format":"date-time","type":"string"},"created_by":{"description":"ID of the user who created this API key","format":"uuid","type":"string"},"id":{"description":"The API key's unique numeric ID. Distinct from the API key token (`key`).","format":"int64","type":"integer"},"key":{"description":"The generated 64-bit token required to access the Neon API","type":"string"},"name":{"description":"The user-specified API key name","type":"string"}},"required":["created_at","created_by","id","key","name"],"type":"object","x-sensitive":["key","name"]},"ApiKeyCreatorData":{"description":"The user data of the user that created this API key.","properties":{"id":{"description":"ID of the user who created this API key","format":"uuid","type":"string"},"image":{"description":"The URL to the user's avatar image.","type":"string"},"name":{"description":"Display name of the user who created the API key.","type":"string"}},"required":["id","image","name"],"type":"object"},"ApiKeyRevokeResponse":{"properties":{"created_at":{"description":"A timestamp indicating when the API key was created","format":"date-time","type":"string"},"created_by":{"description":"ID of the user who created this API key","format":"uuid","type":"string"},"id":{"description":"The API key's unique numeric ID. Distinct from the API key token (`key`).","format":"int64","type":"integer"},"last_used_at":{"description":"A timestamp indicating when the API was last used","format":"date-time","type":["null","string"]},"last_used_from_addr":{"description":"The IP address from which the API key was last used","type":"string"},"name":{"description":"The user-specified API key name","type":"string"},"revoked":{"description":"A `true` or `false` value indicating whether the API key is revoked","type":"boolean"}},"required":["created_at","created_by","id","last_used_from_addr","name","revoked"],"type":"object"},"ApiKeysListResponseItem":{"properties":{"created_at":{"description":"A timestamp indicating when the API key was created","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/ApiKeyCreatorData"},"id":{"description":"The API key's unique numeric ID. Distinct from the API key token (`key`).","format":"int64","type":"integer"},"last_used_at":{"description":"A timestamp indicating when the API was last used","format":"date-time","type":["null","string"]},"last_used_from_addr":{"description":"The IP address from which the API key was last used","type":"string"},"name":{"description":"The user-specified API key name","type":"string"}},"required":["created_at","created_by","id","last_used_from_addr","name"],"type":"object"},"ApplicationType":{"description":"Type of application integration","enum":["vercel","github","datadog","opentelemetry"],"type":"string"},"AuthDetailsResponse":{"properties":{"account_id":{"description":"The ID of the account associated with this authentication record.","type":"string"},"auth_data":{"type":"string"},"auth_method":{"description":"Authentication method used for the request:\n- `keycloak`: Keycloak identity provider authentication.\n- `session_cookie`: Browser session cookie authentication.\n- `api_key_user`: API key scoped to a user account.\n- `api_key_org`: API key scoped to an organization.\n- `oauth`: OAuth-based authentication.\n","enum":["keycloak","session_cookie","api_key_user","api_key_org","oauth"],"type":"string"}},"required":["account_id","auth_method"],"type":"object"},"AvailablePreloadLibraries":{"properties":{"libraries":{"description":"Preload libraries available for the project's Postgres version. Each entry includes `library_name`, `description`, `is_default`, `is_experimental`, and `version`.","items":{"$ref":"#/components/schemas/AvailablePreloadLibrary"},"type":"array"}},"type":"object"},"AvailablePreloadLibrary":{"properties":{"description":{"description":"Human-readable explanation of the library's purpose and behavior.","type":"string"},"is_default":{"description":"Whether this library is loaded by default in the `shared_preload_libraries` configuration for new compute endpoints.","type":"boolean"},"is_experimental":{"description":"Marks the library as experimental. Experimental libraries may be unstable, subject to breaking changes, or not recommended for production use.","type":"boolean"},"library_name":{"description":"Name of the Postgres shared preload library as it appears in the `shared_preload_libraries` parameter (for example, `pg_stat_statements`).","type":"string"},"version":{"description":"Version of the preload library.","type":"string"}},"required":["description","is_default","is_experimental","library_name","version"],"type":"object"},"BackupSchedule":{"properties":{"schedule":{"description":"List of schedule entries defining the backup frequency. At least one entry is required.","items":{"$ref":"#/components/schemas/BackupScheduleItem"},"type":"array"}},"required":["schedule"],"type":"object"},"BackupScheduleItem":{"properties":{"day":{"description":"The day of the week or month to take the snapshot (if applicable).\n","maximum":31,"minimum":1,"type":"integer"},"frequency":{"description":"How often to take snapshots. Known values: `daily`, `weekly`, `monthly`.\n","example":"daily","type":"string"},"hour":{"description":"The hour of the day to take the snapshot (if applicable).\n","maximum":23,"minimum":0,"type":"integer"},"month":{"description":"The month of the year to take the snapshot (if applicable).\n","maximum":12,"minimum":1,"type":"integer"},"retention_seconds":{"default":3024000,"description":"How long to keep a scheduled snapshot (in seconds) before it's automatically deleted.\nThe default is 3024000 seconds (35 days), which is also the maximum.\nManually created snapshots have no maximum retention: set their `expires_at` instead.\n","maximum":3024000,"minimum":3600,"type":"integer"}},"required":["frequency"],"type":"object"},"BillingAccount":{"properties":{"address_city":{"description":"Billing address city.\n","type":"string"},"address_country":{"description":"Billing address country code defined by ISO 3166-1 alpha-2.\n","type":"string"},"address_country_name":{"description":"Billing address country name.\n","type":"string"},"address_line1":{"description":"Billing address line 1.\n","type":"string"},"address_line2":{"description":"Billing address line 2.\n","type":"string"},"address_postal_code":{"description":"Billing address postal code.\n","type":"string"},"address_state":{"description":"Billing address state or region.\n","type":"string"},"email":{"description":"Billing email, to receive emails related to invoices and subscriptions.\n","format":"email","maxLength":256,"minLength":1,"type":"string"},"name":{"description":"The full name of the individual or entity that owns the billing account. This name appears on invoices.","type":"string"},"orb_portal_url":{"description":"Orb user portal url\n","type":"string"},"payment_method":{"$ref":"#/components/schemas/BillingPaymentMethod"},"payment_source":{"$ref":"#/components/schemas/PaymentSource","description":"Payment source attached to the billing account, such as a credit card on file."},"plan_details":{"$ref":"#/components/schemas/PlanDetails","description":"Details of the subscription plan associated with the billing account."},"quota_reset_at_last":{"description":"Timestamp of the last quota reset. Set to the account creation time when the account is first created.\n","format":"date-time","type":"string"},"spending_limit_cents":{"description":"Monthly spending cap in cents for V3 paid plans. When set,\nnotifications are sent at 80% and 100% of this limit. `null`\nmeans no limit is configured.\n","format":"int64","type":["integer","null"]},"state":{"$ref":"#/components/schemas/BillingAccountState","description":"State of the billing account. `UNKNOWN`: state is not determined. `active`: the account is active and in normal operation. `suspended`: the account has been suspended. `deactivated`: the account has been deactivated. `deleted`: the account has been deleted.\n"},"subscription_type":{"$ref":"#/components/schemas/BillingSubscriptionType"},"tax_id":{"description":"The tax identification number for the billing account, displayed on invoices.\n","type":"string"},"tax_id_type":{"description":"The type of the tax identification number based on the country.\n","type":"string"}},"required":["address_city","address_country","address_line1","address_line2","address_postal_code","address_state","email","name","payment_method","payment_source","quota_reset_at_last","state","subscription_type"],"type":"object","x-sensitive":["name","email","state","tax_id","address_city","address_country","address_line1","address_line2","address_postal_code","address_state"]},"BillingAccountState":{"description":"State of the billing account.\n","enum":["UNKNOWN","active","suspended","deactivated","deleted"],"type":"string"},"BillingPaymentMethod":{"description":"Indicates whether and how an account makes payments.\n","enum":["UNKNOWN","none","stripe","direct_payment","aws_mp","azure_mp","vercel_mp","staff","trial","sponsorship","shared_payment_token"],"type":"string"},"BillingSubscriptionType":{"description":"Type of subscription to Neon Cloud.\nNotice that for users without billing account this will be \"UNKNOWN\"\n","enum":["UNKNOWN","direct_sales","direct_sales_v3","aws_marketplace","free_v2","free_v3","launch","launch_v3","scale","scale_v3","business","vercel_pg_legacy"],"type":"string"},"Branch":{"example":{"active_time_seconds":922200,"compute_time_seconds":823880990,"cpu_used_sec":461100,"created_at":"2022-11-30T19:09:48Z","creation_source":"console","current_state":"ready","data_transfer_bytes":72911987,"default":true,"id":"br-wispy-meadow-118737","init_source":"parent-data","name":"dev2","parent_id":"br-aged-salad-637688","parent_lsn":"0/1DE2850","project_id":"spring-example-302709","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-12-01T19:53:05Z","written_data_bytes":542998300},"properties":{"active_time_seconds":{"description":"Total time this branch's compute has been active during the current billing period, in seconds (not weighted by compute size). Distinct from `compute_time_seconds`, which is CU-weighted.","format":"int64","type":"integer"},"compute_time_seconds":{"description":"Total Postgres compute time consumed by this branch during the current billing period, in CU-seconds (weighted by compute size). Divide by 3600 for CU-hours.","format":"int64","type":"integer"},"cpu_used_sec":{"deprecated":true,"description":"Deprecated. Use `compute_time_seconds` instead. CPU seconds used by all of the branch's compute endpoints, including deleted ones. This value is reset at the beginning of each billing period.\n","format":"int64","type":"integer"},"created_at":{"description":"A timestamp indicating when the branch was created\n","format":"date-time","type":"string"},"created_by":{"description":"The resolved user model that contains details of the user/org/integration/api_key used for branch creation. This field is filled only in listing/get/create/get/update/delete methods, if it is empty when calling other handlers, it does not mean that it is empty in the system.\n","properties":{"image":{"description":"The URL to the user's avatar image.","type":"string"},"name":{"description":"Display name of the user who created the branch.","type":"string"}},"type":"object"},"creation_source":{"description":"The branch creation source\n","type":"string"},"current_state":{"$ref":"#/components/schemas/BranchState"},"data_transfer_bytes":{"description":"Total data transferred out of the branch, in bytes. Used as a consumption metric.","format":"int64","type":"integer"},"default":{"description":"Whether the branch is the project's default branch\n","type":"boolean"},"expires_at":{"description":"The timestamp when the branch is scheduled to expire and be automatically deleted. Must be set by the client following the [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) format with precision up to seconds (such as 2025-06-09T18:02:16Z). Deletion is performed by a background job and may not occur exactly at the specified time.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n","example":"2025-06-09T18:02:16Z","format":"date-time","type":"string"},"id":{"description":"The branch ID. This value is generated when a branch is created. A `branch_id` value has a `br` prefix. For example: `br-small-term-683261`.\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"init_source":{"description":"Source of initialization for the branch. `parent-data` (default) copies schema and data from the parent. `parent-schema` copies schema only from the parent. `schema-only` creates a root branch with schema only. `import` initializes from an external import.\n","example":"parent-data","type":"string"},"last_reset_at":{"description":"A timestamp indicating when the branch was last reset\n","format":"date-time","type":"string"},"logical_size":{"description":"The logical size of the branch, in bytes\n","format":"int64","type":"integer"},"name":{"description":"The branch name\n","type":"string"},"parent_id":{"description":"The `branch_id` of the parent branch\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"parent_lsn":{"description":"The Log Sequence Number (LSN) on the parent branch from which this branch was created.\nWhen restoring a branch using the `POST /projects/{project_id}/branches/{branch_id}/restore` endpoint,\nthis value isn’t finalized until all operations related to the restore have completed successfully.\n","type":"string"},"parent_timestamp":{"description":"The point in time on the parent branch from which this branch was created.\nWhen restoring a branch using the `POST /projects/{project_id}/branches/{branch_id}/restore` endpoint,\nthis value isn’t finalized until all operations related to the restore have completed successfully.\nAfter all the operations completed, this value might stay empty.\n","format":"date-time","type":"string"},"pending_state":{"$ref":"#/components/schemas/BranchState"},"primary":{"deprecated":true,"description":"Deprecated. Use the `default` field. Whether the branch is the project's primary branch.\n","type":"boolean"},"project_id":{"description":"The ID of the project this branch belongs to.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"protected":{"description":"Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project.\n","type":"boolean"},"recovery":{"$ref":"#/components/schemas/BranchRecoveryInfo"},"restore_status":{"$ref":"#/components/schemas/BranchRestoreStatus"},"restored_as":{"description":"ID of the target branch which was replaced when this branch was restored\n","type":"string"},"restored_from":{"description":"ID of the snapshot that was the restore source for this branch\n","type":"string"},"restricted_actions":{"description":"A list of actions that are currently restricted for this branch and the reason why.\n","items":{"$ref":"#/components/schemas/BranchRestrictedAction"},"type":"array"},"state_changed_at":{"description":"A UTC timestamp indicating when the `current_state` began\n","format":"date-time","type":"string"},"ttl_interval_seconds":{"description":"The time-to-live (TTL) duration originally configured for the branch, in seconds. This read-only value represents the interval between the time `expires_at` was set and the expiration timestamp itself. It is preserved to ensure the same TTL duration is reapplied when resetting the branch from its parent, and only updates when a new `expires_at` value is set.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n","example":3600,"type":"integer"},"updated_at":{"description":"A timestamp indicating when the branch was last updated\n","format":"date-time","type":"string"},"written_data_bytes":{"description":"Data written by this branch during the current billing period, in bytes.","format":"int64","type":"integer"}},"required":["active_time_seconds","compute_time_seconds","cpu_used_sec","created_at","creation_source","current_state","data_transfer_bytes","default","id","name","project_id","protected","state_changed_at","updated_at","written_data_bytes"],"type":"object"},"BranchAiGateway":{"properties":{"base_url":{"description":"The AI-gateway endpoint root for this branch — an OpenAI-compatible\nbase URL. No dialect path is included; clients append the route\n(e.g. `/ai-gateway/openai/v1/responses`) themselves.\n","example":"https://br-cool-moon-42-api.ai.c-2.local.neon.build","format":"uri","type":"string"},"enabled":{"description":"Always `true` in 200 responses. Present for forward compatibility,\nmirroring BranchStorage.enabled.\n","type":"boolean"}},"required":["base_url","enabled"],"type":"object"},"BranchAiGatewayNotEnabled":{"properties":{"code":{"example":"AI_GATEWAY_NOT_ENABLED","type":"string"},"message":{"type":"string"},"reason":{"description":"Machine-readable reason why the AI gateway is unavailable:\n- `ai_gateway_unavailable`: the project's region/cell has no AI gateway configured.\n- `branch_not_found`: the project or branch does not exist, or the caller does not\n  have access to it.\n","enum":["ai_gateway_unavailable","branch_not_found"],"type":"string"}},"required":["code","message","reason"],"type":"object"},"BranchAnonymizedCreateRequest":{"allOf":[{"$ref":"#/components/schemas/AnnotationCreateValueRequest"},{"properties":{"branch_create":{"$ref":"#/components/schemas/BranchCreateRequest"},"masking_rules":{"description":"List of masking rules to apply to the branch.\n","items":{"$ref":"#/components/schemas/MaskingRule"},"type":"array"},"start_anonymization":{"default":false,"description":"If true, automatically start anonymization after the branch is created.\nDefaults to false.\n","type":"boolean"}},"type":"object"}]},"BranchCreateRequest":{"properties":{"branch":{"description":"Optional configuration for the new branch, for example `name`, `parent_id` (fork from a branch), `parent_lsn` or `parent_timestamp` (point-in-time branching), and `protected`.","properties":{"archived":{"description":"Whether to create the branch in the archived state. When omitted, the branch is created as a normal (non-archived) branch.\n","type":"boolean"},"expires_at":{"description":"The timestamp when the branch is scheduled to expire and be automatically deleted. Must be set by the client following the [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) format with precision up to seconds (such as 2025-06-09T18:02:16Z). Deletion is performed by a background job and may not occur exactly at the specified time.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n","example":"2025-06-09T18:02:16Z","format":"date-time","type":"string"},"init_source":{"description":"Source of initialization for the branch. `parent-data` copies schema and data from the parent branch. `parent-schema` copies schema only from the parent branch. `schema-only` creates a new root branch containing schema only, using `parent_id` as the source; optionally, `parent_lsn` or `parent_timestamp` can narrow the source point. `import` initializes the branch from an external import.","example":"parent-data","type":"string"},"name":{"description":"The branch name\n","maxLength":256,"minLength":1,"type":"string"},"parent_id":{"description":"The `branch_id` of the parent branch. If omitted or empty, the branch will be created from the project's default branch.\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"parent_lsn":{"description":"A Log Sequence Number (LSN) on the parent branch. The branch will be created with data from this LSN.\n","type":"string"},"parent_timestamp":{"description":"A timestamp identifying a point in time on the parent branch. The branch will be created with data starting from this point in time. RFC 3339 format.\n","example":"2024-02-26T12:00:00Z","format":"date-time","type":"string"},"protected":{"default":false,"description":"Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. Can be gated by `protected_branches_only` in the IP allowlist. Paid plans only.\n","type":"boolean"}},"type":"object"},"endpoints":{"description":"Compute endpoints to create together with the branch. If omitted, the branch is created without any compute endpoint. Endpoints can be added to the branch separately after creation.","items":{"$ref":"#/components/schemas/BranchCreateRequestEndpointOptions"},"type":"array"}},"type":"object"},"BranchCreateRequestEndpointOptions":{"properties":{"autoscaling_limit_max_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"Maximum number of Compute Units the endpoint can scale up to. Minimum 0.25.\n"},"autoscaling_limit_min_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"Minimum number of Compute Units the endpoint can scale down to. Minimum 0.25.\n"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"settings":{"$ref":"#/components/schemas/EndpointSettingsData","description":"Compute endpoint settings: `pg_settings` (Postgres parameter overrides such as `work_mem`, `max_connections`) and `preload_libraries`."},"suspend_timeout_seconds":{"$ref":"#/components/schemas/SuspendTimeoutSeconds","description":"Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value."},"type":{"$ref":"#/components/schemas/EndpointType"}},"required":["type"],"type":"object"},"BranchOperations":{"allOf":[{"$ref":"#/components/schemas/BranchResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]},"BranchRecoveryInfo":{"description":"Recovery information for a deleted branch. Only present when listing deleted branches\nwith `include_deleted=true`.\n\nThis is part of the Branch Recovery feature, which is in preview and not available to all users.\n","properties":{"deleted_at":{"description":"Timestamp when the branch was deleted\n","format":"date-time","type":"string"},"deletion_method":{"description":"How the branch was deleted: 'user' for manual deletion, 'ttl' for TTL expiration\n","enum":["user","ttl"],"type":"string"},"recoverable_until":{"description":"Timestamp when the recovery window expires and the branch will be permanently deleted\n","format":"date-time","type":"string"}},"required":["deleted_at","deletion_method","recoverable_until"],"type":"object"},"BranchResponse":{"properties":{"branch":{"$ref":"#/components/schemas/Branch","description":"Branch returned by the request."}},"required":["branch"],"type":"object"},"BranchRestoreRequest":{"properties":{"preserve_under_name":{"description":"Name under which to save the current branch state before restoring. Required when the branch has children or when `source_branch_id` equals the branch being restored; in those cases all existing child branches are moved to the newly created branch. If omitted and not required, the previous state is not preserved.\n","type":"string"},"source_branch_id":{"description":"The `branch_id` of the restore source branch.\nIf `source_timestamp` and `source_lsn` are omitted, the branch will be restored to head.\nIf `source_branch_id` is equal to the branch's id, `source_timestamp` or `source_lsn` is required.\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"source_lsn":{"description":"A Postgres LSN (for example, `0/1A2B3C4`) on the source branch to restore from.\nMutually exclusive with `source_timestamp`. Omit both to restore to head.\n","type":"string"},"source_timestamp":{"description":"A point in time on the source branch to restore from, in RFC 3339 format. When omitted alongside `source_lsn`, the branch is restored to the latest available state of the source branch.\n","example":"2024-02-26T12:00:00Z","format":"date-time","type":"string"}},"required":["source_branch_id"],"type":"object"},"BranchRestoreStatus":{"description":"Could be `restored`, `finalized` or `detaching`.\nA `restored` branch becomes permanently `finalized` when you call `finalizeRestoreBranch`\nA `restored` or `finalized` branch may begin `detaching` as a one-time performance optimisation, after which it will continue in its original state\n","type":"string"},"BranchRestrictedAction":{"description":"An action that is currently restricted for the branch and the reason why.\n","properties":{"name":{"description":"The name of a restricted action on a branch. `restore`: the branch cannot be used as a restore target. `delete-rw-endpoint`: the read-write endpoint for the branch cannot be deleted.\n","example":"restore","type":"string"},"reason":{"description":"A human-readable explanation of why the action is restricted.\n","type":"string"}},"required":["name","reason"],"type":"object"},"BranchSchemaCompareResponse":{"properties":{"diff":{"description":"Unified diff of the SQL schema changes between the compared branches.","type":"string"}},"type":"object"},"BranchSchemaJSON":{"properties":{"tables":{"description":"Tables present in the branch schema.","items":{"properties":{"columns":{"description":"Columns belonging to this table, each describing a column's name and attributes.","items":{"properties":{"generated":{"description":"Whether the column is a generated (computed) column","type":"boolean"},"name":{"description":"Name of the column.","type":"string"},"type":{"description":"Postgres data type of the column, for example \"integer\" or \"text\".","type":"string"}},"required":["name","type"],"type":"object"},"type":"array"},"constraints":{"description":"Table constraints defined in the branch schema, such as primary key, foreign key, unique, and check constraints.","items":{"properties":{"columns":{"description":"Column names participating in this constraint","items":{"type":"string"},"minItems":1,"type":"array"},"name":{"description":"Optional name of the constraint","type":"string"},"referenced_table":{"description":"For foreign keys - the referenced table information","properties":{"columns":{"description":"Names of the referenced columns","items":{"type":"string"},"type":"array"},"schema":{"description":"Schema of the referenced table","type":"string"},"table":{"description":"Name of the referenced table","type":"string"}},"required":["columns","schema","table"],"type":"object"},"type":{"description":"Type of constraint. Possible values: `primary_key`, `unique`, `foreign_key`\n","type":"string"}},"required":["columns","type"],"type":"object"},"type":"array"},"name":{"description":"Name of the table within the schema.","type":"string"},"schema":{"description":"Postgres schema (namespace) that contains the table, for example `public`.","type":"string"}},"required":["columns","name","schema"],"type":"object"},"type":"array"}},"required":["tables"],"type":"object"},"BranchSchemaResponse":{"properties":{"json":{"$ref":"#/components/schemas/BranchSchemaJSON","description":"Branch schema represented as a structured JSON object, parallel to the SQL DDL in `sql`."},"sql":{"description":"Branch schema expressed as SQL DDL statements.","type":"string"}},"type":"object"},"BranchState":{"description":"The branch’s state, indicating if it is initializing, ready for use, or archived.\n  * 'init' - the branch is being created but is not available for querying.\n  * 'resetting' - the branch is being reset to a specific point in time or LSN and is not yet available for querying.\n  * 'ready' - the branch is fully operational and ready for querying. Expect normal query response times.\n  * 'archived' - the branch is stored in cost-effective archival Postgres storage. Expect slow query response times.\n","type":"string"},"BranchStorage":{"properties":{"enabled":{"description":"Always `true` in 200 responses. Present for forward compatibility: a\nfuture version may add intermediate states; callers should treat `true`\nas \"object storage is usable for this branch right now.\"\n","type":"boolean"},"force_path_style":{"description":"Whether the S3 client must use path-style addressing\n(bucket-in-path rather than virtual-hosted subdomain).\nAlways true: the wildcard TLS cert covers one level of subdomain\n(*.storage.<suffix>), so the branch ID occupies that label and the\nbucket name must travel in the request path, not as a further\nsubdomain. Callers must set the S3 SDK's ForcePathStyle (or\nequivalent) to true.\n","example":true,"type":"boolean"},"region":{"description":"The AWS region for this branch's object storage. The platform normalizes\nthe us-east-1 convention server-side: a non-empty region string is\nalways returned in 200 responses (e.g. `\"us-east-1\"` for the S3\ndefault region).\n","example":"us-east-2","type":"string"},"s3_endpoint":{"description":"The S3-compatible endpoint URL for this branch.","example":"https://br-cool-moon-42.storage.c-2.local.neon.build","format":"uri","type":"string"}},"required":["enabled","force_path_style","region","s3_endpoint"],"type":"object"},"BranchStorageNotEnabled":{"properties":{"code":{"example":"STORAGE_NOT_ENABLED","type":"string"},"message":{"type":"string"},"reason":{"description":"Machine-readable reason why object storage is unavailable:\n- `org_not_entitled`: the org's `PlatformBranchableStorage` feature flag is off.\n- `region_unavailable`: the project's region has no object storage admin service wired.\n- `branch_directory_missing`: the branch is not registered in the object storage service.\n- `branch_not_found`: the project or branch does not exist, or the caller does not\n  have access to it.\n","enum":["org_not_entitled","region_unavailable","branch_directory_missing","branch_not_found"],"type":"string"}},"required":["code","message","reason"],"type":"object"},"BranchUpdateRequest":{"properties":{"branch":{"description":"Branch attributes to update. Supply only the fields you want to change, for example `name` or `protected`.","properties":{"expires_at":{"description":"The timestamp when the branch is scheduled to expire and be automatically deleted. Must be set by the client following the [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) format with precision up to seconds (such as 2025-06-09T18:02:16Z). Deletion is performed by a background job and may not occur exactly at the specified time. If this field is set to null, the expiration timestamp is removed.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n","example":"2025-06-09T18:02:16Z","format":"date-time","type":["null","string"]},"name":{"description":"New display name for the branch.","maxLength":256,"minLength":1,"type":"string"},"protected":{"description":"Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. Can be gated by `protected_branches_only` in the IP allowlist. Paid plans only.\n","type":"boolean"}},"type":"object"}},"required":["branch"],"type":"object"},"BranchesCountResponse":{"properties":{"count":{"description":"Total number of branches in the project.","format":"int","type":"integer"}},"required":["count"],"type":"object"},"BranchesResponse":{"properties":{"branches":{"description":"Branches in the project. Each includes `id`, `name`, `current_state`, and `created_at`.","items":{"$ref":"#/components/schemas/Branch"},"type":"array"}},"required":["branches"],"type":"object"},"Bucket":{"properties":{"access_level":{"$ref":"#/components/schemas/BucketAccessLevel"},"created_at":{"description":"When the bucket was created. For a bucket inherited from an\nancestor branch this is the ancestor's creation time (the branch\nfork never re-creates the bucket).\n","format":"date-time","type":"string"},"name":{"description":"The bucket name (unique within a branch).","type":"string"}},"required":["access_level","created_at","name"],"type":"object"},"BucketAccessLevel":{"description":"Controls anonymous access to objects in the bucket.\n- `private`: all reads and writes require authenticated requests (default).\n- `public_read`: anonymous `GetObject`/`HeadObject` requests succeed; listing,\n  writes, and deletes still require authenticated requests.\n","enum":["private","public_read"],"type":"string"},"BucketCreateRequest":{"properties":{"access_level":{"default":"private","description":"Access level for the bucket. Defaults to `private`. Set to `public_read`\nto allow anonymous `GetObject`/`HeadObject` on objects in this bucket.\n","enum":["private","public_read"],"type":"string"},"name":{"description":"The bucket name.","maxLength":255,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"BucketObject":{"properties":{"etag":{"description":"The object's entity tag (content hash).","type":"string"},"key":{"description":"The full object key.","type":"string"},"last_modified":{"description":"The time the object was last modified.","format":"date-time","type":"string"},"size":{"description":"The object size in bytes.","format":"int64","type":"integer"}},"required":["etag","key","last_modified","size"],"type":"object"},"BucketObjectsDeletePrefixResponse":{"properties":{"deleted":{"description":"The number of objects soft-deleted under the prefix. 0 when no live\nobject matched the prefix on this branch.\n","format":"int64","type":"integer"}},"required":["deleted"],"type":"object"},"BucketObjectsListResponse":{"properties":{"folders":{"description":"Common prefixes (folder names) collapsed under the requested\n`delimiter`. Empty when no `delimiter` was supplied.\n","items":{"type":"string"},"type":"array"},"is_truncated":{"description":"True when more results exist beyond this page.","type":"boolean"},"next_cursor":{"description":"Pagination cursor to pass as `cursor` on the next request. Empty\nwhen the listing is not truncated.\n","type":"string"},"objects":{"description":"Objects whose keys did not collapse into a folder.","items":{"$ref":"#/components/schemas/BucketObject"},"type":"array"},"prefix":{"description":"The prefix that was applied to this listing (echoed back).","type":"string"}},"required":["folders","is_truncated","objects","prefix"],"type":"object"},"BucketResponse":{"properties":{"bucket":{"$ref":"#/components/schemas/Bucket"}},"required":["bucket"],"type":"object"},"BucketsListResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/Bucket"},"type":"array"}},"required":["buckets"],"type":"object"},"ComputeUnit":{"minimum":0.25,"type":"number"},"ConnectionDetails":{"properties":{"connection_parameters":{"$ref":"#/components/schemas/ConnectionParameters","description":"Individual components of the connection URI (host, port, database, role, and password) as discrete fields, for programmatic use rather than parsing the sibling `connection_uri` string."},"connection_uri":{"description":"The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)\nThe connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.\nWhen creating a branch from a parent with more than one role or database, the response body does not include a connection URI.\n","type":"string"}},"required":["connection_parameters","connection_uri"],"type":"object","x-sensitive":["connection_uri"]},"ConnectionParameters":{"properties":{"database":{"description":"Name of the Postgres database used in the connection URI.\n","type":"string"},"host":{"description":"Hostname of the compute endpoint. Use `pooler_host` for the pooled connection hostname.\n","type":"string"},"password":{"description":"Authentication password for the role, used in the connection URI.\n","type":"string"},"pooler_host":{"description":"PgBouncer (transaction mode) pooled host, the `-pooler` variant of `host`. Connect through it to work around the Postgres `max_connections` limit for serverless or connection-per-request workloads.\n","type":"string"},"role":{"description":"Postgres role used to authenticate the database connection.\n","type":"string"}},"required":["database","host","password","pooler_host","role"],"type":"object","x-sensitive":["database","host","pooler_host","password"]},"ConnectionURIResponse":{"properties":{"uri":{"description":"The connection URI.\n","type":"string"}},"required":["uri"],"type":"object"},"ConnectionURIsOptionalResponse":{"properties":{"connection_uris":{"description":"Connection URIs for the compute endpoint, including credentials.","items":{"$ref":"#/components/schemas/ConnectionDetails"},"type":"array"}},"type":"object"},"ConnectionURIsResponse":{"properties":{"connection_uris":{"description":"Connection URIs for the project. Each entry contains credentials and should be treated as sensitive.","items":{"$ref":"#/components/schemas/ConnectionDetails"},"type":"array"}},"required":["connection_uris"],"type":"object","x-sensitive":["connection_uris"]},"ConsumptionHistoryGranularity":{"enum":["hourly","daily","monthly"],"type":"string"},"ConsumptionHistoryPerBranchV2":{"properties":{"branch_id":{"description":"The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`.","example":"br-cool-darkness-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"periods":{"description":"Consumption history records for the branch, grouped by billing period.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerPeriodV2"},"type":"array"},"project_id":{"description":"The ID of the project that owns this branch.","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["branch_id","periods","project_id"],"type":"object"},"ConsumptionHistoryPerBranchV2Response":{"properties":{"branches":{"description":"Per-branch consumption history records returned for the requested time range.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerBranchV2"},"type":"array"}},"required":["branches"],"type":"object"},"ConsumptionHistoryPerPeriod":{"example":{"consumption":[{"active_time_seconds":27853,"compute_time_seconds":18346,"synthetic_storage_size_bytes":0,"timeframe_end":"2024-03-23T00:00:00Z","timeframe_start":"2024-03-22T00:00:00Z","written_data_bytes":1073741824},{"active_time_seconds":17498,"compute_time_seconds":3378,"synthetic_storage_size_bytes":0,"timeframe_end":"2024-03-24T00:00:00Z","timeframe_start":"2024-03-23T00:00:00Z","written_data_bytes":5741824}],"period_id":"79ec829f-1828-4006-ac82-9f1828a0067d","period_plan":"scale","period_start":"2024-03-01T00:00:00Z"},"properties":{"consumption":{"description":"Consumption metric records for the billing period.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerTimeframe"},"type":"array"},"period_end":{"description":"The end date-time of the billing period, available for the past periods only.\n","format":"date-time","type":"string"},"period_id":{"description":"The ID assigned to the specified billing period.","format":"uuid","type":"string"},"period_plan":{"description":"The billing plan applicable during the billing period.","type":"string"},"period_start":{"description":"The start date-time of the billing period.\n","format":"date-time","type":"string"}},"required":["consumption","period_id","period_plan","period_start"],"type":"object"},"ConsumptionHistoryPerPeriodV2":{"example":{"consumption":[{"metrics":[{"metric_name":"compute_unit_seconds","value":100},{"metric_name":"root_branch_bytes_month","value":1000000},{"metric_name":"child_branch_bytes_month","value":1000000}],"timeframe_end":"2024-03-23T00:00:00Z","timeframe_start":"2024-03-22T00:00:00Z"}],"period_id":"79ec829f-1828-4006-ac82-9f1828a0067d","period_plan":"scale","period_start":"2024-03-01T00:00:00Z"},"properties":{"consumption":{"description":"Consumption metric records for the billing period.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerTimeframeV2"},"type":"array"},"period_end":{"description":"The end date-time of the billing period, available for the past periods only.\n","format":"date-time","type":"string"},"period_id":{"description":"The ID assigned to the specified billing period.","format":"uuid","type":"string"},"period_plan":{"description":"The billing plan applicable during the billing period.","type":"string"},"period_start":{"description":"The start date-time of the billing period.\n","format":"date-time","type":"string"}},"required":["consumption","period_id","period_plan","period_start"],"type":"object"},"ConsumptionHistoryPerProject":{"properties":{"periods":{"description":"Consumption periods for the project, each covering a discrete billing interval.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerPeriod"},"type":"array"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["periods","project_id"],"type":"object"},"ConsumptionHistoryPerProjectResponse":{"properties":{"projects":{"description":"Per-project consumption history records included in the response.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerProject"},"type":"array"}},"required":["projects"],"type":"object"},"ConsumptionHistoryPerProjectV2":{"properties":{"periods":{"description":"Consumption periods recorded for this project.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerPeriodV2"},"type":"array"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["periods","project_id"],"type":"object"},"ConsumptionHistoryPerProjectV2Response":{"properties":{"projects":{"description":"Per-project consumption history entries for the requested time range.","items":{"$ref":"#/components/schemas/ConsumptionHistoryPerProjectV2"},"type":"array"}},"required":["projects"],"type":"object"},"ConsumptionHistoryPerTimeframe":{"properties":{"active_time_seconds":{"description":"Seconds. The amount of time the compute endpoints have been active.\n","format":"uint64","type":"integer"},"compute_time_seconds":{"description":"Seconds. The number of CPU seconds used by compute endpoints, including compute endpoints that have been deleted.\n","format":"uint64","type":"integer"},"data_storage_bytes_hour":{"description":"Bytes-Hour. The amount of Postgres storage consumed hourly.\n","format":"uint64","type":"integer"},"logical_size_bytes":{"description":"Bytes. The amount of logical size consumed.\n","format":"uint64","type":"integer"},"logical_size_bytes_hour":{"description":"Bytes-Hour. The amount of logical size consumed hourly.\n","format":"uint64","type":"integer"},"synthetic_storage_size_bytes":{"deprecated":true,"description":"Deprecated: always returns 0. Use the consumption history v2 endpoints (`/consumption_history/v2/projects`, `/consumption_history/v2/branches`) instead.\nBytes. The space occupied in Postgres storage. Synthetic Postgres storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches.\n","format":"uint64","type":"integer"},"timeframe_end":{"description":"The specified end date-time for the reported consumption.\n","format":"date-time","type":"string"},"timeframe_start":{"description":"The specified start date-time for the reported consumption.\n","format":"date-time","type":"string"},"written_data_bytes":{"description":"Bytes. The amount of written data for all branches.\n","format":"uint64","type":"integer"}},"required":["active_time_seconds","compute_time_seconds","synthetic_storage_size_bytes","timeframe_end","timeframe_start","written_data_bytes"],"type":"object"},"ConsumptionHistoryPerTimeframeV2":{"properties":{"metrics":{"description":"Consumption metric values recorded for the timeframe.","items":{"$ref":"#/components/schemas/ConsumptionMetricValue"},"type":"array"},"timeframe_end":{"description":"The specified end date-time for the reported consumption.\n","format":"date-time","type":"string"},"timeframe_start":{"description":"The specified start date-time for the reported consumption.\n","format":"date-time","type":"string"}},"type":"object"},"ConsumptionHistoryQueryMetrics":{"items":{"type":"string"},"type":"array"},"ConsumptionMetricValue":{"properties":{"metric_name":{"description":"Name of the consumption metric, such as compute_time or data_storage_bytes_hour.","type":"string"},"value":{"description":"Measured quantity for the metric named by `metric_name`.","type":"integer"}},"required":["metric_name","value"],"type":"object"},"CreateBranchNeonAuthNewUserRequest":{"properties":{"email":{"description":"Email address of the new Neon Auth user to create.","format":"email","maxLength":256,"minLength":1,"type":"string"},"name":{"description":"Display name for the new user. Optional. Pair with the required email field when creating a new user.","maxLength":255,"minLength":1,"type":"string"}},"required":["email"],"type":"object","x-sensitive":["email","name"]},"CreateCredentialRequest":{"properties":{"name":{"description":"Free-form customer label for the credential.","maxLength":256,"type":"string"},"principal_type":{"description":"Principal type for the credential. Only `user` is customer-managed\nand accepted here. `function` and `system` credentials are\nplatform-internal (e.g. function-serve auto-mint, presign signer)\nand are never issued through the customer-facing API.\n","enum":["user"],"type":"string"},"scopes":{"items":{"$ref":"#/components/schemas/CredentialScope"},"maxItems":16,"minItems":1,"type":"array"}},"required":["principal_type","scopes"],"type":"object"},"CreateCredentialResponse":{"properties":{"api_token":{"description":"Bearer token; returned exactly once.","type":"string"},"branch_id":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"description":"When the credential expires; absent means never expires.\n","format":"date-time","type":"string"},"name":{"description":"Customer-supplied label, echoed back from the request. Absent when not provided.","type":"string"},"s3_secret_access_key":{"description":"nsk_live_<64 hex>; the AWS_SECRET_ACCESS_KEY, returned exactly once.","type":"string"},"scopes":{"items":{"$ref":"#/components/schemas/GrantedCredentialScope"},"type":"array"},"token_id":{"description":"Opaque credential id (e.g. nak_live_<32hex>).","type":"string"},"token_id_short":{"description":"First 12 hex chars of token_id; safe to log.","type":"string"}},"required":["api_token","branch_id","created_at","s3_secret_access_key","scopes","token_id","token_id_short"],"type":"object","x-sensitive":["api_token","s3_secret_access_key"]},"CredentialMeta":{"properties":{"branch_id":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"description":"When the credential expires; absent means never expires. The\nverifier refuses to authenticate after `expires_at <= now()`.\n","format":"date-time","type":"string"},"function_id":{"type":"string"},"last_used_at":{"format":"date-time","type":"string"},"name":{"description":"Customer-supplied label; absent when not provided at issuance.","type":"string"},"principal_type":{"type":"string"},"revoked_at":{"format":"date-time","type":"string"},"scopes":{"items":{"$ref":"#/components/schemas/GrantedCredentialScope"},"type":"array"},"token_id":{"description":"Opaque credential id (e.g. nak_live_<32hex>).","type":"string"},"token_id_short":{"type":"string"}},"required":["created_at","principal_type","scopes","token_id","token_id_short"],"type":"object"},"CredentialScope":{"description":"A single capability you may request when issuing a credential. A\ncredential is granted a set of these; it may only perform actions\nexplicitly listed in its scopes.\n\nThis is the *requestable* set. Responses describing an existing\ncredential use `GrantedCredentialScope`, which is deliberately wider:\na credential may have been granted a scope that this endpoint does not\noffer, and a response must be able to report it.\n","enum":["storage:read","storage:write","ai_gateway:invoke","functions:invoke"],"type":"string"},"CredentialSecret":{"description":"The live secrets of an existing credential, recovered on demand by the\nreveal endpoint. `api_token` and `s3_secret_access_key` are the same\nvalues handed back once at issuance.\n\nThe field set is deliberately narrower than `CreateCredentialResponse`:\nit carries only what reveal can actually recover. `token_id_short`,\n`scopes`, `principal_type`, `created_at` and `expires_at` are metadata,\nnot secrets — read them from the list endpoint instead.\n\nNo `branch_id` is returned. Reveal is scoped by `(project_id,\ntoken_id)`, so the branch in the request path authorizes the call but\nis not proven to be the branch the credential was issued on. Echoing it\nback would assert an anchor this endpoint never verified. For a\ncredential's true anchor branch, read `branch_id` from the list\nendpoint, which is branch-exact.\n","properties":{"api_token":{"description":"Bearer token.","type":"string"},"s3_secret_access_key":{"description":"nsk_live_<64 hex>; the AWS_SECRET_ACCESS_KEY.","type":"string"},"token_id":{"description":"Opaque credential id (e.g. nak_live_<32hex>).","type":"string"}},"required":["api_token","s3_secret_access_key","token_id"],"type":"object","x-sensitive":["api_token","s3_secret_access_key"]},"CurrentUserAuthAccount":{"properties":{"email":{"description":"Email address associated with this auth account.","format":"email","maxLength":256,"minLength":1,"type":"string"},"image":{"description":"URL of the user's profile picture as provided by the identity provider.","type":"string"},"login":{"deprecated":true,"description":"Deprecated. Use the `email` field.\n","type":"string"},"name":{"description":"Display name of the account as provided by the identity provider.","type":"string"},"provider":{"$ref":"#/components/schemas/IdentityProviderId"}},"required":["email","image","login","name","provider"],"type":"object","x-sensitive":["email","name","login"]},"CurrentUserInfoResponse":{"properties":{"active_seconds_limit":{"description":"Control plane observes active endpoints of a user this amount of wall-clock time.\n","format":"int64","type":"integer"},"auth_accounts":{"description":"Authentication provider accounts linked to the current user.","items":{"$ref":"#/components/schemas/CurrentUserAuthAccount"},"type":"array"},"billing_account":{"$ref":"#/components/schemas/BillingAccount","description":"Billing account associated with the current user, including plan and subscription details."},"branches_limit":{"description":"Maximum number of branches allowed for the account under the current plan.","format":"int64","type":"integer"},"compute_seconds_limit":{"description":"Maximum Postgres compute time, in seconds, allowed under the account's current plan.","format":"int64","type":"integer"},"email":{"description":"Email address of the authenticated user.","format":"email","maxLength":256,"minLength":1,"type":"string"},"id":{"description":"The Neon user ID.","type":"string"},"image":{"description":"URL of the user's profile avatar image.","type":"string"},"last_name":{"description":"Last name of the current user.","type":"string"},"login":{"deprecated":true,"description":"Deprecated. Use the `email` field.\n","type":"string"},"max_autoscaling_limit":{"description":"The maximum autoscaling limit in Compute Units.\nA value of 0 indicates no limit is configured.\n","format":"double","type":"number"},"name":{"description":"First name of the current user.","type":"string"},"plan":{"description":"Current billing plan for the user's account.","type":"string"},"projects_limit":{"description":"Maximum number of projects the account is allowed to create under the current plan.","format":"int64","type":"integer"}},"required":["active_seconds_limit","auth_accounts","branches_limit","email","id","image","last_name","login","max_autoscaling_limit","name","plan","projects_limit"],"type":"object","x-sensitive":["email","name","last_name","login"]},"CursorPagination":{"description":"To paginate the response, issue an initial request with `limit` value. Then, add the value returned in the response `.pagination.next` attribute into the request under the `cursor` query parameter to the subsequent request to retrieve next page in pagination. The contents on cursor `next` are opaque, clients are not expected to make any assumptions on the format of the data inside the cursor.","properties":{"next":{"description":"Cursor for the next page of results. Pass it as the `cursor` query parameter on the next request. Absent on the last page.","type":"string"},"sort_by":{"description":"Field by which the results were sorted, echoing the request's sort_by parameter.","type":"string"},"sort_order":{"description":"Sort order active for this page. Pass back as `sort_order` in the next request to maintain consistent ordering. Valid values are `asc` and `desc`.","type":"string"}},"type":"object"},"CursorPaginationResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/CursorPagination"}},"type":"object"},"CustomDomain":{"properties":{"binding_status":{"description":"Whether Neon's internal routing for the domain is published:\n`pending`, `present`, or `missing`. `missing` is an internal fault\nsurfaced for support. Not an `enum`.\n","type":"string"},"cname_target":{"description":"The hostname the customer must point their custom domain at with a\nCNAME record. Empty when the serving region has no custom-domains\nfront door configured. This is the activation input: point DNS here\nand the domain goes live (see `status`) once a certificate is issued\non the first request.\n","type":"string"},"dns_status":{"description":"The DNS + CAA portion of the check: `pending` (no records yet), `ok`\n(resolves to our edge and the CA is authorized), `misconfigured` (your\nCNAME does not resolve to our edge), or `caa_blocked` (your CAA records\nforbid Let's Encrypt). Not an `enum`.\n","type":"string"},"domain":{"description":"The registered custom domain (normalized, lowercase).","type":"string"},"entity_id":{"description":"The target entity's identifier within the branch. For `function` this\nis the function slug.\n","type":"string"},"entity_type":{"description":"The kind of branch entity the domain targets. Possible values:\n`function` (v1 supports only `function`). Not an `enum`: new values may\nship in later spec versions — treat any undocumented value as unknown.\n","type":"string"},"status":{"description":"The domain's current validity, computed by a background check:\n`pending` (still converging — point your CNAME at `cname_target` and\nwait), `active` (live: DNS resolves to the edge, the CA is authorized,\nand routing is published), or `error` (a fixable problem — see\n`status_reason`). Not an `enum`: treat any undocumented value as\nunknown. May be absent briefly right after registration.\n","type":"string"},"status_reason":{"description":"A short, stable machine-readable reason for a non-active `status`\n(e.g. `cname-not-pointing-at-edge`, `caa-blocks-lets-encrypt`,\n`binding-missing`), suitable for keying an actionable hint. Empty when\nactive or pending.\n","type":"string"}},"required":["cname_target","domain","entity_id","entity_type"],"type":"object"},"CustomDomainRegisterRequest":{"properties":{"domain":{"description":"The custom domain to register (for example `dashboard.acme.com`).\nCase-insensitive; normalized to lowercase (a trailing root dot is\nstripped, so the 254-char bound admits a fully-qualified name whose\nnormalized form is 253 chars). Neon-managed and internal hostnames are\nrejected.\n","maxLength":254,"minLength":3,"type":"string"},"entity_id":{"description":"The target entity's identifier within the branch. For `function` this\nis the function slug (which must already exist on the branch).\n","maxLength":255,"minLength":1,"type":"string"},"entity_type":{"description":"The kind of branch entity to point the domain at. v1 supports only\n`function`; any other value is rejected with `invalid_entity_type`.\n","example":"function","maxLength":32,"minLength":1,"type":"string"}},"required":["domain","entity_id","entity_type"],"type":"object"},"CustomDomainsListResponse":{"properties":{"custom_domains":{"items":{"$ref":"#/components/schemas/CustomDomain"},"type":"array"}},"required":["custom_domains"],"type":"object"},"DataAPICreateRequest":{"description":"Create Neon Data API","properties":{"add_default_grants":{"default":false,"description":"Grant all permissions to the tables in the public schema to authenticated users","type":"boolean"},"auth_provider":{"description":"Authentication provider for the Neon Data API. `neon_auth`: use Neon's built-in managed authentication (no JWKS configuration required). `external`: use an external JWT provider, which requires `jwks_url`. When omitted, no auth provider is configured (existing setup is kept).","enum":["neon_auth","external"],"type":"string"},"jwks_url":{"description":"URL of the JWKS endpoint used to verify JWTs for this Data API. Required when configuring JWT-based authentication; omit when using a non-JWT auth provider.","format":"uri","type":"string"},"jwt_audience":{"description":"Expected `aud` claim in incoming JWTs. When set, tokens with a different audience are rejected; tokens with no audience are still accepted. Omit to skip audience validation.\n","type":"string"},"provider_name":{"description":"Display name for the authentication provider. Accepted values include \"Clerk\", \"Stytch\", and \"Auth0\", but any non-empty string is valid. Optional field.","type":"string"},"settings":{"$ref":"#/components/schemas/DataAPISettings","description":"Auth and schema configuration for the Data API."},"skip_auth_schema":{"default":false,"description":"Skip creating the auth schema and RLS functions","type":"boolean"}},"type":"object","x-tags":["DataAPI"]},"DataAPICreateResponse":{"description":"Neon Data API created successfully","properties":{"url":{"description":"URL of the created Data API endpoint.","format":"uri","type":"string"}},"required":["url"],"type":"object","x-tags":["DataAPI"]},"DataAPIReponse":{"description":"Neon Data API response","properties":{"available_schemas":{"description":"List of available database schemas (SubZero only)","items":{"type":"string"},"type":["array","null"]},"settings":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/DataAPISettings"}],"description":"Configuration settings for the Data API (SubZero only)","type":"object"},{"type":"null"}]},"status":{"description":"The status of the Neon Data API deployment","type":"string"},"url":{"description":"The URL of the Neon Data API","format":"uri","type":"string"}},"required":["status","url"],"type":"object","x-tags":["DataAPI"]},"DataAPISettings":{"description":"Configuration settings for the Neon Data API","properties":{"db_aggregates_enabled":{"default":true,"description":"Enable aggregates feature","type":"boolean"},"db_anon_role":{"default":"anonymous","description":"Database role to use for anonymous requests","type":"string"},"db_extra_search_path":{"description":"Extra schemas to add to the search path","type":"string"},"db_max_rows":{"description":"Hard limit on the number of rows returned in a single Data API response. No limit when unset.","type":"integer"},"db_schemas":{"description":"List of schemas to expose via the API. Default: [\"public\"]","items":{"type":"string"},"type":"array"},"jwt_cache_max_lifetime":{"description":"Maximum lifetime of the Data API's JWT cache, in seconds.","type":"integer"},"jwt_role_claim_key":{"default":".role","description":"JWT claim key to use for role extraction","type":"string"},"openapi_mode":{"default":"disabled","description":"OpenAPI specification mode (ignore-privileges, disabled)","type":"string"},"server_cors_allowed_origins":{"description":"CORS allowed origins","type":"string"},"server_timing_enabled":{"description":"When enabled, the Data API adds `Server-Timing` headers to each response showing database execution and internal processing time. Default: disabled.","type":"boolean"}},"type":"object","x-tags":["DataAPI"]},"DataAPIUpdateRequest":{"description":"Update Neon Data API","properties":{"settings":{"$ref":"#/components/schemas/DataAPISettings","description":"Configuration settings for the Neon Data API."}},"type":"object","x-tags":["DataAPI"]},"Database":{"example":{"branch_id":"br-wispy-meadow-118737","created_at":"2022-11-30T18:25:15Z","id":834686,"name":"neondb","owner_name":"casey","updated_at":"2022-11-30T18:25:15Z"},"properties":{"branch_id":{"description":"The ID of the branch this database belongs to.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"A timestamp indicating when the database was created\n","format":"date-time","type":"string"},"id":{"description":"The database ID\n","format":"int64","type":"integer"},"name":{"description":"The database name\n","type":"string"},"owner_name":{"description":"The name of role that owns the database\n","type":"string"},"updated_at":{"description":"A timestamp indicating when the database was last updated\n","format":"date-time","type":"string"}},"required":["branch_id","created_at","id","name","owner_name","updated_at"],"type":"object"},"DatabaseCreateRequest":{"properties":{"database":{"description":"Configuration for the new Postgres database.","properties":{"name":{"description":"Name of the database to create.\n","type":"string"},"owner_name":{"description":"The name of the role that owns the database\n","type":"string"}},"required":["name","owner_name"],"type":"object"}},"required":["database"],"type":"object","x-sensitive":["database"]},"DatabaseOperations":{"allOf":[{"$ref":"#/components/schemas/DatabaseResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]},"DatabaseResponse":{"properties":{"database":{"$ref":"#/components/schemas/Database","description":"Database object returned by the operation."}},"required":["database"],"type":"object","x-sensitive":["database"]},"DatabaseUpdateRequest":{"properties":{"database":{"description":"Properties to update on the database.","properties":{"name":{"description":"Name of the database to update.\n","type":"string"},"owner_name":{"description":"The name of the role that owns the database\n","type":"string"}},"type":"object"}},"required":["database"],"type":"object","x-sensitive":["database"]},"DatabasesResponse":{"properties":{"databases":{"description":"Databases on the branch. Each includes `id`, `name`, `owner_name`, and `created_at`.","items":{"$ref":"#/components/schemas/Database"},"type":"array"}},"required":["databases"],"type":"object"},"DefaultEndpointSettings":{"description":"A collection of settings for a Neon endpoint","properties":{"autoscaling_limit_max_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"Default maximum number of Compute Units for endpoints created under this account. At least 0.25.\n"},"autoscaling_limit_min_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"Minimum number of Compute Units for this endpoint. At least 0.25 and no greater than `autoscaling_limit_max_cu`.\n"},"pg_settings":{"$ref":"#/components/schemas/PgSettingsData"},"pgbouncer_settings":{"$ref":"#/components/schemas/PgbouncerSettingsData","deprecated":true,"description":"Deprecated. Use the endpoint-level connection pooler configuration instead. Removal scheduled for June 20, 2026.\n","x-sunset":"2026-06-20"},"suspend_timeout_seconds":{"$ref":"#/components/schemas/SuspendTimeoutSeconds","description":"Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value."}},"type":"object"},"EmptyResponse":{"description":"Empty response.","properties":{},"type":"object"},"EnableNeonAuthIntegrationRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"database_name":{"description":"Name of the database to enable Neon Auth on. When omitted, the integration uses the project's default database.","type":"string"}},"required":["auth_provider"],"type":"object","x-sensitive":["database_name"]},"Endpoint":{"example":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-wispy-meadow-118737","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"init","disabled":false,"host":"ep-silent-smoke-806639.us-east-2.aws.neon.tech","id":"ep-silent-smoke-806639","name":"My cool compute","passwordless_access":true,"pending_state":"active","pooler_enabled":false,"pooler_mode":"transaction","project_id":"spring-example-302709","provisioner":"k8s-neonvm","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":0,"type":"read_write","updated_at":"2022-12-03T15:37:07Z"},"properties":{"autoscaling_limit_max_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"The maximum number of Compute Units\n"},"autoscaling_limit_min_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"The minimum number of Compute Units\n"},"branch_id":{"description":"The ID of the branch this compute endpoint belongs to.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"compute_release_version":{"description":"Attached compute's release version number.\n","type":"string"},"created_at":{"description":"A timestamp indicating when the compute endpoint was created\n","format":"date-time","type":"string"},"creation_source":{"description":"The compute endpoint creation source\n","type":"string"},"current_state":{"$ref":"#/components/schemas/EndpointState"},"disabled":{"description":"Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action.\n","type":"boolean"},"host":{"description":"The hostname of the compute endpoint. This is the hostname specified when connecting to a Neon database.\n","type":"string"},"id":{"description":"The compute endpoint ID. Compute endpoint IDs have an `ep-` prefix. For example: `ep-little-smoke-851426`\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"last_active":{"description":"A timestamp indicating when the compute endpoint was last active\n","format":"date-time","type":"string"},"name":{"description":"Optional name of the compute endpoint\n","type":"string"},"passwordless_access":{"description":"Whether to permit passwordless access to the compute endpoint\n","type":"boolean"},"pending_state":{"$ref":"#/components/schemas/EndpointState","description":"Target state the compute endpoint is transitioning to. Omitted when no transition is in progress."},"pooler_enabled":{"deprecated":true,"description":"Deprecated. To use connection pooling, append `-pooler` to the endpoint ID in the connection string.\n","type":"boolean"},"pooler_mode":{"$ref":"#/components/schemas/EndpointPoolerMode","deprecated":true,"description":"Deprecated. The connection pooler mode. Removal scheduled for June 20, 2026.\n","x-sunset":"2026-06-20"},"project_id":{"description":"The ID of the project this compute endpoint belongs to.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"proxy_host":{"description":"Deprecated. Use the `host` property instead.\n","type":"string"},"region_id":{"description":"Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`.\n","example":"aws-us-east-1","type":"string"},"settings":{"$ref":"#/components/schemas/EndpointSettingsData"},"started_at":{"description":"A timestamp indicating when the compute endpoint was last started\n","format":"date-time","type":"string"},"suspend_timeout_seconds":{"$ref":"#/components/schemas/SuspendTimeoutSeconds","description":"Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` means the plan default applies; `-1` means scale-to-zero is disabled (never suspends)."},"suspended_at":{"description":"A timestamp indicating when the compute endpoint was last suspended\n","format":"date-time","type":"string"},"type":{"$ref":"#/components/schemas/EndpointType"},"updated_at":{"description":"A timestamp indicating when the compute endpoint was last updated\n","format":"date-time","type":"string"}},"required":["autoscaling_limit_max_cu","autoscaling_limit_min_cu","branch_id","created_at","creation_source","current_state","disabled","host","id","passwordless_access","pooler_enabled","pooler_mode","project_id","provisioner","proxy_host","region_id","settings","suspend_timeout_seconds","type","updated_at"],"type":"object","x-sensitive":["host"]},"EndpointCreateRequest":{"properties":{"endpoint":{"description":"Configuration for the compute endpoint to create.","properties":{"autoscaling_limit_max_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"The maximum number of Compute Units.\nSee [Compute size and Autoscaling configuration](https://neon.com/docs/manage/endpoints#compute-size-and-autoscaling-configuration)\nfor more information.\n"},"autoscaling_limit_min_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"The minimum number of Compute Units. The minimum value is `0.25`.\nSee [Compute size and Autoscaling configuration](https://neon.com/docs/manage/endpoints#compute-size-and-autoscaling-configuration)\nfor more information.\n"},"branch_id":{"description":"The ID of the branch the compute endpoint will be associated with\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"disabled":{"description":"Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n","type":"boolean"},"name":{"description":"Optional name of the compute endpoint\n","maxLength":64,"minLength":1,"type":"string"},"passwordless_access":{"description":"NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint.\n","type":"boolean"},"pooler_enabled":{"deprecated":true,"description":"Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string.\nSee [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)\n","type":"boolean"},"pooler_mode":{"$ref":"#/components/schemas/EndpointPoolerMode","deprecated":true,"description":"Deprecated. The connection pooler mode. Removal scheduled for June 20, 2026.\n","x-sunset":"2026-06-20"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"region_id":{"description":"The region where the compute endpoint will be created. Only the project's `region_id` is permitted.\n","type":"string"},"settings":{"$ref":"#/components/schemas/EndpointSettingsData"},"suspend_timeout_seconds":{"$ref":"#/components/schemas/SuspendTimeoutSeconds","description":"Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value."},"type":{"$ref":"#/components/schemas/EndpointType"}},"required":["branch_id","type"],"type":"object"}},"required":["endpoint"],"type":"object"},"EndpointOperations":{"allOf":[{"$ref":"#/components/schemas/EndpointResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]},"EndpointPoolerMode":{"deprecated":true,"description":"Deprecated. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. Removal scheduled for June 20, 2026.\n","enum":["transaction"],"type":"string","x-sunset":"2026-06-20"},"EndpointResponse":{"properties":{"endpoint":{"$ref":"#/components/schemas/Endpoint","description":"Compute endpoint created or retrieved, including its current lifecycle state."}},"required":["endpoint"],"type":"object"},"EndpointSettingsData":{"description":"A collection of settings for a compute endpoint","properties":{"pg_settings":{"$ref":"#/components/schemas/PgSettingsData"},"pgbouncer_settings":{"$ref":"#/components/schemas/PgbouncerSettingsData","deprecated":true,"description":"Deprecated. PgBouncer settings for the compute endpoint. Removal scheduled for June 20, 2026.\n","x-sunset":"2026-06-20"},"preload_libraries":{"$ref":"#/components/schemas/PreloadLibraries"}},"type":"object"},"EndpointState":{"description":"Lifecycle state of the compute endpoint. `init`: being initialized. `active`: running and accepting connections. `idle`: suspended (scaled to zero).","enum":["init","active","idle"],"type":"string"},"EndpointType":{"description":"Compute endpoint type. `read_write`: the primary read-write endpoint (one per branch). `read_only`: a read replica endpoint (multiple allowed per branch).","enum":["read_only","read_write"],"type":"string"},"EndpointUpdateRequest":{"properties":{"endpoint":{"description":"Parameters for the compute endpoint update.","properties":{"autoscaling_limit_max_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"The maximum number of Compute Units.\nSee [Compute size and Autoscaling configuration](https://neon.com/docs/manage/endpoints#compute-size-and-autoscaling-configuration)\nfor more information.\n"},"autoscaling_limit_min_cu":{"$ref":"#/components/schemas/ComputeUnit","description":"The minimum number of Compute Units. The minimum value is `0.25`.\nSee [Compute size and Autoscaling configuration](https://neon.com/docs/manage/endpoints#compute-size-and-autoscaling-configuration)\nfor more information.\n"},"branch_id":{"deprecated":true,"description":"Deprecated. The destination branch ID; must not have an existing read-write endpoint.\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"disabled":{"description":"Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n","type":"boolean"},"name":{"description":"Optional name of the compute endpoint\n","maxLength":64,"minLength":1,"type":"string"},"passwordless_access":{"description":"NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint.\n","type":"boolean"},"pooler_enabled":{"deprecated":true,"description":"Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string.\nSee [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)\n","type":"boolean"},"pooler_mode":{"$ref":"#/components/schemas/EndpointPoolerMode","deprecated":true,"description":"Deprecated. The connection pooler mode. Removal scheduled for June 20, 2026.\n","x-sunset":"2026-06-20"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"settings":{"$ref":"#/components/schemas/EndpointSettingsData"},"suspend_timeout_seconds":{"$ref":"#/components/schemas/SuspendTimeoutSeconds","description":"Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value."}},"type":"object"}},"required":["endpoint"],"type":"object"},"EndpointsOptionalResponse":{"properties":{"endpoints":{"description":"Compute endpoints associated with the project.","items":{"$ref":"#/components/schemas/Endpoint"},"type":"array"}},"type":"object"},"EndpointsResponse":{"properties":{"endpoints":{"description":"Compute endpoints in the project. Each includes `id`, `branch_id`, `host`, and `type`.","items":{"$ref":"#/components/schemas/Endpoint"},"type":"array"}},"required":["endpoints"],"type":"object"},"ErrorCode":{"default":"","type":"string"},"FunctionDeployRequest":{"properties":{"environment":{"description":"Optional JSON object (a string-to-string map) of environment\nvariables for the deployment, e.g. {\"KEY\":\"VALUE\"}. Carried as a\nJSON-encoded string because multipart form data does not support\ntyped object parts.\n\nValues are write-only: they are encrypted at rest, and responses\ncarry only the variable names (the `environment` array), never the\nvalues.\n","type":"string"},"runtime":{"enum":["nodejs24"],"type":"string"},"zip":{"description":"Optional ZIP archive of the function source code. Omit to reuse the\nlatest version's bundle (a config-only change). Required for the\nfirst deployment of a function.\n","format":"binary","type":"string"}},"type":"object"},"FunctionTriggerSchedule":{"additionalProperties":false,"description":"A numeric five-field cron schedule interpreted in UTC.","properties":{"cron":{"description":"Numeric five-field cron expression (minute through day-of-week), interpreted in UTC.","example":"0 9 * * 1-5","maxLength":1024,"minLength":1,"type":"string"}},"required":["cron"],"type":"object"},"FunctionTriggerStorageObjectCreated":{"additionalProperties":false,"description":"Matches successful uploads to one exact bucket and, when configured, an\nobject-key prefix. The Function receives a JSON request body with\n`type` set to `storage_object_created` and a `data` object containing\nexactly `bucket_name` and `object_key`.\n","properties":{"bucket_name":{"description":"The exact object-storage bucket name to watch.","maxLength":63,"minLength":3,"type":"string"},"prefix":{"description":"Optional object-key prefix of at most 1024 UTF-8 bytes. When omitted,\nevery key in the bucket matches. When present, the full object key\nmust start with these exact bytes; matching is case-sensitive and\ndoes not normalize paths or require a path-segment boundary.\nMatch-all responses omit this field rather than returning an empty\nstring.\n","maxLength":1024,"minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f-\\x9f]+$","type":"string"}},"required":["bucket_name"],"type":"object"},"GeneralError":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode","description":"Machine-readable code classifying the error type. See `message` for a human-readable explanation."},"message":{"description":"Error message","type":"string"},"request_id":{"description":"Unique identifier for the request, useful for debugging.\nYou can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.\n","type":"string"}},"required":["code","message"],"type":"object"},"GrantPermissionToProjectRequest":{"properties":{"email":{"description":"Email address of the user to grant project access to.","format":"email","maxLength":256,"minLength":1,"type":"string"}},"required":["email"],"type":"object","x-sensitive":["email"]},"GrantedCredentialScope":{"description":"A single capability a credential actually carries, as reported by\nresponses that describe an existing credential.\n\nThis set is a superset of `CredentialScope` (the requestable set)\nbecause a credential's scopes are not limited to what this API offers:\nthe platform accepts additional scopes for customer-managed (`user`)\ncredentials, so one may exist on your branch that was not issued\nthrough this endpoint. Responses must be able to report such a\ncredential rather than fail to describe it — a client that rejected\nthe value would, on rotate, discard the replacement secret after the\nrotation had already committed. Treat unknown values as opaque.\n","enum":["storage:read","storage:write","ai_gateway:invoke","telemetry:write","functions:invoke"],"type":"string"},"IdentityProviderId":{"description":"Identity provider id from keycloak","enum":["github","google","hasura","microsoft","microsoftv2","vercelmp","keycloak"],"type":"string"},"Invitation":{"properties":{"email":{"description":"Email of the invited user","format":"email","maxLength":256,"minLength":1,"type":"string"},"id":{"description":"The invitation ID.","format":"uuid","type":"string"},"invited_at":{"description":"Timestamp when the invitation was created","format":"date-time","type":"string"},"invited_by":{"description":"UUID for the user_id who extended the invitation","format":"uuid","type":"string"},"org_id":{"description":"Organization id as it is stored in Neon","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"role":{"$ref":"#/components/schemas/MemberRole"}},"required":["email","id","invited_at","invited_by","org_id","role"],"type":"object","x-sensitive":["email"]},"JWKS":{"properties":{"branch_id":{"description":"The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"The date and time when the JWKS was created","format":"date-time","type":"string"},"id":{"description":"The JWKS configuration's ID.","type":"string"},"jwks_url":{"description":"URL of the provider's JWKS endpoint used to verify JWTs.","type":"string"},"jwt_audience":{"description":"Expected JWT `aud` claim value configured for this JWKS.","type":"string"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"provider_name":{"description":"The name of the authentication provider (e.g., Clerk, Stytch, Auth0)","type":"string"},"role_names":{"description":"Database role names that are permitted to authenticate using this JWKS configuration.","items":{"type":"string"},"type":"array"},"updated_at":{"description":"The date and time when the JWKS was last modified","format":"date-time","type":"string"}},"required":["created_at","id","jwks_url","project_id","provider_name","updated_at"],"type":"object"},"JWKSCreationOperation":{"allOf":[{"$ref":"#/components/schemas/JWKSResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]},"JWKSResponse":{"properties":{"jwks":{"$ref":"#/components/schemas/JWKS","description":"JWKS configuration associated with the project."}},"required":["jwks"],"type":"object"},"LimitsUnsatisfiedResponse":{"example":{"limits":[{"actual":"2","expected":"1","name":"projects_count"},{"actual":"launch","expected":"scale","name":"subscription_type"}]},"properties":{"limits":{"description":"Plan limits that were not satisfied by the request.","items":{"properties":{"actual":{"description":"Current value of the named limit, which does not satisfy the required `expected` value.","type":"string"},"expected":{"description":"Required value for the limit named by `name`. Compare with `actual` to determine the shortfall.","type":"string"},"name":{"description":"Identifier of the unsatisfied limit. Possible values are:\n- subscription_type\n- projects_count\n- project_region\n","type":"string"}},"required":["actual","expected","name"],"type":"object"},"type":"array"}},"required":["limits"],"type":"object"},"ListCredentialsResponse":{"properties":{"credentials":{"items":{"$ref":"#/components/schemas/CredentialMeta"},"type":"array"}},"required":["credentials"],"type":"object"},"ListNeonAuthIntegrationsResponse":{"properties":{"data":{"description":"Neon Auth integrations configured for the project.","items":{"$ref":"#/components/schemas/NeonAuthIntegration"},"type":"array"}},"required":["data"],"type":"object"},"ListNeonAuthOauthProvidersResponse":{"properties":{"providers":{"description":"OAuth providers configured for Neon Auth on the project.","items":{"$ref":"#/components/schemas/NeonAuthOauthProvider"},"type":"array"}},"required":["providers"],"type":"object"},"MaintenanceWindow":{"description":"A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure.\nDuring this time, the project's compute endpoints may be unavailable and existing connections can be\ninterrupted.\n","properties":{"end_time":{"description":"End time of the maintenance window, in the format of \"HH:MM\". Uses UTC.\n","type":"string"},"start_time":{"description":"Start time of the maintenance window, in the format of \"HH:MM\". Uses UTC.\n","type":"string"},"weekdays":{"description":"A list of weekdays when the maintenance window is active.\nEncoded as ints, where 1 - Monday, and 7 - Sunday.\n","items":{"type":"integer"},"type":"array"}},"required":["end_time","start_time","weekdays"],"type":"object"},"MaskingRule":{"example":{"column_name":"email","database_name":"neondb","masking_function":"anon.fake_email()","schema_name":"public","table_name":"users"},"properties":{"column_name":{"description":"The name of the column to be masked\n","type":"string"},"database_name":{"description":"The name of the database containing the table to be masked\n","type":"string"},"masking_function":{"description":"The PostgreSQL Anonymizer masking function to apply.\nCan be a predefined function (e.g., 'anon.random_string(10)', 'anon.fake_email()')\nor a custom function definition (e.g., 'anon.hash(column_name)')\n","type":"string"},"masking_value":{"description":"A literal value to set on the column when masking.\n","type":"string"},"schema_name":{"description":"The name of the schema containing the table to be masked\n","type":"string"},"table_name":{"description":"The name of the table containing the column to be masked\n","type":"string"}},"required":["column_name","database_name","schema_name","table_name"],"type":"object","x-sensitive":["database_name","schema_name","table_name","column_name","masking_function","masking_value"]},"MaskingRulesResponse":{"properties":{"masking_rules":{"description":"List of masking rules for the branch\n","items":{"$ref":"#/components/schemas/MaskingRule"},"type":"array"}},"required":["masking_rules"],"type":"object"},"MaskingRulesUpdateRequest":{"properties":{"masking_rules":{"description":"List of masking rules to apply to the branch.\nThis will replace all existing masking rules for the branch.\n","items":{"$ref":"#/components/schemas/MaskingRule"},"type":"array"}},"required":["masking_rules"],"type":"object"},"Member":{"properties":{"id":{"description":"The organization member's ID.","format":"uuid","type":"string"},"joined_at":{"description":"Timestamp when the user joined the organization.","format":"date-time","type":"string"},"org_id":{"description":"The Neon organization ID. Returned as `id` from `GET /users/me/organizations`.","example":"org-cool-darkness-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"role":{"$ref":"#/components/schemas/MemberRole"},"user_id":{"description":"The Neon user ID.","format":"uuid","type":"string"}},"required":["id","org_id","role","user_id"],"type":"object"},"MemberRole":{"description":"Organization member's role. `admin`: full administrative access. `editor` (and its legacy alias `member`): standard access governed by project permissions. `viewer` and `collaborator`: additional scoped project roles. Some values may not be available for all organizations.","enum":["admin","member","editor","viewer","collaborator"],"type":"string"},"MemberUserInfo":{"properties":{"deactivated_at":{"description":"Timestamp of when the user account was deactivated.\nAbsent for active users. When present, the UI should render a\n\"Deactivated\" badge inline next to the member.\n","format":"date-time","type":"string"},"email":{"description":"Email address of the organization member's user account.","format":"email","maxLength":256,"minLength":1,"type":"string"},"has_mfa":{"description":"Whether the member has MFA (TOTP) enabled","type":"boolean"}},"required":["email"],"type":"object","x-sensitive":["email"]},"MemberWithUser":{"properties":{"member":{"$ref":"#/components/schemas/Member","description":"Membership record for the user in the organization."},"user":{"$ref":"#/components/schemas/MemberUserInfo","description":"Profile information for the organization member."}},"required":["member","user"],"type":"object"},"NeonAuthAddDomainToRedirectURIWhitelistRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"domain":{"description":"URI to add to the redirect URI allowlist for the auth provider.","format":"uri","type":"string"}},"required":["auth_provider","domain"],"type":"object"},"NeonAuthAddOAuthProviderRequest":{"properties":{"client_id":{"description":"The client ID issued by the OAuth provider for your application. Used to identify the application during the OAuth flow.","type":"string"},"client_secret":{"description":"OAuth client secret for the provider.","type":"string"},"id":{"$ref":"#/components/schemas/NeonAuthOauthProviderId","description":"OAuth provider to configure for Neon Auth. Known values: `google`, `github`, `microsoft`, `vercel`.\n"},"microsoft_tenant_id":{"description":"Tenant ID for the Microsoft OAuth provider. Only relevant when the OAuth provider is Microsoft; omit or leave blank for other providers.","type":"string"}},"required":["id"],"type":"object","x-sensitive":["client_secret"]},"NeonAuthAllowLocalhostResponse":{"properties":{"allow_localhost":{"description":"Whether to allow localhost connections","type":"boolean"}},"required":["allow_localhost"],"type":"object"},"NeonAuthCreateAuthProviderSDKKeysRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","example":"wispy-forest-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["auth_provider","project_id"],"type":"object"},"NeonAuthCreateIntegrationRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"branch_id":{"description":"The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`.","example":"br-cool-darkness-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"database_name":{"description":"Name of the database to associate with the Neon Auth integration. When omitted, the integration uses the project's default database.","type":"string"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","example":"wispy-forest-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"role_name":{"deprecated":true,"description":"Deprecated. The database role for the auth integration. Omit this field; it is ignored.","type":"string"}},"required":["auth_provider","branch_id","project_id"],"type":"object","x-sensitive":["database_name"]},"NeonAuthCreateIntegrationResponse":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"auth_provider_project_id":{"description":"Project ID assigned by the auth provider for this integration.","type":"string"},"base_url":{"description":"Base URL of the Neon Auth service for this integration. Set as the NEON_AUTH_BASE_URL environment variable in your application.","type":"string"},"jwks_url":{"description":"URL of the provider's JWKS endpoint used to verify JWTs.","type":"string"},"pub_client_key":{"description":"Publishable SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth.","type":"string"},"schema_name":{"description":"Postgres schema containing the auth integration tables. Defaults to `neon_auth`.","type":"string"},"secret_server_key":{"description":"Secret server-side SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth. Treat as a credential.","type":"string"},"table_name":{"description":"Postgres table in the integration schema where synced user records are stored.","type":"string"}},"required":["auth_provider","auth_provider_project_id","jwks_url","pub_client_key","schema_name","secret_server_key","table_name"],"type":"object","x-sensitive":["pub_client_key","secret_server_key"]},"NeonAuthCreateNewUserRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"email":{"description":"Email address of the new user.","format":"email","maxLength":256,"minLength":1,"type":"string"},"name":{"description":"Display name for the new user. When omitted, the created user has no display name.","maxLength":255,"minLength":1,"type":"string"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["auth_provider","email","project_id"],"type":"object","x-sensitive":["email","name"]},"NeonAuthCreateNewUserResponse":{"properties":{"id":{"description":"ID of newly created user","type":"string"}},"required":["id"],"type":"object"},"NeonAuthDeleteDomainFromRedirectURIWhitelistItem":{"properties":{"domain":{"description":"URI to remove from the redirect URI whitelist.","format":"uri","type":"string"}},"required":["domain"],"type":"object"},"NeonAuthDeleteDomainFromRedirectURIWhitelistRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"domains":{"description":"Domain names to remove from the redirect URI whitelist for the specified auth provider.","items":{"$ref":"#/components/schemas/NeonAuthDeleteDomainFromRedirectURIWhitelistItem"},"type":"array"}},"required":["auth_provider","domains"],"type":"object"},"NeonAuthEmailAndPasswordConfig":{"properties":{"auto_sign_in_after_verification":{"description":"Whether users are automatically signed in after verifying their email","type":"boolean"},"disable_sign_up":{"description":"Whether to disable new user sign ups","type":"boolean"},"email_verification_method":{"$ref":"#/components/schemas/NeonAuthEmailVerificationMethod","description":"Controls how email addresses are verified during sign-up or sign-in.\n- `link`: sends a verification link to the user's email address\n- `otp`: sends a one-time password to the user's email address\n"},"enabled":{"description":"Whether email and password authentication is enabled","type":"boolean"},"require_email_verification":{"description":"Whether email verification is required before users can sign in","type":"boolean"},"send_verification_email_on_sign_in":{"description":"Whether to send a verification email when users sign in","type":"boolean"},"send_verification_email_on_sign_up":{"description":"Whether to send a verification email when users sign up","type":"boolean"}},"required":["auto_sign_in_after_verification","disable_sign_up","email_verification_method","enabled","require_email_verification","send_verification_email_on_sign_in","send_verification_email_on_sign_up"],"type":"object"},"NeonAuthEmailAndPasswordConfigUpdate":{"properties":{"auto_sign_in_after_verification":{"description":"Whether users are automatically signed in after verifying their email","type":"boolean"},"disable_sign_up":{"description":"Whether to disable new user sign ups. When omitted, the current setting is not changed.","type":"boolean"},"email_verification_method":{"$ref":"#/components/schemas/NeonAuthEmailVerificationMethod","description":"Email verification method. `link`: sends a verification link. `otp`: sends a one-time password.\n"},"enabled":{"description":"Controls whether email and password authentication is enabled for this project. When omitted from an update request, the current value is unchanged.","type":"boolean"},"require_email_verification":{"description":"When true, users must verify their email address before they can sign in. Omitting this field from an update request leaves the current value unchanged.","type":"boolean"},"send_verification_email_on_sign_in":{"description":"Whether to send a verification email when a user with an unverified email signs in.","type":"boolean"},"send_verification_email_on_sign_up":{"description":"Whether to send a verification email when users sign up.","type":"boolean"}},"type":"object"},"NeonAuthEmailServerConfig":{"discriminator":{"mapping":{"shared":"#/components/schemas/SharedEmailServer","standard":"#/components/schemas/StandardEmailServer"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/StandardEmailServer"},{"$ref":"#/components/schemas/SharedEmailServer"}],"type":"object"},"NeonAuthEmailServerConfigResponse":{"discriminator":{"mapping":{"shared":"#/components/schemas/SharedEmailServer","standard":"#/components/schemas/StandardEmailServerResponse"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/StandardEmailServerResponse"},{"$ref":"#/components/schemas/SharedEmailServer"}],"type":"object"},"NeonAuthEmailVerificationMethod":{"description":"The email verification method to use.\n- `link`: Sends a verification link via email\n- `otp`: Sends a one-time password (OTP) via email\n","enum":["link","otp"],"type":"string"},"NeonAuthIntegration":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"auth_provider_project_id":{"description":"Project identifier assigned by the auth provider for this integration.","type":"string"},"base_url":{"description":"Base URL of the Neon Auth service endpoint for this integration. Injected into the project environment as `NEON_AUTH_BASE_URL`.","type":"string"},"branch_id":{"description":"The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`.","example":"br-cool-darkness-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"Timestamp when the Neon Auth integration was created, in RFC 3339 format (UTC).","example":"2025-01-15T10:30:00Z","format":"date-time","type":"string"},"db_name":{"description":"Name of the database used by the Neon Auth integration.","type":"string"},"jwks_url":{"description":"URL of the provider's JWKS endpoint used to verify JWTs.","type":"string"},"name":{"description":"Application name shown in auth emails and communications. Defaults to the project name.","maxLength":256,"minLength":1,"type":"string"},"owned_by":{"$ref":"#/components/schemas/NeonAuthProviderProjectOwnedBy","description":"Owner of the auth provider project. `neon` means the project is created and managed by Neon on your behalf. `user` means the project was created in your own auth provider account and is self-managed."},"transfer_status":{"$ref":"#/components/schemas/NeonAuthProviderProjectTransferStatus","description":"Ownership transfer state for the auth provider project. `initiated` means a transfer was requested but not completed. `finished` means it completed successfully."}},"required":["auth_provider","auth_provider_project_id","branch_id","created_at","db_name","jwks_url","owned_by"],"type":"object","x-sensitive":["db_name"]},"NeonAuthMagicLinkConfig":{"properties":{"disable_sign_up":{"default":false,"description":"Whether to disable sign-up via magic link.","type":"boolean"},"enabled":{"default":false,"description":"Whether the magic link plugin is enabled.","type":"boolean"},"expires_in":{"default":5,"description":"Minutes until the magic link expires.","format":"int32","maximum":1440,"minimum":5,"type":"integer"}},"required":["disable_sign_up","enabled","expires_in"],"type":"object"},"NeonAuthMagicLinkConfigUpdate":{"properties":{"disable_sign_up":{"description":"When true, sign-up via magic link is disabled.","type":"boolean"},"enabled":{"description":"Whether to enable the magic link plugin.","type":"boolean"},"expires_in":{"description":"Minutes until the magic link expires.","format":"int32","maximum":1440,"minimum":5,"type":"integer"}},"type":"object"},"NeonAuthOauthProvider":{"properties":{"client_id":{"description":"Public identifier for the OAuth application, issued by the provider when the application is registered.","type":"string"},"client_secret":{"description":"OAuth client secret for the provider.","type":"string"},"id":{"$ref":"#/components/schemas/NeonAuthOauthProviderId","description":"The OAuth provider's ID."},"type":{"$ref":"#/components/schemas/NeonAuthOauthProviderType","description":"OAuth provider key type. `standard` uses your own OAuth credentials. `shared` uses Neon-managed keys intended for development only; they display Neon branding on the OAuth consent screen and must not be used in production."}},"required":["id","type"],"type":"object","x-sensitive":["client_secret"]},"NeonAuthOauthProviderId":{"enum":["google","github","microsoft","vercel"],"type":"string"},"NeonAuthOauthProviderType":{"enum":["standard","shared"],"type":"string"},"NeonAuthOrganizationConfig":{"properties":{"creator_role":{"default":"owner","description":"Role of the organization's creator. `owner`: full control, including deleting the org and transferring ownership. `admin`: manage members and settings only.","enum":["admin","owner"],"type":"string"},"enabled":{"default":true,"description":"Whether the organization plugin is enabled.","type":"boolean"},"membership_limit":{"default":100,"description":"Maximum number of members per organization.","format":"int32","minimum":1,"type":"integer"},"organization_limit":{"default":10,"description":"Maximum organizations a user can belong to (created or joined). At the limit, the user cannot create or join more.","format":"int32","minimum":1,"type":"integer"},"send_invitation_email":{"default":false,"description":"Whether to send invitation emails when inviting members to an organization.","type":"boolean"}},"required":["creator_role","enabled","membership_limit","organization_limit","send_invitation_email"],"type":"object"},"NeonAuthOrganizationConfigUpdate":{"properties":{"creator_role":{"description":"Role of the organization's creator. `owner`: full control, including deleting the org and transferring ownership. `admin`: manage members and settings only.","enum":["admin","owner"],"type":"string"},"enabled":{"description":"Controls whether the organization plugin is active for the organization.","type":"boolean"},"membership_limit":{"description":"Maximum members per organization.","format":"int32","minimum":1,"type":"integer"},"organization_limit":{"description":"Maximum organizations a user can belong to (created or joined). At the limit, the user cannot create or join more.","format":"int32","minimum":1,"type":"integer"},"send_invitation_email":{"description":"When true, invited users receive an email containing an accept link. Requires that the invited user has a verified email address.","type":"boolean"}},"type":"object"},"NeonAuthPhoneNumberConfig":{"properties":{"enabled":{"default":false,"description":"Whether the phone number plugin is enabled.","type":"boolean"},"otp_expires_in":{"default":300,"description":"Time in seconds before the OTP expires","maximum":600,"minimum":60,"type":"integer"}},"required":["enabled"],"type":"object"},"NeonAuthPhoneNumberConfigUpdate":{"properties":{"enabled":{"description":"Whether the phone number plugin is enabled.","type":"boolean"},"otp_expires_in":{"description":"Time in seconds before the OTP expires","maximum":600,"minimum":60,"type":"integer"}},"type":"object"},"NeonAuthPluginConfigs":{"description":"Aggregated plugin configurations for Neon Auth","properties":{"allow_localhost":{"description":"Permits authentication requests from localhost origins when true. Intended for local development; disable in production environments.","type":"boolean"},"email_and_password":{"$ref":"#/components/schemas/NeonAuthEmailAndPasswordConfig","description":"Configuration for email and password authentication."},"email_provider":{"$ref":"#/components/schemas/NeonAuthEmailServerConfigResponse","description":"Email server configuration used to send authentication emails."},"magic_link":{"$ref":"#/components/schemas/NeonAuthMagicLinkConfig","description":"Configuration for passwordless magic-link email authentication."},"oauth_providers":{"description":"OAuth provider configurations enabled for this auth setup.","items":{"$ref":"#/components/schemas/NeonAuthOauthProvider"},"type":"array"},"organization":{"$ref":"#/components/schemas/NeonAuthOrganizationConfig","description":"Configuration for the Neon Auth organization plugin, which enables user organizations within the authentication system. This is distinct from a Neon platform organization."},"phone_number":{"$ref":"#/components/schemas/NeonAuthPhoneNumberConfig","description":"Configuration for the phone number authentication plugin."}},"type":"object"},"NeonAuthProviderProjectOwnedBy":{"enum":["user","neon"],"type":"string"},"NeonAuthProviderProjectTransferStatus":{"enum":["initiated","finished"],"type":"string"},"NeonAuthRedirectURIWhitelistDomain":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"domain":{"description":"Allowed redirect URI domain for the auth provider.","type":"string"}},"required":["auth_provider","domain"],"type":"object"},"NeonAuthRedirectURIWhitelistResponse":{"properties":{"domains":{"description":"Domains permitted as redirect URI targets in the whitelist.","items":{"$ref":"#/components/schemas/NeonAuthRedirectURIWhitelistDomain"},"type":"array"}},"required":["domains"],"type":"object"},"NeonAuthSupportedAuthProvider":{"description":"Authentication provider integrated with this Neon Auth configuration. `better_auth` integrates with Better Auth (the current, recommended provider). `stack` integrates with Stack Auth (deprecated). `mock` is a simulated provider for local development and testing only.","enum":["mock","stack","better_auth"],"type":"string"},"NeonAuthTransferAuthProviderProjectRequest":{"properties":{"auth_provider":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"},"project_id":{"description":"The Neon project ID. Returned as `id` from `GET /projects`.","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["auth_provider","project_id"],"type":"object"},"NeonAuthTransferAuthProviderProjectResponse":{"properties":{"url":{"description":"URL for completing the process of ownership transfer","type":"string"}},"required":["url"],"type":"object"},"NeonAuthUpdateOAuthProviderRequest":{"properties":{"client_id":{"description":"The OAuth client ID registered with the provider. Omit to keep the currently configured value.","type":"string"},"client_secret":{"description":"OAuth client secret for the provider. Omit to leave the existing secret unchanged.","type":"string"},"microsoft_tenant_id":{"description":"The tenant ID scoping the Microsoft OAuth provider. Supply this field when the provider type is microsoft; it has no effect for other provider types.","type":"string"}},"type":"object","x-sensitive":["client_secret"]},"NeonAuthWebhookConfig":{"properties":{"enabled":{"description":"Whether the webhook is active.","type":"boolean"},"enabled_events":{"description":"Event types that trigger this webhook. Covers user lifecycle, email/OTP delivery, organization invitations, and phone verification events; see the enum for exact values.","items":{"enum":["user.before_create","user.created","send.otp","send.magic_link","organization.invitation.created","organization.invitation.accepted","phone_number.verified"],"type":"string"},"type":"array"},"timeout_seconds":{"default":5,"description":"Maximum time, in seconds, to wait for a response from the webhook endpoint.","maximum":10,"minimum":1,"type":"integer"},"webhook_url":{"description":"Destination URL that receives webhook event payloads.","type":"string"}},"required":["enabled"],"type":"object"},"NeonFunction":{"properties":{"active_deployment":{"allOf":[{"$ref":"#/components/schemas/NeonFunctionDeployment"}],"description":"The most recent deployment whose build completed successfully.\nThis is the deployment that serves invocations. Omitted until a\ndeployment succeeds.\n"},"created_at":{"type":"string"},"current_deployment":{"allOf":[{"$ref":"#/components/schemas/NeonFunctionDeployment"}],"description":"The most recent deployment, regardless of build status. It may\nstill be building or it may have failed. Omitted until the first\ndeployment is created.\n"},"id":{"description":"Opaque, stable function identifier.","type":"string"},"invocation_url":{"description":"URL at which the function is invoked. The host carries `<branch_id>-<slug>` as its first DNS label under a Neon-managed functions domain, and the URL ends with a trailing slash so paths concatenate onto it. Empty string when the function has no servable invoke host (e.g. a deployment without an invocation front-door).","type":"string"},"name":{"description":"Free-form display name.","type":"string"},"slug":{"description":"Branch-unique, lowercase DNS-label. Forms the invocation URL's host together with the branch id. Immutable.","type":"string"}},"required":["created_at","id","invocation_url","name","slug"],"type":"object"},"NeonFunctionDeployment":{"properties":{"created_at":{"type":"string"},"environment":{"description":"The NAMES of the deployment's environment variables, sorted.\nValues are encrypted at rest and are never returned — they are\nwrite-only. To change a value, deploy the variable with the new\nvalue; to remove a variable, deploy it with an empty value.\n","items":{"type":"string"},"type":"array"},"error":{"description":"Human-readable reason the deployment build failed. Present only\nwhen `status` is `failed`.\n","type":"string"},"id":{"description":"The deployment id, which is the platform version number (monotonic per function).","format":"int32","type":"integer"},"memory_mib":{"format":"int32","type":"integer"},"runtime":{"type":"string"},"status":{"description":"Build lifecycle status of the deployment.","enum":["pending","building","completed","failed"],"type":"string"}},"required":["created_at","id","memory_mib","runtime","status"],"type":"object"},"NeonFunctionDeploymentResponse":{"properties":{"deployment":{"$ref":"#/components/schemas/NeonFunctionDeployment"}},"required":["deployment"],"type":"object"},"NeonFunctionResponse":{"properties":{"function":{"$ref":"#/components/schemas/NeonFunction"}},"required":["function"],"type":"object"},"NeonFunctionUpdateRequest":{"properties":{"name":{"description":"New display name for the function. `null` clears the display\nname; the function's `name` then falls back to its slug. Leading\nand trailing whitespace is trimmed; a whitespace-only name is\nrejected.\n","maxLength":256,"minLength":1,"type":["null","string"]}},"required":["name"],"type":"object"},"NeonFunctionsListResponse":{"properties":{"functions":{"items":{"$ref":"#/components/schemas/NeonFunction"},"type":"array"}},"required":["functions"],"type":"object"},"Operation":{"description":"An asynchronous action Neon performs on your resources (for example, starting a compute or creating a branch). Fields such as `action`, `status`, and `total_duration_ms` describe the operation and its progress.","example":{"action":"start_compute","branch_id":"br-wispy-meadow-118737","created_at":"2022-11-15T20:02:00Z","endpoint_id":"ep-silent-smoke-806639","failures_count":0,"id":"d8ac46eb-a757-42b1-9907-f78322ee394e","project_id":"spring-example-302709","status":"finished","total_duration_ms":200,"updated_at":"2022-11-15T20:02:02Z"},"properties":{"action":{"$ref":"#/components/schemas/OperationAction"},"branch_id":{"description":"The ID of the branch this operation ran on.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"A timestamp indicating when the operation was created","format":"date-time","type":"string"},"endpoint_id":{"description":"The ID of the compute endpoint this operation ran on.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"error":{"description":"Human-readable message describing why the operation failed.","type":"string"},"failures_count":{"description":"The number of times the operation failed","format":"int32","type":"integer"},"id":{"description":"The operation ID","format":"uuid","type":"string"},"project_id":{"description":"The ID of the project this operation ran on.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"retry_at":{"description":"A timestamp indicating when the operation was last retried","format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/OperationStatus","description":"Current lifecycle state of the operation. On `failed`, see `failures_count` and `retry_at` for retry detail."},"total_duration_ms":{"description":"The total duration of the operation in milliseconds","format":"int32","type":"integer"},"updated_at":{"description":"A timestamp indicating when the operation status was last updated","format":"date-time","type":"string"}},"required":["action","created_at","failures_count","id","project_id","status","total_duration_ms","updated_at"],"type":"object"},"OperationAction":{"description":"The action performed by the operation","enum":["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"],"type":"string"},"OperationResponse":{"properties":{"operation":{"$ref":"#/components/schemas/Operation"}},"required":["operation"],"type":"object"},"OperationStatus":{"description":"Lifecycle state of the operation. `scheduling`: queued, not yet started. `running`: actively executing. `finished`: completed successfully. `failed`: ended with a failure. `error`: ended with a terminal error. `cancelling`: cancellation requested but not yet complete. `cancelled`: stopped before completion. `skipped`: bypassed without executing.","enum":["scheduling","running","finished","failed","error","cancelling","cancelled","skipped"],"type":"string"},"OperationsResponse":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/Operation"},"type":"array"}},"required":["operations"],"type":"object"},"OrgApiKeyCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ApiKeyCreateRequest"},{"properties":{"project_id":{"description":"If set, the API key can access only this project","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"type":"object"}]},"OrgApiKeyCreateResponse":{"allOf":[{"$ref":"#/components/schemas/ApiKeyCreateResponse"},{"properties":{"project_id":{"description":"If set, the API key can access only this project","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"type":"object"}]},"OrgApiKeyRevokeResponse":{"allOf":[{"$ref":"#/components/schemas/ApiKeyRevokeResponse"},{"properties":{"project_id":{"description":"If set, the API key can access only this project","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"type":"object"}]},"OrgApiKeysListResponseItem":{"allOf":[{"$ref":"#/components/schemas/ApiKeysListResponseItem"},{"properties":{"project_id":{"description":"If set, the API key can access only this project","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"type":"object"}]},"Organization":{"properties":{"allow_hipaa_projects":{"description":"If true, allow account to mark projects as HIPAA","type":"boolean"},"created_at":{"description":"A timestamp indicting when the organization was created\n","format":"date-time","type":"string"},"handle":{"description":"URL-safe identifier for the organization, used in API paths. Distinct from the display name.","type":"string"},"id":{"description":"The Neon organization ID. Use as the `org_id` path parameter in other endpoints.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"managed_by":{"description":"Organizations created via the Console or the API are managed by `console`.\nOrganizations created by other methods can't be deleted via the Console or the API.\n","type":"string"},"name":{"description":"Human-readable display name of the organization.","type":"string"},"plan":{"description":"Billing plan for the organization, for example `free`, `launch`, or `scale`.","type":"string"},"require_mfa":{"description":"If true, all members must have MFA enabled to access this organization","type":"boolean"},"updated_at":{"description":"A timestamp indicating when the organization was updated\n","format":"date-time","type":"string"}},"required":["created_at","handle","id","managed_by","name","plan","updated_at"],"type":"object"},"OrganizationInvitationsResponse":{"properties":{"invitations":{"description":"List of pending invitations for the organization.","items":{"$ref":"#/components/schemas/Invitation"},"type":"array"}},"required":["invitations"],"type":"object"},"OrganizationInviteCreateRequest":{"properties":{"email":{"description":"Email address of the person to invite to the organization.","format":"email","maxLength":256,"minLength":1,"type":"string"},"role":{"$ref":"#/components/schemas/MemberRole"}},"required":["email","role"],"type":"object","x-sensitive":["email"]},"OrganizationInvitesCreateRequest":{"properties":{"invitations":{"description":"Invitations to create for the organization.","items":{"$ref":"#/components/schemas/OrganizationInviteCreateRequest"},"type":"array"}},"required":["invitations"],"type":"object"},"OrganizationMemberUpdateRequest":{"properties":{"role":{"$ref":"#/components/schemas/MemberRole"}},"required":["role"],"type":"object"},"OrganizationMembersResponse":{"properties":{"members":{"description":"Members of the organization, each combining membership details (role, status) with the associated user's identity.","items":{"$ref":"#/components/schemas/MemberWithUser"},"type":"array"}},"required":["members"],"type":"object"},"OrganizationsResponse":{"properties":{"organizations":{"description":"Organizations returned by the request. Each includes `id`, `name`, `handle`, and `plan`.","items":{"$ref":"#/components/schemas/Organization"},"type":"array"}},"required":["organizations"],"type":"object"},"Pagination":{"description":"Cursor-based pagination. The `cursor` value reflects the endpoint's sort field (for example, an ID or timestamp), so pass it back unchanged.","example":{"cursor":"2022-12-07T00:45:05.262011Z"},"properties":{"cursor":{"description":"Cursor marking the last item in this response. Pass it unchanged as the `cursor` query parameter to fetch the next page.","minLength":1,"type":"string"}},"required":["cursor"],"type":"object"},"PaginationResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object"},"PaymentSource":{"properties":{"card":{"$ref":"#/components/schemas/PaymentSourceBankCard","description":"Bank card details for this payment source."},"type":{"description":"Type of payment source. E.g. \"card\".\n","type":"string"}},"required":["type"],"type":"object"},"PaymentSourceBankCard":{"properties":{"brand":{"description":"Card network reported by the payment processor. Set to `unknown` when the network cannot be determined.\n","enum":["amex","diners","discover","jcb","mastercard","unionpay","unknown","visa"],"type":"string"},"exp_month":{"description":"Credit card expiration month\n","format":"int64","type":"integer"},"exp_year":{"description":"Credit card expiration year\n","format":"int64","type":"integer"},"last4":{"description":"Last 4 digits of the card.\n","type":"string"}},"required":["last4"],"type":"object"},"PgSettingsData":{"additionalProperties":{"type":"string"},"description":"A raw representation of Postgres settings","type":"object"},"PgVersion":{"default":18,"description":"The major Postgres version number. Supported versions are `14`, `15`, `16`, `17`, and `18`. `19` is rolling out and is accepted only in regions where it is enabled; requesting it elsewhere returns an error.","example":18,"maximum":19,"minimum":14,"type":"integer"},"PgbouncerSettingsData":{"additionalProperties":{"type":"string"},"deprecated":true,"description":"Deprecated. A raw representation of PgBouncer settings. Removal scheduled for June 20, 2026.\n","type":"object","x-sunset":"2026-06-20"},"PlanDetails":{"properties":{"name":{"description":"Plan name, for example `free`, `launch`, or `scale`.","type":"string"},"version":{"$ref":"#/components/schemas/PlanVersion","description":"Version of the plan, expressed as `major` and `minor` components."}},"required":["name"],"type":"object"},"PlanVersion":{"properties":{"major":{"type":"integer"},"minor":{"type":"integer"}},"required":["major","minor"],"type":"object"},"PreloadLibraries":{"description":"The shared libraries to preload into the project's compute instances.\n","properties":{"enabled_libraries":{"description":"Names of shared preload libraries to enable for the project.","items":{"type":"string"},"type":"array"},"use_defaults":{"description":"When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`.","type":"boolean"}},"type":"object"},"PresignRequest":{"description":"Options for the presigned URL. The `operation` selects upload (`PUT`)\nor download (`GET`); the remaining fields are optional.\n","properties":{"content_type":{"description":"The `Content-Type` to bind into the signed request. Only meaningful\nfor `upload`: when set, the caller MUST send the same `Content-Type`\nheader on the `PUT`, and the value is echoed back in the response\n`headers`. Ignored for `download`.\n","type":"string"},"expires_in_seconds":{"default":900,"description":"How long the presigned URL stays valid, in seconds. Defaults to 900\n(15 minutes); capped at 604800 (7 days).\n","format":"int64","maximum":604800,"minimum":1,"type":"integer"},"operation":{"description":"The transfer direction. `upload` returns a presigned `PUT` URL;\n`download` returns a presigned `GET` URL.\n","enum":["upload","download"],"type":"string"}},"required":["operation"],"type":"object"},"PresignResponse":{"properties":{"expires_at":{"description":"When the presigned URL stops being valid.","format":"date-time","type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Headers the caller MUST send verbatim on the request (e.g.\n`Content-Type` when it was signed on an upload). May be empty.\n","type":"object"},"method":{"description":"The HTTP method to use against `url`: `PUT` for an upload,\n`GET` for a download.\n","type":"string"},"url":{"description":"The presigned URL. Transfer the object bytes by issuing\n`method url` with the returned `headers`.\n","type":"string"}},"required":["expires_at","headers","method","url"],"type":"object"},"Project":{"example":{"active_time_seconds":621440,"branch_logical_size_limit":10,"branch_logical_size_limit_bytes":10485760,"compute_time_seconds":2485760,"consumption_period_end":"2022-12-01T00:00:00Z","consumption_period_start":"2022-11-01T00:00:00Z","cpu_used_sec":155350,"created_at":"2022-12-13T01:30:55Z","creation_source":"console","data_storage_bytes_hour":2831928,"data_transfer_bytes":1000,"history_retention_seconds":604800,"id":"spring-example-302709","name":"spring-example-302709","org_id":"org-morning-bread-81040908","owner":{"branches_limit":10,"email":"some@email.com","name":"John Smith","subscription_type":"scale"},"owner_id":"629982cc-de05-43db-ae16-28f2399c4910","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-12-13T01:30:55Z","written_data_bytes":193990002},"properties":{"active_time_seconds":{"description":"Seconds. Control plane observed endpoints of this project being active this amount of wall-clock time.\nThe value has some lag.\nThe value is reset at the beginning of each billing period.\n","format":"int64","minimum":0,"type":"integer"},"branch_logical_size_limit":{"description":"The logical size limit for a branch. The value is in MiB.\n","format":"int64","type":"integer"},"branch_logical_size_limit_bytes":{"description":"The logical size limit for a branch. The value is in B.\n","format":"int64","type":"integer"},"compute_last_active_at":{"description":"The most recent time when any endpoint of this project was active.\n\nOmitted when observed no activity for endpoints of this project.\n","format":"date-time","type":"string"},"compute_time_seconds":{"description":"Seconds. The number of CPU seconds used by the project's compute endpoints, including compute endpoints that have been deleted.\nThe value has some lag. The value is reset at the beginning of each billing period.\nExamples:\n1. An endpoint that uses 1 CPU for 1 second is equal to `compute_time=1`.\n2. An endpoint that uses 2 CPUs simultaneously for 1 second is equal to `compute_time=2`.\n","format":"int64","minimum":0,"type":"integer"},"consumption_period_end":{"description":"A date-time indicating when Neon Cloud plans to stop measuring consumption for current consumption period.\n","format":"date-time","type":"string"},"consumption_period_start":{"description":"A date-time indicating when Neon Cloud started measuring consumption for current consumption period.\n","format":"date-time","type":"string"},"cpu_used_sec":{"deprecated":true,"description":"Deprecated. Use `compute_time_seconds` instead.\n","format":"int64","type":"integer"},"created_at":{"description":"A timestamp indicating when the project was created\n","format":"date-time","type":"string"},"creation_source":{"description":"The project creation source\n","type":"string"},"data_storage_bytes_hour":{"description":"Bytes-Hour. Project consumed that much Postgres storage hourly during the billing period. The value has some lag.\nThe value is reset at the beginning of each billing period.\n","format":"int64","minimum":0,"type":"integer"},"data_transfer_bytes":{"description":"Bytes. Egress traffic from the Neon cloud to the client for given project over the billing period.\nIncludes deleted endpoints. The value has some lag. The value is reset at the beginning of each billing period.\n","format":"int64","minimum":0,"type":"integer"},"default_endpoint_settings":{"$ref":"#/components/schemas/DefaultEndpointSettings"},"effective_project_permission":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/ProjectPermissionLevel"}],"type":"string"},{"type":"null"}]},"hipaa_enabled_at":{"description":"A timestamp indicating when HIPAA was enabled for this project","format":"date-time","type":"string"},"history_retention_seconds":{"description":"The number of seconds to retain the shared history for all branches in this project.\n","format":"int32","type":"integer"},"id":{"description":"The Neon project ID. Use as the `project_id` path parameter in other endpoints.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"maintenance_scheduled_for":{"description":"A timestamp indicating when project update begins. If set, computes might experience a brief restart around this time.\n","format":"date-time","type":"string"},"maintenance_starts_at":{"description":"A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time.\n","format":"date-time","type":"string"},"name":{"description":"The project name\n","type":"string"},"org_id":{"description":"The Neon organization ID. Returned as `id` from `GET /users/me/organizations`.","example":"org-cool-darkness-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"owner":{"$ref":"#/components/schemas/ProjectOwnerData","description":"Ownership details for the project, including the owner's name and email."},"owner_id":{"description":"ID of the organization that owns the project.","example":"org-cool-darkness-12345678","type":"string"},"pg_version":{"$ref":"#/components/schemas/PgVersion"},"platform_id":{"description":"The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`.\n","type":"string"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"proxy_host":{"description":"The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`).\n","type":"string"},"quota_reset_at":{"deprecated":true,"description":"Deprecated. Use the `consumption_period_end` field instead. A timestamp indicating when the project quota resets.\n","format":"date-time","type":"string"},"region_id":{"description":"Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`.\n","example":"aws-us-east-1","type":"string"},"settings":{"$ref":"#/components/schemas/ProjectSettingsData","description":"Project-level settings, for example `quota`, `allowed_ips`, `enable_logical_replication`, and `maintenance_window`."},"store_passwords":{"description":"Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.\n","type":"boolean"},"synthetic_storage_size":{"description":"The current space occupied by the project in Postgres storage, in bytes. Synthetic Postgres storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches in a project.\n","format":"int64","type":"integer"},"updated_at":{"description":"A timestamp indicating when the project was last updated\n","format":"date-time","type":"string"},"written_data_bytes":{"description":"Bytes. Amount of WAL that travelled through Postgres storage for given project across all branches.\nThe value has some lag. The value is reset at the beginning of each billing period.\n","format":"int64","minimum":0,"type":"integer"}},"required":["active_time_seconds","branch_logical_size_limit","branch_logical_size_limit_bytes","compute_time_seconds","consumption_period_end","consumption_period_start","cpu_used_sec","created_at","creation_source","data_storage_bytes_hour","data_transfer_bytes","history_retention_seconds","id","name","owner_id","pg_version","platform_id","provisioner","proxy_host","region_id","store_passwords","updated_at","written_data_bytes"],"type":"object"},"ProjectAuditLogLevel":{"enum":["base","extended","full"],"type":"string"},"ProjectBranchLogDuration":{"description":"A length of time as a count and a unit, for example `30m`, `6h`, or\n`7d`. Valid units are `ms`, `s`, `m`, `h`, and `d`.\n","example":"1h","pattern":"^[0-9]{1,6}(ms|s|m|h|d)$","type":"string"},"ProjectBranchLogFieldValuesResponse":{"properties":{"is_truncated":{"description":"True when more distinct values exist than were returned, because\neither the requested `limit` or the server's own scan cap was\nreached. A caller that filters on a partial list is choosing from an\narbitrary subset, so narrow `since` or `source` and ask again when\nthis is `true`.\n","type":"boolean"},"values":{"items":{"type":"string"},"type":"array"}},"required":["is_truncated","values"],"type":"object"},"ProjectBranchLogFieldsResponse":{"properties":{"fields":{"description":"Log field names observed on this branch, each usable as `field_name`\non the log field-values endpoint. Computed per branch rather than\nfixed by this specification, so clients should not assume a\nparticular set.\n","items":{"type":"string"},"type":"array"}},"required":["fields"],"type":"object"},"ProjectBranchLogRecord":{"properties":{"attributes":{"additionalProperties":true,"description":"Customer-defined OpenTelemetry log and resource attributes.","type":"object"},"entity_id":{"description":"The Neon identifier of the service instance that emitted the record.","type":"string"},"message":{"description":"The OpenTelemetry log body rendered as text. A body that is already a\nstring is returned verbatim. Any other OpenTelemetry `AnyValue` body\n— notably the structured key/value body that `storage` records always\ncarry — is rendered as compact JSON with its keys sorted\nalphabetically, for example\n`{\"bytes\":1024,\"operation\":\"GET\",\"object_key\":\"a/b.png\"}`.\n","type":"string"},"scope_name":{"description":"The OpenTelemetry instrumentation scope name.","type":"string"},"service_name":{"description":"The OpenTelemetry `service.name` resource attribute.","type":"string"},"severity_number":{"description":"The numeric OpenTelemetry severity.","maximum":24,"minimum":0,"type":"integer"},"severity_text":{"description":"The original OpenTelemetry severity text.","type":"string"},"source":{"$ref":"#/components/schemas/ProjectBranchLogSource"},"span_id":{"description":"The OpenTelemetry span ID, when the record belongs to a span.","type":"string"},"timestamp":{"description":"The OpenTelemetry record timestamp in UTC.","format":"date-time","type":"string"},"trace_id":{"description":"The OpenTelemetry trace ID, when the record belongs to a trace.","type":"string"}},"required":["attributes","message","timestamp"],"type":"object"},"ProjectBranchLogSeverity":{"description":"An OpenTelemetry severity level. A minimum severity includes every\nhigher level in this order: `trace`, `debug`, `info`, `warn`, `error`,\n`fatal`.\n","enum":["trace","debug","info","warn","error","fatal"],"type":"string"},"ProjectBranchLogSource":{"description":"The Neon service that emitted the log record.","enum":["function","storage","pg_endpoint"],"type":"string"},"ProjectBranchLogsInvalidQuery":{"properties":{"code":{"example":"LOGS_INVALID_QUERY","type":"string"},"message":{"type":"string"},"reason":{"description":"Machine-readable reason why the request was rejected:\n- `time_range_too_large`: the requested window spans more than seven days.\n- `invalid_time_range`: `end_time` is not after `start_time`.\n- `conflicting_time_range`: both `since` and `start_time` were supplied.\n- `invalid_cursor`: the supplied `cursor` is malformed, expired, or was issued for a\n  different query.\n- `unknown_field`: the requested `field_name` is not one of the fields the log fields\n  endpoint reports for this branch.\n- `invalid_logql`: the supplied `logql` expression does not parse, or uses a\n  construct this endpoint does not accept.\n- `conflicting_filters`: `logql` was supplied alongside one or more structured\n  filters. Use one or the other.\n","enum":["time_range_too_large","invalid_time_range","conflicting_time_range","invalid_cursor","unknown_field","invalid_logql","conflicting_filters"],"type":"string"}},"required":["code","message","reason"],"type":"object"},"ProjectBranchLogsNotAvailable":{"properties":{"code":{"example":"LOGS_NOT_AVAILABLE","type":"string"},"message":{"type":"string"},"reason":{"description":"Machine-readable reason why logs cannot be read:\n- `branch_not_found`: the project or branch does not exist, or the caller does not\n  have access to it.\n- `telemetry_not_enabled`: the branch exists but is not collecting telemetry, so it\n  has no logs to serve.\n","enum":["branch_not_found","telemetry_not_enabled"],"type":"string"}},"required":["code","message","reason"],"type":"object"},"ProjectBranchLogsQueryRequest":{"properties":{"body_contains":{"description":"Match records whose rendered `message` contains this case-sensitive\nsubstring.\n\nRecords with a structured body are matched against their JSON\nrendering, so the substring meets JSON syntax rather than prose: a\nbare key name such as `operation` matches every record carrying that\nkey, and `http_status: 200` matches none, because the rendering\ncontains `\"http_status\":200` with no space.\n","minLength":1,"type":"string"},"cursor":{"description":"Opaque pagination cursor returned as `next_cursor` by a previous\ncall. Resume the query after the last record of the previous page,\nrepeating the time range and every filter unchanged.\n","type":"string"},"end_time":{"description":"Exclusive end of the query window. Defaults to the current time.","format":"date-time","type":"string"},"limit":{"default":100,"description":"Maximum number of log records to return per page.","maximum":1000,"minimum":1,"type":"integer"},"logql":{"description":"Escape hatch for selections the structured filters cannot express: a\nraw LogQL expression, evaluated against this branch's log stream.\n\nOnly stream selectors and line filters are accepted — no\naggregations and no parser stages. Supplying this alongside any\nstructured filter is rejected with `conflicting_filters` rather than\nsilently ignoring one of them. `limit`, `sort_order`, and the time\nwindow still apply.\n\nThis field passes the underlying query language through to the\ncaller, so unlike the rest of this contract it may change as that\nbackend changes. Prefer the structured filters where they suffice.\n","example":"{entity_type=\"function\"} |~ \"(?i)timeout\"","minLength":1,"type":"string"},"minimum_severity":{"$ref":"#/components/schemas/ProjectBranchLogSeverity"},"scope_name":{"description":"Match the OpenTelemetry instrumentation scope name exactly.","minLength":1,"type":"string"},"service_name":{"description":"Match the OpenTelemetry `service.name` resource attribute exactly.","minLength":1,"type":"string"},"severity_text":{"description":"Match the OpenTelemetry severity text exactly.","minLength":1,"type":"string"},"since":{"allOf":[{"$ref":"#/components/schemas/ProjectBranchLogDuration"}],"description":"Length of the query window, ending at `end_time` or at the current\ntime when `end_time` is omitted. Mutually exclusive with\n`start_time`. Prefer this over computing absolute bounds when the\ncaller only means \"the last hour\".\n"},"sort_order":{"default":"desc","description":"Order matching records by timestamp. `desc`, the default, returns\nthe newest records first.\n","enum":["asc","desc"],"type":"string"},"source":{"$ref":"#/components/schemas/ProjectBranchLogSource"},"start_time":{"description":"Inclusive beginning of the query window. Mutually exclusive with\n`since`. Defaults to one hour before `end_time`, or one hour before\nthe current time when both bounds are omitted.\n","format":"date-time","type":"string"},"trace_id":{"description":"Match records associated with this OpenTelemetry trace ID. W3C Trace\nContext defines a trace ID as 32 lowercase hex digits, and that is\nwhat is stored, so an uppercase value is rejected rather than\nsilently matching nothing.\n","pattern":"^[0-9a-f]{32}$","type":"string"}},"type":"object","x-sensitive":["body_contains","logql","cursor"]},"ProjectBranchLogsQueryResponse":{"properties":{"is_truncated":{"description":"True when more records matched than were returned.","type":"boolean"},"logs":{"items":{"$ref":"#/components/schemas/ProjectBranchLogRecord"},"type":"array"},"next_cursor":{"description":"Pagination cursor to pass as `cursor` on the next request. Empty\nwhen the response is not truncated.\n","type":"string"}},"required":["is_truncated","logs"],"type":"object","x-sensitive":["logs","next_cursor"]},"ProjectCreateRequest":{"properties":{"project":{"description":"Configuration for the new project, including name, region, and Postgres compute and storage settings.","properties":{"autoscaling_limit_max_cu":{"$ref":"#/components/schemas/ComputeUnit","deprecated":true,"description":"Deprecated. Use `default_endpoint_settings.autoscaling_limit_max_cu` instead.\n\nThe maximum number of Compute Units. See [Compute size and Autoscaling configuration](https://neon.com/docs/manage/endpoints#compute-size-and-autoscaling-configuration)\nfor more information.\n"},"autoscaling_limit_min_cu":{"$ref":"#/components/schemas/ComputeUnit","deprecated":true,"description":"Deprecated. Use `default_endpoint_settings.autoscaling_limit_min_cu` instead.\n\nThe minimum number of Compute Units. The minimum value is `0.25`.\nSee [Compute size and Autoscaling configuration](https://neon.com/docs/manage/endpoints#compute-size-and-autoscaling-configuration)\nfor more information.\n"},"branch":{"description":"Configuration for the initial branch created with the project.","properties":{"annotations":{"$ref":"#/components/schemas/AnnotationValueData","description":"Arbitrary key-value metadata to attach to the branch.\n"},"database_name":{"description":"The database name. If not specified, the default database name, `neondb`, will be used.\n","type":"string"},"name":{"description":"The default branch name. If not specified, the default branch name, `main`, will be used.\n","maxLength":256,"minLength":1,"type":"string"},"role_name":{"description":"The role name. If not specified, the default role name, `{database_name}_owner`, will be used.\n","type":"string"}},"type":"object"},"default_endpoint_settings":{"$ref":"#/components/schemas/DefaultEndpointSettings"},"history_retention_seconds":{"description":"History window (point-in-time restore range) for all branches, in seconds. `0` disables it. Default 1 day (Free: 6 hours). Maximum depends on plan: Free 6 hours (21600), Launch 7 days (604800), Scale 30 days (2592000).\n","format":"int32","maximum":2592000,"minimum":0,"type":"integer"},"name":{"description":"The project name. If not specified, the name will be identical to the generated project ID","maxLength":256,"minLength":1,"type":"string"},"org_id":{"description":"ID of the organization that will own the project. If omitted when using an organization API key, it is inferred from the key.\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"pg_version":{"$ref":"#/components/schemas/PgVersion"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"region_id":{"description":"The region identifier. Refer to our [Regions](https://neon.com/docs/introduction/regions) documentation for supported regions. Values are specified in this format: `aws-us-east-1`\n","type":"string"},"settings":{"$ref":"#/components/schemas/ProjectSettingsData","description":"Project-level settings applied at creation."},"store_passwords":{"description":"Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.\n","type":"boolean"}},"type":"object"}},"required":["project"],"type":"object"},"ProjectJWKSResponse":{"description":"The list of configured JWKS definitions for a project","properties":{"jwks":{"description":"JWKS configurations associated with the project.","items":{"$ref":"#/components/schemas/JWKS"},"type":"array"}},"required":["jwks"],"type":"object"},"ProjectListItem":{"description":"Essential data about the project. Full data is available at `GET /projects/{project_id}`.\n","example":{"active_time":750111,"branch_logical_size_limit":10,"branch_logical_size_limit_bytes":10485760,"cpu_used_sec":523011,"created_at":"2022-12-13T01:30:55Z","creation_source":"console","id":"spring-example-302709","name":"spring-example-302709","owner_id":"629982cc-de05-43db-ae16-28f2399c4910","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-12-13T01:30:55Z"},"properties":{"active_time":{"description":"Control plane observed endpoints of this project being active this amount of wall-clock time.\n","format":"int64","minimum":0,"type":"integer"},"branch_logical_size_limit":{"description":"The logical size limit for a branch. The value is in MiB.\n","format":"int64","type":"integer"},"branch_logical_size_limit_bytes":{"description":"The logical size limit for a branch. The value is in B.\n","format":"int64","type":"integer"},"compute_last_active_at":{"description":"The most recent time when any endpoint of this project was active.\n\nOmitted when observed no activity for endpoints of this project.\n","format":"date-time","type":"string"},"cpu_used_sec":{"deprecated":true,"description":"Deprecated. Use `compute_time_seconds` from `GET /projects/{project_id}` instead.\n","format":"int64","type":"integer"},"created_at":{"description":"A timestamp indicating when the project was created\n","format":"date-time","type":"string"},"creation_source":{"description":"The project creation source\n","type":"string"},"default_endpoint_settings":{"$ref":"#/components/schemas/DefaultEndpointSettings"},"deleted_at":{"description":"A timestamp indicating when the project was deleted","format":"date-time","type":"string"},"effective_project_permission":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/ProjectPermissionLevel"}],"type":"string"},{"type":"null"}]},"hipaa_enabled_at":{"description":"A timestamp indicating when HIPAA was enabled for this project","format":"date-time","type":"string"},"history_retention_seconds":{"description":"The number of seconds to retain the shared history for all branches in this project.\n","format":"int32","type":"integer"},"id":{"description":"The Neon project ID. Use as the `project_id` path parameter in other endpoints.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"maintenance_starts_at":{"description":"A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time.\n","format":"date-time","type":"string"},"name":{"description":"The project name\n","type":"string"},"org_id":{"description":"ID of the organization that owns the project. Project permissions are granted to organization members as configured by the organization's admins, independent of which member created the project.\n","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"org_name":{"description":"Name of the organization that owns the project.\n","type":"string"},"owner_id":{"description":"ID of the organization that owns the project.","type":"string"},"pg_version":{"$ref":"#/components/schemas/PgVersion"},"platform_id":{"description":"The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`.\n","type":"string"},"provisioner":{"$ref":"#/components/schemas/Provisioner","description":"Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`."},"proxy_host":{"description":"The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`).\n","type":"string"},"quota_reset_at":{"deprecated":true,"description":"Deprecated. Use `consumption_period_end` from `GET /projects/{project_id}` instead. A timestamp indicating when the project quota resets.\n","format":"date-time","type":"string"},"recoverable_until":{"description":"A timestamp indicating the project will be recoverable until this date and time.","format":"date-time","type":"string"},"region_id":{"description":"Cloud region where the project's Postgres compute and storage reside (for example, `aws-us-east-2`). Valid values are returned by `GET /regions`.\n","example":"aws-us-east-2","type":"string"},"settings":{"$ref":"#/components/schemas/ProjectSettingsData","description":"Project-level settings, for example `quota`, `allowed_ips`, `enable_logical_replication`, and `maintenance_window`."},"store_passwords":{"description":"Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.\n","type":"boolean"},"synthetic_storage_size":{"description":"The current space occupied by the project in Postgres storage, in bytes. Synthetic Postgres storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches in a project.\n","format":"int64","type":"integer"},"updated_at":{"description":"A timestamp indicating when the project was last updated\n","format":"date-time","type":"string"}},"required":["active_time","branch_logical_size_limit","branch_logical_size_limit_bytes","cpu_used_sec","created_at","creation_source","id","name","owner_id","pg_version","platform_id","provisioner","proxy_host","region_id","store_passwords","updated_at"],"type":"object"},"ProjectMember":{"properties":{"effective_project_permission":{"$ref":"#/components/schemas/ProjectPermissionLevel"},"email":{"description":"Email address of the user who has been granted access to the project.","format":"email","maxLength":256,"minLength":1,"type":"string"},"explicit_project_permission":{"$ref":"#/components/schemas/ProjectPermissionLevel"},"grant_source":{"$ref":"#/components/schemas/ProjectMemberGrantSource"},"member_id":{"description":"The organization member ID.","format":"uuid","type":"string"},"name":{"description":"The user's display name.","type":"string"},"org_default_project_permission":{"$ref":"#/components/schemas/ProjectPermissionLevel"},"org_role":{"$ref":"#/components/schemas/ProjectMemberOrgRole"},"project_role":{"$ref":"#/components/schemas/ProjectRole"},"user_id":{"description":"The user ID for the organization member.","format":"uuid","type":"string"}},"required":["member_id","org_role","user_id"],"type":"object","x-sensitive":["email","name"]},"ProjectMemberGrantSource":{"description":"How a member's project access is granted.\n","enum":["explicit","org_role_default","org_admin_override","unassigned"],"type":"string"},"ProjectMemberOrgRole":{"description":"Organization-level role used by project member role management.\n","enum":["admin","member","editor","viewer","collaborator"],"type":"string"},"ProjectMemberRoleResponse":{"properties":{"credential_rotation_recommended":{"description":"Hint that database credentials may need rotation after the role change.\n","type":"boolean"},"effective_project_permission":{"$ref":"#/components/schemas/ProjectPermissionLevel"},"email":{"description":"Email address of the user who has been granted access to the project.","format":"email","maxLength":256,"minLength":1,"type":"string"},"explicit_project_permission":{"$ref":"#/components/schemas/ProjectPermissionLevel"},"member_id":{"format":"uuid","type":"string"},"name":{"description":"The user's display name.","type":"string"},"org_api_key_rotation_recommended":{"description":"Hint that project-scoped org API keys created by the target user may need rotation.\n","type":"boolean"},"org_default_project_permission":{"$ref":"#/components/schemas/ProjectPermissionLevel"},"org_role":{"$ref":"#/components/schemas/ProjectMemberOrgRole"},"project_id":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"},"project_role":{"$ref":"#/components/schemas/ProjectRole","description":"The resulting effective project role after applying org-admin default access, explicit grants, and creator fallback. Null only when the member has no remaining effective project access."},"user_id":{"format":"uuid","type":"string"}},"required":["member_id","org_role","project_id","user_id"],"type":"object","x-sensitive":["email","name"]},"ProjectMembers":{"properties":{"pagination":{"$ref":"#/components/schemas/CursorPagination"},"project_members":{"items":{"$ref":"#/components/schemas/ProjectMember"},"type":"array"}},"required":["project_members"],"type":"object"},"ProjectOwnerData":{"properties":{"branches_limit":{"description":"Maximum number of branches the owner is allowed to create across their projects.","type":"integer"},"email":{"description":"Email address of the project owner.","format":"email","maxLength":256,"minLength":1,"type":"string"},"name":{"description":"Display name of the project owner.","type":"string"},"subscription_type":{"$ref":"#/components/schemas/BillingSubscriptionType"}},"required":["branches_limit","email","name","subscription_type"],"type":"object","x-sensitive":["email","name"]},"ProjectPermission":{"properties":{"granted_at":{"description":"Timestamp when the permission was granted.","format":"date-time","type":"string"},"granted_to_email":{"description":"Email address of the user who has been granted access to the project.","format":"email","maxLength":256,"minLength":1,"type":"string"},"id":{"description":"The project permission's ID.","type":"string"},"revoked_at":{"description":"Timestamp when the permission was revoked. Null if the permission is still active.","format":"date-time","type":"string"}},"required":["granted_at","granted_to_email","id"],"type":"object","x-sensitive":["granted_to_email"]},"ProjectPermissionLevel":{"description":"The caller's effective permission for a project when\nper-project permissions are enabled. `VIEWER` grants read access,\n`EDITOR` adds update access, and `ADMIN` grants full management.\nOmitted for personal projects, flag-off organizations, and non-user\nsubjects.\n","enum":["VIEWER","EDITOR","ADMIN"],"type":"string"},"ProjectPermissions":{"properties":{"project_permissions":{"items":{"$ref":"#/components/schemas/ProjectPermission"},"type":"array"}},"required":["project_permissions"],"type":"object"},"ProjectQuota":{"description":"Per-project consumption quotas. If a quota is exceeded, all active computes\nare automatically suspended and cannot be started via API calls or incoming connections.\n\nThe exception is `logical_size_bytes`, which is enforced per branch.\nIf a branch exceeds its `logical_size_bytes` quota, computes can still be started,\nbut write operations will fail—allowing data to be deleted to free up space.\nComputes on other branches are not affected.\n\nSetting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.\n\nQuotas are enforced using per-project consumption metrics with the same names.\nThese metrics reset at the start of each billing period. `logical_size_bytes`\nis also an exception—it reflects the total data stored in a branch and does not reset.\n\nA zero or empty quota value means “unlimited.”\n","properties":{"active_time_seconds":{"description":"The total amount of wall-clock time allowed to be spent by the project's compute endpoints.\n","format":"int64","minimum":0,"type":"integer"},"compute_time_seconds":{"description":"The total amount of CPU seconds allowed to be spent by the project's compute endpoints.\n","format":"int64","minimum":0,"type":"integer"},"data_transfer_bytes":{"description":"Total amount of data transferred from all of a project's branches using the proxy.\n","format":"int64","minimum":0,"type":"integer"},"logical_size_bytes":{"description":"Limit on the logical size of every project's branch.\n\nIf a branch exceeds its `logical_size_bytes` quota, computes can still be started,\nbut write operations will fail—allowing data to be deleted to free up space.\nComputes on other branches are not affected.\n\nSetting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.\n","format":"int64","minimum":0,"type":"integer"},"written_data_bytes":{"description":"Total amount of data written to all of a project's branches.\n","format":"int64","minimum":0,"type":"integer"}},"type":"object"},"ProjectRecoverResponse":{"allOf":[{"$ref":"#/components/schemas/ProjectResponse"},{"$ref":"#/components/schemas/BranchesResponse"}]},"ProjectResponse":{"properties":{"project":{"$ref":"#/components/schemas/Project","description":"Full details of the project, including configuration, consumption metrics, and ownership."}},"required":["project"],"type":"object"},"ProjectRole":{"description":"Per-project role. `viewer` maps to `VIEWER`, `editor` maps to `EDITOR`,\nand `admin` maps to `ADMIN`.\n","enum":["viewer","editor","admin"],"type":"string"},"ProjectSettingsData":{"properties":{"allowed_ips":{"$ref":"#/components/schemas/AllowedIps"},"audit_log_level":{"$ref":"#/components/schemas/ProjectAuditLogLevel","description":"Audit logging level, set only on HIPAA-enabled organizations (absent otherwise). Values: `base`, `extended`, `full`; HIPAA defaults to `extended`. Cannot be lowered back to `base` once `extended` or `full`."},"block_public_connections":{"description":"When set, connections from the public internet\nare disallowed. This supersedes the AllowedIPs list.\nThis parameter is under active development and its semantics may change in the future.\n","type":"boolean"},"block_vpc_connections":{"description":"When set, connections using VPC endpoints are disallowed.\nThis parameter is under active development and its semantics may change in the future.\n","type":"boolean"},"enable_logical_replication":{"description":"Sets wal_level=logical for all compute endpoints in this project.\nAll active endpoints will be suspended.\nOnce enabled, logical replication cannot be disabled.\n","type":"boolean"},"hipaa":{"description":"Enables HIPAA compliance mode for the project, including audit logging.","type":"boolean"},"maintenance_window":{"$ref":"#/components/schemas/MaintenanceWindow"},"preload_libraries":{"$ref":"#/components/schemas/PreloadLibraries"},"quota":{"$ref":"#/components/schemas/ProjectQuota"}},"type":"object"},"ProjectTransferRequestResponse":{"properties":{"created_at":{"description":"The timestamp when the transfer request was created","format":"date-time","type":"string"},"expires_at":{"description":"The timestamp when the transfer request will expire","format":"date-time","type":"string"},"id":{"description":"The unique identifier for the transfer request","format":"uuid","type":"string"},"project_id":{"description":"The ID of the project that is being transferred","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"required":["created_at","expires_at","id","project_id"],"type":"object"},"ProjectUpdateRequest":{"properties":{"project":{"properties":{"default_endpoint_settings":{"$ref":"#/components/schemas/DefaultEndpointSettings"},"history_retention_seconds":{"description":"History window (point-in-time restore range) for all branches, in seconds. `0` disables it. Default 1 day (Free: 6 hours). Maximum depends on plan: Free 6 hours (21600), Launch 7 days (604800), Scale 30 days (2592000).\n","format":"int32","maximum":2592000,"minimum":0,"type":"integer"},"name":{"description":"The project name","maxLength":256,"minLength":1,"type":"string"},"settings":{"$ref":"#/components/schemas/ProjectSettingsData","description":"Project-level settings, for example `quota`, `allowed_ips`, `enable_logical_replication`, and `maintenance_window`."}},"type":"object"}},"required":["project"],"type":"object"},"ProjectsApplicationsMapResponse":{"description":"A map where key is a project ID and a value is a list of installed applications.\n","example":{"applications":{"winter-boat-259881":["vercel","github","datadog","opentelemetry"]}},"properties":{"applications":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ApplicationType","type":"string"},"type":"array"},"description":"Map of project IDs to their installed applications. Each key is a project ID; each value is an array of application types (for example, `vercel`, `github`).","type":"object"}},"required":["applications"],"type":"object","x-tags":["Project"]},"ProjectsIntegrationsMapResponse":{"description":"A map where key is a project ID and a value is a list of installed integrations.\n","example":{"integrations":{"winter-boat-259881":["vercel","github","datadog","opentelemetry"]}},"properties":{"integrations":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ApplicationType"},"type":"array"},"description":"Map of project IDs to their associated integration details.","type":"object"}},"required":["integrations"],"type":"object","x-tags":["Project"]},"ProjectsResponse":{"properties":{"projects":{"description":"List of projects accessible to the caller. Projects that exist but could not be retrieved are identified in `unavailable_project_ids`.","items":{"$ref":"#/components/schemas/ProjectListItem"},"type":"array"},"unavailable_project_ids":{"description":"A list of project IDs indicating which projects are known to exist, but whose details could not\nbe fetched within the requested (or implicit) time limit\n","items":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"},"type":"array"}},"required":["projects"],"type":"object"},"ProjectsWithIntegrationResponse":{"example":{"projects":[{"id":"round-frog-53611540","integration":"github"},{"id":"long-leaf-72329067","integration":"vercel"}]},"properties":{"projects":{"description":"Projects that have the requested integration, each including the project details and associated integration metadata.","items":{"properties":{"id":{"description":"The Neon project ID. Use as the `project_id` path parameter in other endpoints.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"integration":{"description":"Name of the external integration associated with the project.","type":"string"}},"required":["id","integration"],"type":"object"},"type":"array"}},"required":["projects"],"type":"object"},"Provisioner":{"description":"","example":"k8s-neonvm","type":"string"},"RegionResponse":{"properties":{"default":{"description":"True if this region is selected by default when no region is specified during project creation.","type":"boolean"},"geo_lat":{"description":"The geographical latitude (approximate) for the region. Empty if unknown.","type":"string"},"geo_long":{"description":"The geographical longitude (approximate) for the region. Empty if unknown.","type":"string"},"name":{"description":"A short description of the region.","type":"string"},"region_id":{"description":"Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`.","example":"aws-us-east-1","type":"string"}},"required":["default","geo_lat","geo_long","name","region_id"],"type":"object"},"Role":{"example":{"branch_id":"br-wispy-meadow-118737","created_at":"2022-11-23T17:42:25Z","name":"casey","protected":false,"updated_at":"2022-11-23T17:42:25Z"},"properties":{"authentication_method":{"description":"Authentication method configured for this role: `password`, `oauth`, or `no_login`.\n","example":"password","type":"string"},"branch_id":{"description":"The ID of the branch this role belongs to.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"A timestamp indicating when the role was created\n","format":"date-time","type":"string"},"name":{"description":"Postgres role name within the branch.\n","type":"string"},"password":{"description":"The role password\n","type":"string"},"protected":{"description":"Whether or not the role is system-protected\n","type":"boolean"},"updated_at":{"description":"A timestamp indicating when the role was last updated\n","format":"date-time","type":"string"}},"required":["branch_id","created_at","name","updated_at"],"type":"object","x-sensitive":["password"]},"RoleCreateRequest":{"properties":{"role":{"description":"Properties of the role to create.","properties":{"name":{"description":"The role name. Cannot exceed 63 bytes in length.\n","type":"string"},"no_login":{"description":"Whether to create a role that cannot login.\n","type":"boolean"}},"required":["name"],"type":"object"}},"required":["role"],"type":"object"},"RoleOperations":{"allOf":[{"$ref":"#/components/schemas/RoleResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]},"RolePasswordResponse":{"properties":{"password":{"description":"The role password\n","type":"string"}},"required":["password"],"type":"object","x-sensitive":["password"]},"RoleResponse":{"properties":{"role":{"$ref":"#/components/schemas/Role","description":"Role details for the requested database role. The `password` field is included in the response when a role is created or its password is reset, and is not returned in subsequent read requests. Store it securely at that time."}},"required":["role"],"type":"object"},"RolesResponse":{"properties":{"roles":{"description":"Roles belonging to the branch. Each role includes fields such as `branch_id`, `name`, `protected`, `created_at`, and `updated_at`.\n","items":{"$ref":"#/components/schemas/Role"},"type":"array"}},"required":["roles"],"type":"object","x-sensitive":["roles"]},"RotateCredentialResponse":{"description":"The replacement secret material for an existing credential, returned\nexactly once. `token_id`, `scopes`, `branch_id` and `created_at` are\nunchanged by the rotation — only `api_token` and\n`s3_secret_access_key` are new.\n","properties":{"api_token":{"description":"The new Bearer token; returned exactly once.","type":"string"},"branch_id":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"},"created_at":{"description":"When the credential was originally issued. Rotation replaces the\nsecrets in place and does not reset this.\n","format":"date-time","type":"string"},"expires_at":{"description":"When the credential expires; absent means never expires. Rotation\ndoes not extend it.\n","format":"date-time","type":"string"},"name":{"description":"Customer-supplied label carried on the credential. Absent when none was set at issuance.","type":"string"},"principal_type":{"description":"Always `user`: only customer-managed credentials are rotatable\nthrough this endpoint.\n","enum":["user"],"type":"string"},"s3_secret_access_key":{"description":"The new nsk_live_<64 hex> AWS_SECRET_ACCESS_KEY; returned exactly once.","type":"string"},"scopes":{"items":{"$ref":"#/components/schemas/GrantedCredentialScope"},"type":"array"},"token_id":{"description":"Opaque credential id (e.g. nak_live_<32hex>), unchanged by the\nrotation. Doubles as the `AWS_ACCESS_KEY_ID` for SigV4.\n","type":"string"},"token_id_short":{"description":"First 12 hex chars of token_id; safe to log.","type":"string"}},"required":["api_token","branch_id","created_at","principal_type","s3_secret_access_key","scopes","token_id","token_id_short"],"type":"object","x-sensitive":["api_token","s3_secret_access_key"]},"ScheduleTrigger":{"additionalProperties":false,"description":"A branch-effective schedule trigger for a Function.","properties":{"enabled":{"type":"boolean"},"function_path":{"description":"Path passed to the target Function.","type":"string"},"function_slug":{"description":"The branch-local Function slug resolved when an occurrence is consumed.","type":"string"},"inherited":{"description":"True when the effective configuration was authored on an ancestor branch.","type":"boolean"},"name":{"description":"Human-readable trigger name.","type":"string"},"next_run_at":{"description":"Next scheduled occurrence as an RFC 3339 UTC timestamp, or null\nwhile disabled or inherited and not explicitly enabled on this branch.\n","type":["null","string"]},"schedule":{"$ref":"#/components/schemas/FunctionTriggerSchedule"},"trigger_id":{"$ref":"#/components/schemas/TriggerID"},"type":{"description":"Trigger type discriminator.","enum":["schedule"],"type":"string"},"version":{"description":"Monotonic configuration version.","format":"int64","minimum":1,"type":"integer"}},"required":["enabled","function_path","function_slug","inherited","name","next_run_at","schedule","trigger_id","type","version"],"type":"object"},"ScheduleTriggerCreateRequest":{"additionalProperties":false,"properties":{"enabled":{"default":true,"description":"Whether future occurrences should be scheduled.","type":"boolean"},"function_path":{"default":"/","description":"Path passed to the target Function. Defaults to `/`.","maxLength":2048,"minLength":1,"type":"string"},"function_slug":{"description":"The branch-local Function slug to invoke.","pattern":"^[a-z0-9]{1,20}$","type":"string"},"name":{"description":"Human-readable name, unique among triggers visible on the branch.","maxLength":256,"minLength":1,"type":"string"},"schedule":{"$ref":"#/components/schemas/FunctionTriggerSchedule"},"type":{"description":"Trigger type discriminator.","enum":["schedule"],"type":"string"}},"required":["function_slug","name","schedule","type"],"type":"object"},"ScheduleTriggerUpdateRequest":{"additionalProperties":false,"minProperties":2,"properties":{"enabled":{"description":"True enables and false disables future scheduling.","type":"boolean"},"function_path":{"maxLength":2048,"minLength":1,"type":"string"},"function_slug":{"description":"Replacement branch-local Function slug.","pattern":"^[a-z0-9]{1,20}$","type":"string"},"name":{"maxLength":256,"minLength":1,"type":"string"},"schedule":{"$ref":"#/components/schemas/FunctionTriggerSchedule"},"type":{"description":"Trigger type discriminator; it does not change the trigger type.","enum":["schedule"],"type":"string"}},"required":["type"],"type":"object"},"SendNeonAuthEmailProviderTestRequest":{"description":"Request to test the branch's saved email provider. Only the recipient is supplied; the stored\nSMTP settings and password are used server-side.\n","properties":{"recipient_email":{"description":"The email address to send the test email to.","format":"email","maxLength":256,"minLength":1,"type":"string"}},"required":["recipient_email"],"type":"object"},"SendNeonAuthTestEmailRequest":{"properties":{"host":{"description":"Hostname of the email server.","type":"string"},"password":{"description":"Password for authenticating with the SMTP server.","type":"string"},"port":{"description":"TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).","type":"integer"},"recipient_email":{"description":"The email address to send the test email to.","format":"email","maxLength":256,"minLength":1,"type":"string"},"sender_email":{"description":"Email address used as the From address on outgoing auth emails.","type":"string"},"sender_name":{"description":"Display name shown as the sender in outgoing emails.","type":"string"},"username":{"description":"Username for authenticating with the SMTP server.","type":"string"}},"required":["host","password","port","recipient_email","sender_email","sender_name","username"],"type":"object","x-sensitive":["host","password","username"]},"SendNeonAuthTestEmailResponse":{"properties":{"error_message":{"description":"The error message from the email server.","type":"string"},"success":{"description":"Whether the test email was sent successfully.","type":"boolean"}},"required":["success"],"type":"object"},"SetProjectMemberRoleRequest":{"properties":{"role":{"$ref":"#/components/schemas/ProjectRole"}},"required":["role"],"type":"object"},"SharedEmailServer":{"properties":{"sender_email":{"description":"Email address used as the sender for outgoing messages from this shared email server.","type":"string"},"sender_name":{"description":"Display name shown as the sender in outgoing emails.","type":"string"}},"type":"object"},"Snapshot":{"properties":{"created_at":{"description":"Timestamp when the snapshot was created, in RFC 3339 format (UTC).","example":"2025-01-15T10:30:00Z","type":"string"},"diff_size":{"description":"Incremental Postgres storage size in bytes since the previous scheduled snapshot, when the snapshot is billed on incremental (diff) usage.\n\nWhen absent, either the incremental size has not been calculated yet and the snapshot is not being charged, or the snapshot is charged at full logical size (in that case `full_size` is set).\n","format":"int64","type":"integer"},"expires_at":{"description":"RFC 3339 timestamp when the snapshot expires and is eligible for deletion. Null if the snapshot does not have an expiry.","type":"string"},"full_size":{"description":"Full logical size of the snapshot in bytes at the time it was taken.\n\nWhen absent, the logical size has not been calculated yet and the snapshot is not being charged.\n\nWhen present, a value of 0 means the snapshot is not being charged.\n","format":"int64","type":"integer"},"id":{"description":"The snapshot ID.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"lsn":{"description":"WAL position (Log Sequence Number) at which the snapshot was captured, in Postgres LSN format (for example, `0/3000000`).","type":"string"},"manual":{"description":"True if the snapshot was created manually rather than by a schedule.","type":"boolean"},"name":{"description":"Human-readable label for the snapshot.","type":"string"},"slug":{"description":"Snapshot resource ID, unique within the project. Distinct from the internal snapshot ID and display name.","type":"string"},"source_branch_id":{"description":"Branch from which this snapshot was created.","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"timestamp":{"description":"Point in time captured by the snapshot, in RFC 3339 format (UTC).","type":"string"}},"required":["created_at","id","name"],"type":"object"},"SnapshotUpdateRequest":{"properties":{"snapshot":{"description":"Fields to update on the snapshot. Updatable fields include `name` and `expires_at`.","properties":{"expires_at":{"description":"The date and time when the snapshot will expire.\n\nOmit to leave the current expiration unchanged. Send `null` to\nclear the expiration so the snapshot never expires. A future\ntimestamp sets the absolute expiration.\n","example":"2030-06-09T18:02:16Z","format":"date-time","type":["null","string"]},"name":{"description":"Human-readable label for the snapshot.","type":"string"}},"type":"object"}},"required":["snapshot"],"type":"object"},"SpendingLimitResponse":{"properties":{"spending_limit_cents":{"description":"Monthly spending cap in cents. `null` indicates that no limit\nis currently configured.\n","format":"int64","type":["integer","null"]}},"required":["spending_limit_cents"],"type":"object"},"SpendingLimitUpdateRequest":{"properties":{"spending_limit_cents":{"description":"Monthly spending cap in cents. Must be positive. To remove a\npreviously configured limit, send a DELETE request to the\nspending_limit endpoint — `0` and `null` are rejected here.\nThe cap is alert-only: notifications fire at 80% and 100%, but\ncomputes are not suspended. Setting a cap below the period's\nalready-accrued spend is permitted and will trigger the\nover-limit notification on the next worker run.\n","format":"int64","minimum":1,"type":"integer"}},"required":["spending_limit_cents"],"type":"object"},"StandardEmailServer":{"properties":{"host":{"description":"Hostname of the email server.","type":"string"},"password":{"description":"Password for authenticating with the SMTP server.","type":"string"},"port":{"description":"TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).","type":"integer"},"sender_email":{"description":"Email address used as the From address on outgoing auth emails.","type":"string"},"sender_name":{"description":"Display name shown as the sender in outgoing emails.","type":"string"},"username":{"description":"Username for authenticating with the SMTP server.","type":"string"}},"type":"object","x-sensitive":["host","password","username"]},"StandardEmailServerResponse":{"properties":{"host":{"description":"Hostname of the email server.","type":"string"},"password":{"description":"On GET, returned redacted (empty) for ordinary callers, while callers with project-credential read permission receive the stored password — do not assume this field is empty. Update (PATCH) responses always return it redacted (empty) regardless of permission. Provide a value on update to set or rotate the password.","type":"string"},"port":{"description":"TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).","type":"integer"},"sender_email":{"description":"Email address used as the From address on outgoing auth emails.","type":"string"},"sender_name":{"description":"Display name shown as the sender in outgoing emails.","type":"string"},"username":{"description":"Username for authenticating with the SMTP server.","type":"string"}},"required":["host","password","port","sender_email","sender_name","username"],"type":"object","x-sensitive":["host","password","username"]},"StorageObjectCreatedTrigger":{"additionalProperties":false,"description":"A branch-effective trigger that invokes a Function after a successful\nupload matching its exact bucket and optional object-key prefix.\n","properties":{"enabled":{"type":"boolean"},"function_path":{"description":"Path passed to the target Function.","type":"string"},"function_slug":{"description":"The branch-local Function slug resolved when an invocation is consumed.","type":"string"},"inherited":{"description":"True when the effective configuration was authored on an ancestor branch.","type":"boolean"},"name":{"description":"Human-readable trigger name.","type":"string"},"storage_object_created":{"$ref":"#/components/schemas/FunctionTriggerStorageObjectCreated"},"trigger_id":{"$ref":"#/components/schemas/TriggerID"},"type":{"description":"Trigger type discriminator.","enum":["storage_object_created"],"type":"string"},"version":{"description":"Monotonic configuration version.","format":"int64","minimum":1,"type":"integer"}},"required":["enabled","function_path","function_slug","inherited","name","storage_object_created","trigger_id","type","version"],"type":"object"},"StorageObjectCreatedTriggerCreateRequest":{"additionalProperties":false,"properties":{"enabled":{"default":true,"description":"Whether successful matching uploads should invoke the Function.","type":"boolean"},"function_path":{"default":"/","description":"Path passed to the target Function. Defaults to `/`.","maxLength":2048,"minLength":1,"type":"string"},"function_slug":{"description":"The branch-local Function slug to invoke.","pattern":"^[a-z0-9]{1,20}$","type":"string"},"name":{"description":"Human-readable name, unique among triggers visible on the branch.","maxLength":256,"minLength":1,"type":"string"},"storage_object_created":{"$ref":"#/components/schemas/FunctionTriggerStorageObjectCreated"},"type":{"description":"Trigger type discriminator.","enum":["storage_object_created"],"type":"string"}},"required":["function_slug","name","storage_object_created","type"],"type":"object"},"StorageObjectCreatedTriggerUpdateRequest":{"additionalProperties":false,"minProperties":2,"properties":{"enabled":{"description":"True enables and false disables future matching uploads.","type":"boolean"},"function_path":{"maxLength":2048,"minLength":1,"type":"string"},"function_slug":{"description":"Replacement branch-local Function slug.","pattern":"^[a-z0-9]{1,20}$","type":"string"},"name":{"maxLength":256,"minLength":1,"type":"string"},"storage_object_created":{"$ref":"#/components/schemas/FunctionTriggerStorageObjectCreated"},"type":{"description":"Trigger type discriminator; it does not change the trigger type.","enum":["storage_object_created"],"type":"string"}},"required":["type"],"type":"object"},"SuspendTimeoutSeconds":{"description":"Duration of inactivity in seconds after which the compute endpoint is\nautomatically suspended. The value `0` means use the default value.\nThe value `-1` means never suspend. The default value is `300` seconds (5 minutes).\nThe minimum value is `60` seconds (1 minute).\nThe maximum value is `604800` seconds (1 week). For more information, see\n[Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).\n","format":"int64","maximum":604800,"minimum":-1,"type":"integer"},"TransferProjectsToOrganizationRequest":{"properties":{"destination_org_id":{"description":"The destination organization identifier","pattern":"^[a-z0-9-]{1,60}$","type":"string"},"project_ids":{"description":"The list of projects ids to transfer. Maximum of 400 project ids","items":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"},"maxItems":400,"minItems":1,"type":"array"}},"required":["destination_org_id","project_ids"],"type":"object"},"Trigger":{"description":"A branch-effective trigger discriminated by `type`. The supported trigger\ntypes are `schedule` and `storage_object_created`.\n","discriminator":{"mapping":{"schedule":"#/components/schemas/ScheduleTrigger","storage_object_created":"#/components/schemas/StorageObjectCreatedTrigger"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ScheduleTrigger"},{"$ref":"#/components/schemas/StorageObjectCreatedTrigger"}],"type":"object"},"TriggerCreateRequest":{"description":"Trigger creation payload discriminated by `type`. The supported trigger\ntypes are `schedule` and `storage_object_created`.\n","discriminator":{"mapping":{"schedule":"#/components/schemas/ScheduleTriggerCreateRequest","storage_object_created":"#/components/schemas/StorageObjectCreatedTriggerCreateRequest"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ScheduleTriggerCreateRequest"},{"$ref":"#/components/schemas/StorageObjectCreatedTriggerCreateRequest"}],"type":"object"},"TriggerID":{"description":"Opaque, server-minted project-wide trigger identifier.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$","type":"string"},"TriggerResponse":{"properties":{"trigger":{"$ref":"#/components/schemas/Trigger"}},"required":["trigger"],"type":"object"},"TriggerUpdateRequest":{"description":"Partial trigger update discriminated by `type`. The supported trigger\ntypes are `schedule` and `storage_object_created`.\n","discriminator":{"mapping":{"schedule":"#/components/schemas/ScheduleTriggerUpdateRequest","storage_object_created":"#/components/schemas/StorageObjectCreatedTriggerUpdateRequest"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ScheduleTriggerUpdateRequest"},{"$ref":"#/components/schemas/StorageObjectCreatedTriggerUpdateRequest"}],"type":"object"},"TriggersListResponse":{"properties":{"triggers":{"items":{"$ref":"#/components/schemas/Trigger"},"type":"array"}},"required":["triggers"],"type":"object"},"UpdateNeonAuthAllowLocalhostRequest":{"properties":{"allow_localhost":{"description":"Whether to allow localhost connections","type":"boolean"}},"required":["allow_localhost"],"type":"object"},"UpdateNeonAuthUserRoleRequest":{"properties":{"roles":{"description":"Roles to assign to the user in the Neon Auth (Better Auth) directory. `user` and `admin` are the built-in roles; custom role strings are also supported.","example":["admin"],"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["roles"],"type":"object"},"UpdateNeonAuthUserRoleResponse":{"properties":{"id":{"description":"ID of the updated user","type":"string"}},"required":["id"],"type":"object"},"VPCEndpoint":{"properties":{"label":{"description":"A descriptive label for the VPC endpoint","type":"string"},"vpc_endpoint_id":{"description":"Cloud provider identifier for the VPC endpoint.","type":"string"}},"required":["label","vpc_endpoint_id"],"type":"object"},"VPCEndpointAssignment":{"properties":{"label":{"description":"Human-readable name for the VPC endpoint assignment, used to identify it within the organization.","type":"string"}},"required":["label"],"type":"object"},"VPCEndpointDetails":{"properties":{"example_restricted_projects":{"description":"A list of example projects that are restricted to use this VPC endpoint.\nThere are at most 3 projects in the list, even if more projects are restricted.\n","items":{"type":"string"},"type":"array"},"label":{"description":"A descriptive label for the VPC endpoint","type":"string"},"num_restricted_projects":{"description":"The number of projects that are restricted to use this VPC endpoint.\n","type":"integer"},"state":{"description":"The current state of the VPC endpoint. `new` means the endpoint has just been configured and is pending acceptance by Neon. `accepted` means the VPC connection has been accepted by Neon.\n","example":"new","type":"string"},"vpc_endpoint_id":{"description":"Cloud provider identifier for the VPC endpoint.","type":"string"}},"required":["example_restricted_projects","label","num_restricted_projects","state","vpc_endpoint_id"],"type":"object","x-sensitive":["state"]},"VPCEndpointWithRegion":{"allOf":[{"$ref":"#/components/schemas/VPCEndpoint"},{"properties":{"region_id":{"description":"The region where the VPC endpoint is located","type":"string"}},"required":["region_id"],"type":"object"}]},"VPCEndpointsResponse":{"properties":{"endpoints":{"description":"List of VPC endpoints returned by the request.","items":{"$ref":"#/components/schemas/VPCEndpoint"},"type":"array"}},"required":["endpoints"],"type":"object"},"VPCEndpointsWithRegionResponse":{"properties":{"endpoints":{"description":"VPC endpoints associated with the region.","items":{"$ref":"#/components/schemas/VPCEndpointWithRegion"},"type":"array"}},"required":["endpoints"],"type":"object"}},"securitySchemes":{"BearerAuth":{"description":"The Neon API requires an API key to authorize your requests, which you can enter below.\nRefer to our documentation to find out how to generate and use [API keys](https://neon.com/docs/manage/api-keys).\n","scheme":"bearer","type":"http"},"CookieAuth":{"in":"cookie","name":"zenith","type":"apiKey"},"TokenCookieAuth":{"in":"cookie","name":"keycloak_token","type":"apiKey"}}},"info":{"contact":{"email":"help@databricks.com"},"description":"The Neon API is the management API for Neon. Use it to provision, configure, and manage resources such as projects, branches, databases, roles, functions, and object storage.\n\nSee the [Neon API reference](https://neon.com/docs/reference/api) for details, and [Manage API keys](https://neon.com/docs/manage/api-keys/) to create and use API keys.","license":{"name":"Proprietary"},"title":"Neon API","version":"v2"},"openapi":"3.0.3","paths":{"/api_keys":{"get":{"description":"Retrieves the API keys for your Neon account.\nThe response does not include API key tokens. A token is only provided when creating an API key.\nAPI keys can also be managed in the Neon Console.\nFor more information, see [Manage API keys](https://neon.com/docs/manage/api-keys/).\n","operationId":"listApiKeys","responses":{"200":{"content":{"application/json":{"schema":{"example":[{"created_at":"2022-11-15T20:13:35Z","created_by":{"id":"629982cc-de05-43db-ae16-28f2399c4910","image":"http://link.to.image","name":"John Smith"},"id":165432,"last_used_at":"2022-11-15T20:22:51Z","last_used_from_addr":"192.0.2.255","name":"mykey_1"},{"created_at":"2022-11-15T20:12:36Z","created_by":{"id":"629982cc-de05-43db-ae16-28f2399c4910","image":"http://link.to.image","name":"John Smith"},"id":165433,"last_used_at":"2022-11-15T20:15:04Z","last_used_from_addr":"192.0.2.255","name":"mykey_2"}],"items":{"$ref":"#/components/schemas/ApiKeysListResponseItem"},"type":"array"}}},"description":"Returned the API keys for the Neon account"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List API keys","tags":["API Key"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/api_keys\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/api_keys'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/api_keys\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/api_keys\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/api_keys', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/api_keys', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/api_keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/api_keys\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/api_keys\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates an API key.\nThe `key_name` is a user-specified name for the key.\nReturns an `id` and `key`; the `key` is a randomly generated, 64-bit token required to access the Neon API.\nStore the key securely — it is only returned once.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n","operationId":"createApiKey","requestBody":{"content":{"application/json":{"example":{"key_name":"mykey"},"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2022-11-15T20:13:35Z","created_by":"629982cc-de05-43db-ae16-28f2399c4910","id":165434,"key":"9v1faketcjbl4sn1013keyd43n2a8qlfakeog8yvp40hx16keyjo1bpds4y2dfms3","name":"mykey"},"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}},"description":"Created an API key"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create API key","tags":["API Key"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/api_keys\");\nrequest.Content = new StringContent(\"{\\\"key_name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/api_keys' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key_name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"key_name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/api_keys\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/api_keys\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"key_name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/api_keys', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"key_name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/api_keys', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"key_name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/api_keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"key_name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/api_keys\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"key_name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/api_keys\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"key_name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/api_keys/{key_id}":{"delete":{"description":"Revokes the specified API key.\nAn API key that is no longer needed can be revoked.\nThis action cannot be reversed.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n","operationId":"revokeApiKey","parameters":[{"description":"The API key ID","in":"path","name":"key_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2022-11-15T20:13:35Z","created_by":"629982cc-de05-43db-ae16-28f2399c4910","id":165435,"last_used_at":"2022-11-15T20:15:04Z","last_used_from_addr":"192.0.2.255","name":"mykey","revoked":true},"schema":{"$ref":"#/components/schemas/ApiKeyRevokeResponse"}}},"description":"Revoked the specified API key"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Revoke API key","tags":["API Key"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/api_keys/0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/api_keys/0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/api_keys/0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/api_keys/0\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/api_keys/0', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/api_keys/0', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/api_keys/0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/api_keys/0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/api_keys/0\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/auth":{"get":{"description":"Returns authentication details for the credentials used in the request,\nincluding the credential type (API key, Bearer token, or OAuth session)\nand the associated identity.\n","operationId":"getAuthDetails","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDetailsResponse"}}},"description":"Returned auth information about the current auth entity\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve request authentication details","tags":["Users"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/auth\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/auth'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/auth\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/auth\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/auth', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/auth', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/auth\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/auth\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/auth\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/consumption_history/projects":{"get":{"description":"Retrieves consumption metrics for Scale, Business, and Enterprise plan projects. History begins at the time of upgrade.\nResults are ordered by time in ascending order (oldest to newest).\nIssuing a call to this API does not wake a project's compute endpoint.\n","operationId":"getConsumptionHistoryPerProject","parameters":[{"description":"Specify the cursor value from the previous response to get the next batch of projects.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Specify a value from 1 to 100 to limit number of projects in the response.","in":"query","name":"limit","schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Specify a list of project IDs to filter the response.\nIf omitted, the response will contain all projects.\nA list of project IDs can be specified as an array of parameter values or as a comma-separated list in a single parameter value.\n- As an array of parameter values: `project_ids=cold-poetry-09157238%20&project_ids=quiet-snow-71788278`\n- As a comma-separated list in a single parameter value: `project_ids=cold-poetry-09157238,quiet-snow-71788278`\n","in":"query","name":"project_ids","schema":{"items":{"pattern":"^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$","type":"string"},"maxItems":100,"minItems":0,"type":"array"}},{"description":"Specify the start `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n\nThe consumption history is available starting from `March 1, 2024, at 00:00:00 UTC`.\n","in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Specify the end `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified granularity.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n","in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Specify the granularity of consumption metrics.\nHourly, daily, and monthly metrics are available for the last 168 hours, 60 days,\nand 1 year, respectively.\n","in":"query","name":"granularity","required":true,"schema":{"$ref":"#/components/schemas/ConsumptionHistoryGranularity"}},{"description":"Specify the organization for which the project consumption metrics should be returned.\nIf this parameter is not provided, the endpoint will return the metrics for the\nauthenticated user's projects.\n","in":"query","name":"org_id","schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"deprecated":true,"description":"The field is deprecated. Please use `metrics` instead.\nIf `metrics` is specified, this field is ignored.\nInclude metrics utilized in previous pricing models.\n- **data_storage_bytes_hour**: The sum of the maximum observed storage values for each hour,\n  which never decreases.\n","in":"query","name":"include_v1_metrics","schema":{"type":"boolean"}},{"description":"Specify a list of metrics to include in the response.\nIf omitted, active_time, compute_time, written_data are returned.\nPossible values:\n- `active_time_seconds`\n- `compute_time_seconds`\n- `written_data_bytes`\n- `synthetic_storage_size_bytes` (deprecated: always returns 0; use the consumption history v2 endpoints instead)\n- `data_storage_bytes_hour`\n- `logical_size_bytes`\n- `logical_size_bytes_hour`\n\nA list of metrics can be specified as an array of parameter values or as a comma-separated list in a single parameter value.\n- As an array of parameter values: `metrics=cpu_seconds&metrics=ram_bytes`\n- As a comma-separated list in a single parameter value: `metrics=cpu_seconds,ram_bytes`\n","in":"query","name":"metrics","schema":{"$ref":"#/components/schemas/ConsumptionHistoryQueryMetrics"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ConsumptionHistoryPerProjectResponse"},{"$ref":"#/components/schemas/PaginationResponse"}]}}},"description":"Returned project consumption metrics for the Neon account"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"This endpoint is not available. It is only supported with Scale, Business, and Enterprise plan accounts."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Account is not a member of the organization specified by `org_id`."},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"The specified `date-time` range is outside the boundaries of the specified `granularity`.\nAdjust your `from` and `to` values or select a different `granularity`.\n"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Too many requests"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve project consumption metrics (legacy plans)","tags":["Consumption"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/consumption_history/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&include_v1_metrics=true&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/consumption_history/v2/branches":{"get":{"description":"Returns consumption metrics for each branch across one or more projects listed in\n`project_ids` (1 to 100 projects). Available for accounts on paid usage-based Launch, Scale,\nAgent, and Enterprise plans.\n\nHistory starts when the account first ingests branch-level consumption data.\n\nThe `metrics` query parameter is required. Only these six values are supported on this\nendpoint:\n`compute_unit_seconds`, `root_branch_bytes_month`, `child_branch_bytes_month`,\n`instant_restore_bytes_month`, `public_network_transfer_bytes`, `private_network_transfer_bytes`.\n\nThis endpoint does not support `extra_branches_month` or `snapshot_storage_bytes_month`.\nUse `GET /consumption_history/v2/projects` for those.\n\nConsumption metrics within each branch are returned in ascending time order (oldest first).\nThis request does not wake project computes.\n","operationId":"getConsumptionHistoryPerBranchV2","parameters":[{"description":"Cursor from the previous response (`pagination.cursor`). Pass it to fetch the next page\nof branches. Pages are ordered by project ID, then branch ID.\n","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Maximum number of branches per page. Allowed range: 1 to 1000. Default: 100.\n","in":"query","name":"limit","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Project IDs to include (required, 1 to 100). Returns metrics for branches in these projects.\n\nPass multiple IDs as repeated query parameters or a comma-separated list:\n- `project_ids=cold-poetry-09157238&project_ids=quiet-snow-71788278`\n- `project_ids=cold-poetry-09157238,quiet-snow-71788278`\n","in":"query","name":"project_ids","required":true,"schema":{"items":{"pattern":"^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$","type":"string"},"maxItems":100,"minItems":1,"type":"array"}},{"description":"Optional branch IDs to filter the response (up to 100). If omitted, all branches in the\nlisted projects are included.\n\nPass multiple IDs as repeated query parameters or a comma-separated list:\n- `branch_ids=br-aged-salad-637688&branch_ids=br-sweet-breeze-497520`\n- `branch_ids=br-aged-salad-637688,br-sweet-breeze-497520`\n","in":"query","name":"branch_ids","schema":{"items":{"pattern":"^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$","type":"string"},"maxItems":100,"minItems":0,"type":"array"}},{"description":"Specify the start `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n\nBranch-level metrics are returned from when the account first ingests branch-level\nconsumption data. Periods before that time contain no branch metrics.\n","in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Specify the end `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n","in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Specify the granularity of consumption metrics.\nHourly, daily, and monthly metrics are available for the last 168 hours, 60 days,\nand 1 year, respectively.\n","in":"query","name":"granularity","required":true,"schema":{"$ref":"#/components/schemas/ConsumptionHistoryGranularity"}},{"description":"Organization ID. Metrics are returned for projects in this organization.\n","in":"query","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"Required. List the metrics to return. Only these values are supported:\n- `compute_unit_seconds`\n- `root_branch_bytes_month`\n- `child_branch_bytes_month`\n- `instant_restore_bytes_month`\n- `public_network_transfer_bytes`\n- `private_network_transfer_bytes`\n\nNot supported on this endpoint: `extra_branches_month`, `snapshot_storage_bytes_month`.\nUse `GET /consumption_history/v2/projects` for those.\n\nPass multiple values as repeated query parameters or a comma-separated list:\n- `metrics=compute_unit_seconds&metrics=public_network_transfer_bytes`\n- `metrics=compute_unit_seconds,public_network_transfer_bytes`\n","in":"query","name":"metrics","required":true,"schema":{"$ref":"#/components/schemas/ConsumptionHistoryQueryMetrics"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ConsumptionHistoryPerBranchV2Response"},{"$ref":"#/components/schemas/PaginationResponse"}]}}},"description":"Branch consumption metrics for the Neon account."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Not available for this account. Branch consumption history requires a paid usage-based\nLaunch, Scale, Agent, or Enterprise plan.\n"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Account is not a member of the organization specified by `org_id`."},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"The `from` and `to` range is not valid for the selected `granularity`. Adjust the range or\nchoose a different granularity.\n"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Too many requests"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve branch consumption metrics","tags":["Consumption"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/consumption_history/v2/branches?branch_ids=%5B%22string%22%5D&cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=100&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/consumption_history/v2/projects":{"get":{"description":"Returns consumption metrics for up to `limit` projects per page. If `project_ids` is omitted,\nprojects in the organization are included across pages (use `cursor`). If `project_ids` is\nprovided, the response is limited to those projects (up to 100). Available for accounts on\nLaunch, Scale, Agent, Business, and Enterprise plans.\n\nHistory starts when the account upgrades to an eligible plan.\n\nThe `metrics` query parameter is required. Supported values:\n`compute_unit_seconds`, `root_branch_bytes_month`, `child_branch_bytes_month`,\n`instant_restore_bytes_month`, `public_network_transfer_bytes`, `private_network_transfer_bytes`,\n`extra_branches_month`, `snapshot_storage_bytes_month`.\n\nConsumption metrics within each project are returned in ascending time order (oldest first).\nThis request does not wake project computes.\n","operationId":"getConsumptionHistoryPerProjectV2","parameters":[{"description":"Cursor from the previous response (`pagination.cursor`). Pass it to fetch the next page\nof projects. Pages are ordered by project creation order (newest first).\n","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Maximum number of projects per page. Allowed range: 1 to 100. Default: 10.\n","in":"query","name":"limit","schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Optional project IDs to filter the response (up to 100). If omitted, projects in the\norganization are included across pages (use `cursor` and `limit`).\n\nPass multiple IDs as repeated query parameters or a comma-separated list:\n- `project_ids=cold-poetry-09157238&project_ids=quiet-snow-71788278`\n- `project_ids=cold-poetry-09157238,quiet-snow-71788278`\n","in":"query","name":"project_ids","schema":{"items":{"pattern":"^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$","type":"string"},"maxItems":100,"minItems":0,"type":"array"}},{"description":"Specify the start `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n\nThe earliest allowed `from` value is `March 1, 2024, at 00:00:00 UTC`.\nMetrics are returned from when the account upgraded to an eligible plan, which may be\nlater than that date.\n","in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Specify the end `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n","in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Specify the granularity of consumption metrics.\nHourly, daily, and monthly metrics are available for the last 168 hours, 60 days,\nand 1 year, respectively.\n","in":"query","name":"granularity","required":true,"schema":{"$ref":"#/components/schemas/ConsumptionHistoryGranularity"}},{"description":"Organization ID. Metrics are returned for projects in this organization.\n","in":"query","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"Required. List the metrics to return. Supported values:\n- `compute_unit_seconds`\n- `root_branch_bytes_month`\n- `child_branch_bytes_month`\n- `instant_restore_bytes_month`\n- `public_network_transfer_bytes`\n- `private_network_transfer_bytes`\n- `extra_branches_month`\n- `snapshot_storage_bytes_month`\n\nPass multiple values as repeated query parameters or a comma-separated list:\n- `metrics=compute_unit_seconds&metrics=extra_branches_month`\n- `metrics=compute_unit_seconds,extra_branches_month`\n","in":"query","name":"metrics","required":true,"schema":{"$ref":"#/components/schemas/ConsumptionHistoryQueryMetrics"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ConsumptionHistoryPerProjectV2Response"},{"$ref":"#/components/schemas/PaginationResponse"}]}}},"description":"Project consumption metrics for the Neon account."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Not available for this account. Project consumption history requires a Launch, Scale,\nAgent, Business, or Enterprise plan.\n"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Account is not a member of the organization specified by `org_id`."},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"The `from` and `to` range is not valid for the selected `granularity`. Adjust the range or\nchoose a different granularity.\n"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Too many requests"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve project consumption metrics","tags":["Consumption"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/consumption_history/v2/projects?cursor=string&from=2026-06-09T00%3A00%3A00Z&granularity=daily&limit=10&metrics=%5B%22string%22%5D&org_id=string&project_ids=%5B%22string%22%5D&to=2026-06-09T00%3A00%3A00Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/organizations/{org_id}":{"get":{"description":"Retrieves details for the specified organization, including its name, plan, and configuration.\n","operationId":"getOrganization","responses":{"200":{"content":{"application/json":{"example":{"created_at":"2024-02-23T17:42:25Z","handle":"my-organization-my-organization-morning-bread-81040908","id":"my-organization-morning-bread-81040908","managed_by":"console","name":"my-organization","plan":"scale","require_mfa":false,"updated_at":"2024-02-26T20:41:25Z"},"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"Returned information about the organization"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve organization details","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/organizations/{org_id}/api_keys":{"get":{"description":"Retrieves the API keys for the specified organization.\nThe response does not include API key tokens. A token is only provided when creating an API key.\nAPI keys can also be managed in the Neon Console.\nFor more information, see [Manage API keys](https://neon.com/docs/manage/api-keys/).\n","operationId":"listOrgApiKeys","responses":{"200":{"content":{"application/json":{"schema":{"example":[{"created_at":"2022-11-15T20:13:35Z","created_by":{"id":"629982cc-de05-43db-ae16-28f2399c4910","image":"http://link.to.image","name":"John Smith"},"id":165432,"last_used_at":"2022-11-15T20:22:51Z","last_used_from_addr":"192.0.2.255","name":"orgkey_1"},{"created_at":"2022-11-15T20:12:36Z","created_by":{"id":"629982cc-de05-43db-ae16-28f2399c4910","image":"http://link.to.image","name":"John Smith"},"id":165433,"last_used_at":"2022-11-15T20:15:04Z","last_used_from_addr":"192.0.2.255","name":"orgkey_2"}],"items":{"$ref":"#/components/schemas/OrgApiKeysListResponseItem"},"type":"array"}}},"description":"Returned the API keys for the specified organization"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List organization API keys","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/api_keys\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/api_keys'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/api_keys\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/api_keys\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/api_keys', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/api_keys', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/api_keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/api_keys\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/api_keys\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates an API key for the specified organization.\nThe `key_name` is a user-specified name for the key.\nReturns an `id` and `key`; the `key` is a randomly generated, 64-bit token required to access the Neon API.\nStore the key securely — it is only returned once.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n","operationId":"createOrgApiKey","requestBody":{"content":{"application/json":{"example":{"key_name":"orgkey"},"schema":{"$ref":"#/components/schemas/OrgApiKeyCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2022-11-15T20:13:35Z","created_by":"629982cc-de05-43db-ae16-28f2399c4910","id":165434,"key":"9v1faketcjbl4sn1013keyd43n2a8qlfakeog8yvp40hx16keyjo1bpds4y2dfms3","name":"orgkey"},"schema":{"$ref":"#/components/schemas/OrgApiKeyCreateResponse"}}},"description":"Created an organization API key"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create organization API key","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/organizations/string/api_keys\");\nrequest.Content = new StringContent(\"{\\\"key_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/organizations/string/api_keys' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key_name\":\"string\",\"project_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"key_name\":\"string\",\"project_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/organizations/string/api_keys\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/api_keys\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"key_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/api_keys', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"key_name\":\"string\",\"project_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/api_keys', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"key_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/api_keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"key_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/organizations/string/api_keys\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"key_name\":\"string\",\"project_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/api_keys\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"key_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/organizations/{org_id}/api_keys/{key_id}":{"delete":{"description":"Revokes the specified organization API key.\nAn API key that is no longer needed can be revoked.\nThis action cannot be reversed.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n","operationId":"revokeOrgApiKey","parameters":[{"description":"The API key ID","in":"path","name":"key_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2022-11-15T20:13:35Z","created_by":"629982cc-de05-43db-ae16-28f2399c4910","id":165435,"last_used_at":"2022-11-15T20:15:04Z","last_used_from_addr":"192.0.2.255","name":"orgkey","revoked":true},"schema":{"$ref":"#/components/schemas/OrgApiKeyRevokeResponse"}}},"description":"Revoked the specified organization API key"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Revoke organization API key","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/organizations/string/api_keys/0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/organizations/string/api_keys/0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/api_keys/0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/api_keys/0\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/api_keys/0', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/api_keys/0', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/api_keys/0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/api_keys/0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/api_keys/0\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/organizations/{org_id}/billing/spending_limit":{"delete":{"description":"Removes the configured monthly spending limit for the specified organization.\nIdempotent — removing an already-unset limit still succeeds.\nAvailable to organization admins on Launch and Scale plans only.\n","operationId":"deleteOrganizationSpendingLimit","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"The spending limit has been cleared."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Remove organization spending limit","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/organizations/string/billing/spending_limit'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/billing/spending_limit', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/billing/spending_limit', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"get":{"description":"Returns the configured monthly spending limit for the specified organization.\n`spending_limit_cents: null` indicates that no limit is currently set.\nAvailable to organization members with read access on Launch and Scale plans only.\n","operationId":"getOrganizationSpendingLimit","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendingLimitResponse"}}},"description":"The organization's current spending limit."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve organization spending limit","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/billing/spending_limit'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/billing/spending_limit', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/billing/spending_limit', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"put":{"description":"Sets the monthly spending limit for the specified organization.\nTo remove a previously configured limit, send a DELETE request to this endpoint.\nWhen a limit is configured, email notifications are sent at 80% and 100% of the limit.\nComputes are not suspended when the limit is reached.\nAvailable to organization admins on Launch and Scale plans only.\n","operationId":"setOrganizationSpendingLimit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendingLimitUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendingLimitResponse"}}},"description":"The updated spending limit value."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Set organization spending limit","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\");\nrequest.Content = new StringContent(\"{\\\"spending_limit_cents\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://console.neon.tech/api/v2/organizations/string/billing/spending_limit' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"spending_limit_cents\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"spending_limit_cents\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"spending_limit_cents\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/billing/spending_limit', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"spending_limit_cents\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/billing/spending_limit', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"spending_limit_cents\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"spending_limit_cents\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"spending_limit_cents\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/billing/spending_limit\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"spending_limit_cents\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/organizations/{org_id}/invitations":{"get":{"description":"Retrieves pending and accepted invitations for the specified organization.\n","operationId":"getOrganizationInvitations","responses":{"200":{"content":{"application/json":{"example":{"invitations":[{"email":"invited1@email.com","id":"db8faf32-b07f-4b0f-94c8-5c288909f5d3","invited_at":"2024-02-23T17:42:25Z","invited_by":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","org_id":"my-organization-morning-bread-81040908","role":"admin"},{"email":"invited2@email.com","id":"c52f0d22-ebd9-4708-ae44-2872cae49a83","invited_at":"2024-02-23T12:42:25Z","invited_by":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","org_id":"my-organization-morning-bread-81040908","role":"member"}]},"schema":{"$ref":"#/components/schemas/OrganizationInvitationsResponse"}}},"description":"Returned information about the organization invitations"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List organization invitations","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/invitations\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/invitations'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/invitations\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/invitations\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/invitations', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/invitations', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/invitations\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/invitations\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/invitations\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates invitations for a specific organization.\nIf the invited user has an existing account, they automatically join as a member.\nIf they don't yet have an account, they are invited to create one, after which they become a member.\nEach invited user receives an email notification.\n","operationId":"createOrganizationInvitations","requestBody":{"content":{"application/json":{"example":{"invitations":[{"email":"invited-user@email.com","role":"member"}]},"schema":{"$ref":"#/components/schemas/OrganizationInvitesCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitationsResponse"}}},"description":"The created organization invitation"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create organization invitations","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/organizations/string/invitations\");\nrequest.Content = new StringContent(\"{\\\"invitations\\\":[{\\\"email\\\":\\\"user@example.com\\\",\\\"role\\\":\\\"admin\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/organizations/string/invitations' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"invitations\":[{\"email\":\"user@example.com\",\"role\":\"admin\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"invitations\":[{\"email\":\"user@example.com\",\"role\":\"admin\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/organizations/string/invitations\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/invitations\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"invitations\\\":[{\\\"email\\\":\\\"user@example.com\\\",\\\"role\\\":\\\"admin\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/invitations', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"invitations\":[{\"email\":\"user@example.com\",\"role\":\"admin\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/invitations', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"invitations\\\":[{\\\"email\\\":\\\"user@example.com\\\",\\\"role\\\":\\\"admin\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/invitations\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"invitations\\\":[{\\\"email\\\":\\\"user@example.com\\\",\\\"role\\\":\\\"admin\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/organizations/string/invitations\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"invitations\":[{\"email\":\"user@example.com\",\"role\":\"admin\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/invitations\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"invitations\\\":[{\\\"email\\\":\\\"user@example.com\\\",\\\"role\\\":\\\"admin\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/organizations/{org_id}/members":{"get":{"description":"Retrieves a paginated list of members for the specified organization.\n","operationId":"getOrganizationMembers","parameters":[{"description":"Sort the members by the specified field. Defaults to `joined_at`.","in":"query","name":"sort_by","schema":{"default":"joined_at","enum":["email","role","joined_at"],"type":"string"}},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/SortOrderParam"},{"description":"The maximum number of members to return in the response","in":"query","name":"limit","schema":{"maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"members":[{"member":{"id":"d57833f2-d308-4ede-9d2e-468d9d013d1b","joined_at":"2024-02-23T17:42:25Z","org_id":"my-organization-morning-bread-81040908","role":"admin","user_id":"b107d689-6dd2-4c9a-8b9e-0b25e457cf56"},"user":{"email":"user1@email.com"}},{"member":{"id":"5fee13ac-957b-40cd-8de0-4d494cc28e28","joined_at":"2024-02-21T16:42:25Z","org_id":"my-organization-morning-bread-81040908","role":"member","user_id":"6df052ac-ca9a-4321-8963-b6507b2d7dee"},"user":{"email":"user2@email.com"}}],"pagination":{"next":"eyJtZW1iZXJfaWQiOiI1ZmVlMTNhYy05NTdiLTQwY2QtOGRlMC00ZDQ5NGNjMjhlMjgiLCJzb3J0X2J5Ijoiam9pbmVkX2F0In0=","sort_by":"joined_at","sort_order":"desc"}},"schema":{"allOf":[{"$ref":"#/components/schemas/OrganizationMembersResponse"},{"$ref":"#/components/schemas/CursorPaginationResponse"}]}}},"description":"Returned information about organization members"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List organization members","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/members?cursor=string&limit=0&sort_by=joined_at&sort_order=desc\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/organizations/{org_id}/members/{member_id}":{"delete":{"description":"Removes the specified member from the organization.\nOnly organization admins can perform this action.\nThe last admin in an organization cannot be removed.\n","operationId":"removeOrganizationMember","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"Removed organization member"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Remove organization member","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves information about the specified organization member.\n","operationId":"getOrganizationMember","responses":{"200":{"content":{"application/json":{"example":{"id":"d57833f2-d308-4ede-9d2e-468d9d013d1b","joined_at":"2024-02-23T17:42:25Z","org_id":"my-organization-morning-bread-81040908","role":"admin","user_id":"b107d689-6dd2-4c9a-8b9e-0b25e457cf56"},"schema":{"$ref":"#/components/schemas/Member"}}},"description":"Returned information about the organization member"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve organization member details","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon organization member ID","in":"path","name":"member_id","required":true,"schema":{"format":"uuid","type":"string"}}],"patch":{"description":"Updates the role of an existing member in the specified organization.\nThe requested role must be valid for the organization.\nOnly organization admins can call this endpoint.\n","operationId":"updateOrganizationMember","requestBody":{"content":{"application/json":{"example":{"role":"member"},"schema":{"$ref":"#/components/schemas/OrganizationMemberUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"description":"The updated organization member"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update role for organization member","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\");\nrequest.Content = new StringContent(\"{\\\"role\\\":\\\"admin\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"role\":\"admin\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"role\":\"admin\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"role\\\":\\\"admin\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"role\":\"admin\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"role\\\":\\\"admin\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"role\\\":\\\"admin\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"role\":\"admin\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/members/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"role\\\":\\\"admin\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints":{"get":{"description":"Retrieves the list of VPC endpoints for the specified Neon organization.\n","operationId":"listOrganizationVPCEndpoints","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPCEndpointsResponse"}}},"description":"The list of configured VPC endpoint IDs for the specified organization"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List VPC endpoints","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon region ID","in":"path","name":"region_id","required":true,"schema":{"type":"string"}}]},"/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}":{"delete":{"description":"Deletes the VPC endpoint from the specified Neon organization.\nIf you delete a VPC endpoint from a Neon organization, that VPC endpoint cannot\nbe added back to the Neon organization.\n","operationId":"deleteOrganizationVPCEndpoint","responses":{"200":{"description":"Deleted the VPC endpoint from the specified Neon organization"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete VPC endpoint","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves the current state and configuration details of a specified VPC endpoint.\n","operationId":"getOrganizationVPCEndpointDetails","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPCEndpointDetails"}}},"description":"Returned the current status and configuration details of the specified VPC endpoint."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve VPC endpoint details","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon region ID.\nAzure regions are currently not supported.\n","in":"path","name":"region_id","required":true,"schema":{"type":"string"}},{"description":"The VPC endpoint ID","in":"path","name":"vpc_endpoint_id","required":true,"schema":{"type":"string"}}],"post":{"description":"Assigns a VPC endpoint to a Neon organization or updates its existing assignment.\n","operationId":"assignOrganizationVPCEndpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPCEndpointAssignment"}}},"required":true},"responses":{"200":{"description":"Assigned the VPC endpoint to the specified Neon organization"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Assign or update VPC endpoint","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\");\nrequest.Content = new StringContent(\"{\\\"label\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"label\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"label\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"label\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"label\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"label\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"label\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"label\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/vpc/region/string/vpc_endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"label\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/organizations/{org_id}/vpc/vpc_endpoints":{"get":{"description":"Retrieves the list of VPC endpoints for the specified Neon organization across all regions.\n","operationId":"listOrganizationVPCEndpointsAllRegions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPCEndpointsWithRegionResponse"}}},"description":"The list of configured VPC endpoint IDs for the specified organization across all regions"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List VPC endpoints across all regions","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/vpc/vpc_endpoints\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon organization ID","in":"path","name":"org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/organizations/{source_org_id}/projects/transfer":{"parameters":[{"description":"The Neon organization ID (source org, which currently owns the project)","in":"path","name":"source_org_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Transfers selected projects, identified by their IDs, from your organization to another specified organization.\n","operationId":"transferProjectsFromOrgToOrg","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferProjectsToOrganizationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"Projects successfully transferred from organization to organization"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsUnsatisfiedResponse"}}},"description":"Transfer failed. The target organization has too many projects or an incompatible plan. Reduce projects or upgrade the target organization."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsWithIntegrationResponse"}}},"description":"Transfer failed. Projects with active integrations (for example, GitHub or Vercel) cannot be transferred."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Transfer projects between organizations","tags":["Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/organizations/string/projects/transfer\");\nrequest.Content = new StringContent(\"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/organizations/string/projects/transfer' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/organizations/string/projects/transfer\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/organizations/string/projects/transfer\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/projects/transfer', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/organizations/string/projects/transfer', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/organizations/string/projects/transfer\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/organizations/string/projects/transfer\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/organizations/string/projects/transfer\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects":{"get":{"description":"Retrieves a list of projects for the specified organization.\nIf using a personal API key, include the `org_id` parameter to specify which organization to work with.\nIf using an org API key, `org_id` is automatically inferred from the key.\nFor more information, see [Manage organizations using the Neon API](https://neon.com/docs/manage/orgs-api)\nand [Manage projects](https://neon.com/docs/manage/projects/).\n","operationId":"listProjects","parameters":[{"description":"Specify the cursor value from the previous response to retrieve the next batch of projects.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Specify a value from 1 to 400 to limit number of projects in the response.","in":"query","name":"limit","schema":{"default":10,"maximum":400,"minimum":1,"type":"integer"}},{"description":"Search by project `name` or `id`. You can specify partial `name` or `id` values to filter results.","in":"query","name":"search","schema":{"type":"string"}},{"description":"Search for projects by `org_id`.","in":"query","name":"org_id","schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"$ref":"#/components/parameters/TimeoutParam"},{"description":"Show only deleted projects within the recovery window.\n","in":"query","name":"recoverable","schema":{"default":false,"type":"boolean"},"x-stability-level":"beta"}],"responses":{"200":{"content":{"application/json":{"example":{"applications":{"winter-boat-259881":["vercel","github"]},"integrations":{"winter-boat-259881":["vercel","github"]},"projects":[{"active_time":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10800,"cpu_used_sec":0,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","id":"shiny-wind-028834","name":"shiny-wind-028834","owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z"},{"active_time":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10800,"cpu_used_sec":0,"created_at":"2022-11-23T17:52:25Z","creation_source":"console","id":"winter-boat-259881","name":"winter-boat-259881","org_id":"org-morning-bread-81040908","owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:52:25Z"}]},"schema":{"allOf":[{"$ref":"#/components/schemas/ProjectsResponse"},{"$ref":"#/components/schemas/PaginationResponse"},{"$ref":"#/components/schemas/ProjectsApplicationsMapResponse"},{"$ref":"#/components/schemas/ProjectsIntegrationsMapResponse"}]}}},"description":"Returned a list of projects for the Neon account"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List projects","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects?cursor=string&limit=10&org_id=string&recoverable=false&search=string&timeout=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a Neon project within an organization.\nIf using a personal API key, include the `org_id` parameter to specify which organization to create the project in.\nIf using an org API key, `org_id` is automatically inferred from the key.\nPlan limits define how many projects you can create.\nFor more information, see [Manage projects](https://neon.com/docs/manage/projects/).\n\nYou can specify a region and Postgres version in the request body.\nNeon supports Postgres 14 through 18, with 19 rolling out to enabled regions.\nFor supported regions and `region_id` values, see [Regions](https://neon.com/docs/introduction/regions/).\n","operationId":"createProject","requestBody":{"content":{"application/json":{"examples":{"commonly_specified_attributes":{"summary":"Commonly-specified attributes","value":{"project":{"name":"myproject","pg_version":15,"region_id":"aws-us-east-2"}}},"required_attributes_only":{"summary":"Required attributes only","value":{"project":{"name":"myproject"}}},"with_autoscaling":{"summary":"With autoscaling attributes","value":{"project":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":0.25,"name":"myproject","pg_version":15,"provisioner":"k8s-neonvm","region_id":"aws-us-east-2"}}},"with_branch_attributes":{"summary":"With branch attributes","value":{"project":{"branch":{"database_name":"mydb","name":"mybranch","role_name":"sally"},"name":"myproject","pg_version":15,"region_id":"aws-us-east-2"}}}},"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}},"required":true},"responses":{"201":{"$ref":"#/components/responses/CreatedProject"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create project","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects\");\nrequest.Content = new StringContent(\"{\\\"project\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch\\\":{\\\"annotations\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"database_name\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"role_name\\\":\\\"string\\\"},\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"org_id\\\":\\\"string\\\",\\\"pg_version\\\":18,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}},\\\"store_passwords\\\":true}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"project\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch\":{\"annotations\":{\"github-commit-ref\":\"github-branch-name\"},\"database_name\":\"string\",\"name\":\"string\",\"role_name\":\"string\"},\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"org_id\":\"string\",\"pg_version\":18,\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}},\"store_passwords\":true}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"project\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch\":{\"annotations\":{\"github-commit-ref\":\"github-branch-name\"},\"database_name\":\"string\",\"name\":\"string\",\"role_name\":\"string\"},\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"org_id\":\"string\",\"pg_version\":18,\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}},\"store_passwords\":true}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"project\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch\\\":{\\\"annotations\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"database_name\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"role_name\\\":\\\"string\\\"},\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"org_id\\\":\\\"string\\\",\\\"pg_version\\\":18,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}},\\\"store_passwords\\\":true}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"project\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch\":{\"annotations\":{\"github-commit-ref\":\"github-branch-name\"},\"database_name\":\"string\",\"name\":\"string\",\"role_name\":\"string\"},\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"org_id\":\"string\",\"pg_version\":18,\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}},\"store_passwords\":true}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"project\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch\\\":{\\\"annotations\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"database_name\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"role_name\\\":\\\"string\\\"},\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"org_id\\\":\\\"string\\\",\\\"pg_version\\\":18,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}},\\\"store_passwords\\\":true}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"project\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch\\\":{\\\"annotations\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"database_name\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"role_name\\\":\\\"string\\\"},\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"org_id\\\":\\\"string\\\",\\\"pg_version\\\":18,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}},\\\"store_passwords\\\":true}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"project\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch\":{\"annotations\":{\"github-commit-ref\":\"github-branch-name\"},\"database_name\":\"string\",\"name\":\"string\",\"role_name\":\"string\"},\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"org_id\":\"string\",\"pg_version\":18,\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}},\"store_passwords\":true}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"project\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch\\\":{\\\"annotations\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"database_name\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"role_name\\\":\\\"string\\\"},\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"org_id\\\":\\\"string\\\",\\\"pg_version\\\":18,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}},\\\"store_passwords\\\":true}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/auth/create":{"post":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth` instead. Removal scheduled for March 1, 2026.\nUse this endpoint if the frontend integration flow can't be used.\n","operationId":"createNeonAuthIntegration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateIntegrationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateIntegrationResponse"}}},"description":"Creates Neon Auth integration"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create Neon Auth integration","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/auth/create\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"branch_id\\\":\\\"br-cool-darkness-12345678\\\",\\\"database_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\",\\\"role_name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/auth/create' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"branch_id\":\"br-cool-darkness-12345678\",\"database_name\":\"string\",\"project_id\":\"wispy-forest-12345678\",\"role_name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"branch_id\":\"br-cool-darkness-12345678\",\"database_name\":\"string\",\"project_id\":\"wispy-forest-12345678\",\"role_name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/auth/create\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/auth/create\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"branch_id\\\":\\\"br-cool-darkness-12345678\\\",\\\"database_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\",\\\"role_name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/create', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"branch_id\":\"br-cool-darkness-12345678\",\"database_name\":\"string\",\"project_id\":\"wispy-forest-12345678\",\"role_name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/create', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"branch_id\\\":\\\"br-cool-darkness-12345678\\\",\\\"database_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\",\\\"role_name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/auth/create\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"branch_id\\\":\\\"br-cool-darkness-12345678\\\",\\\"database_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\",\\\"role_name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/auth/create\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"branch_id\":\"br-cool-darkness-12345678\",\"database_name\":\"string\",\"project_id\":\"wispy-forest-12345678\",\"role_name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/auth/create\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"branch_id\\\":\\\"br-cool-darkness-12345678\\\",\\\"database_name\\\":\\\"string\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\",\\\"role_name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/auth/keys":{"post":{"description":"Generates SDK or API Keys for the auth provider. These might be called different things depending\non the auth provider you're using, but are generally used for setting up the frontend and backend SDKs.\n","operationId":"createNeonAuthProviderSDKKeys","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateAuthProviderSDKKeysRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateIntegrationResponse"}}},"description":"Creates Auth Provider SDK keys"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create Auth Provider SDK keys","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/auth/keys\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/auth/keys' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"project_id\":\"wispy-forest-12345678\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"project_id\":\"wispy-forest-12345678\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/auth/keys\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/auth/keys\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/keys', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"project_id\":\"wispy-forest-12345678\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/keys', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/auth/keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/auth/keys\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"project_id\":\"wispy-forest-12345678\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/auth/keys\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"wispy-forest-12345678\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/auth/transfer_ownership":{"post":{"description":"Transfers ownership of your Neon-managed auth project to your own auth provider account.\n","operationId":"transferNeonAuthProviderProject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthTransferAuthProviderProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthTransferAuthProviderProjectResponse"}}},"description":"Transfer initiated. Follow the URL to complete the process in your auth provider's UI."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Transfer Neon-managed auth project to your own account","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/auth/transfer_ownership\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/auth/transfer_ownership' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"project_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"project_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/auth/transfer_ownership\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/auth/transfer_ownership\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/transfer_ownership', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"project_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/transfer_ownership', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/auth/transfer_ownership\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/auth/transfer_ownership\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"project_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/auth/transfer_ownership\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"project_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/auth/user":{"post":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/users` instead. Removal scheduled for March 1, 2026.\nThe user will be created in your neon_auth.users_sync table and automatically propagated to your auth project, whether Neon-managed or provider-owned.\n","operationId":"createNeonAuthNewUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateNewUserRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateNewUserResponse"}}},"description":"Creates new user"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create new auth user","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/auth/user\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/auth/user' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"email\":\"user@example.com\",\"name\":\"string\",\"project_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"email\":\"user@example.com\",\"name\":\"string\",\"project_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/auth/user\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/auth/user\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/user', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"email\":\"user@example.com\",\"name\":\"string\",\"project_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/auth/user', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/auth/user\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/auth/user\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"email\":\"user@example.com\",\"name\":\"string\",\"project_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/auth/user\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\",\\\"project_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/shared":{"get":{"description":"Retrieves a list of projects shared with your Neon account.\nFor more information, see [Manage projects](https://neon.com/docs/manage/projects/).\n","operationId":"listSharedProjects","parameters":[{"description":"Specify the cursor value from the previous response to get the next batch of projects.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Specify a value from 1 to 400 to limit number of projects in the response.","in":"query","name":"limit","schema":{"default":10,"maximum":400,"minimum":1,"type":"integer"}},{"description":"Search query by name or id.","in":"query","name":"search","schema":{"type":"string"}},{"$ref":"#/components/parameters/TimeoutParam"}],"responses":{"200":{"content":{"application/json":{"example":{"projects":[{"active_time":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10800,"cpu_used_sec":0,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","id":"shiny-wind-028834","name":"shiny-wind-028834","owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z"},{"active_time":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10800,"cpu_used_sec":0,"created_at":"2022-11-23T17:52:25Z","creation_source":"console","id":"winter-boat-259881","name":"winter-boat-259881","owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:52:25Z"}]},"schema":{"allOf":[{"$ref":"#/components/schemas/ProjectsResponse"},{"$ref":"#/components/schemas/PaginationResponse"}]}}},"description":"Returned a list of shared projects for the Neon account"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List shared projects","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/shared?cursor=string&limit=10&search=string&timeout=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}":{"delete":{"description":"Deletes the specified project and all its endpoints, branches, databases, and users.\nDeleted projects can be recovered within 7 days using `POST /projects/{project_id}/recover`.\nTo list recoverable projects, use `GET /projects?recoverable=true`.\n","operationId":"deleteProject","responses":{"200":{"content":{"application/json":{"example":{"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":23004200,"created_at":"2022-11-30T18:41:29Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"bold-cloud-468218","name":"bold-cloud-468218","owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-30T18:41:29Z","written_data_bytes":100800}},"schema":{"$ref":"#/components/schemas/ProjectResponse"}}},"description":"Deleted the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete project","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves information about the specified project.\nReturned details include the project settings, compute configuration, history retention, owner information, and current usage metrics.\n","operationId":"getProject","responses":{"200":{"content":{"application/json":{"example":{"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":10,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"shiny-wind-028834","name":"shiny-wind-028834","owner":{"branches_limit":10,"email":"some@email.com","name":"John Smith","subscription_type":"scale"},"owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z","written_data_bytes":100800}},"schema":{"$ref":"#/components/schemas/ProjectResponse"}}},"description":"Returned information about the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve project details","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the specified project.\nConfigurable properties include the project name, default compute settings, history retention period, and IP allowlist.\n","operationId":"updateProject","requestBody":{"content":{"application/json":{"example":{"project":{"name":"myproject"}},"schema":{"$ref":"#/components/schemas/ProjectUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"operations":[],"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":213230,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"shiny-wind-028834","name":"myproject","owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-12-04T02:39:25Z","written_data_bytes":100800}},"schema":{"allOf":[{"$ref":"#/components/schemas/ProjectResponse"},{"$ref":"#/components/schemas/OperationsResponse"}]}}},"description":"Updated the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update project","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string\");\nrequest.Content = new StringContent(\"{\\\"project\\\":{\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}}}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"project\":{\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}}}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"project\":{\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}}}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"project\\\":{\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}}}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"project\":{\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}}}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"project\\\":{\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}}}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"project\\\":{\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}}}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"project\":{\"default_endpoint_settings\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"suspend_timeout_seconds\":0},\"history_retention_seconds\":0,\"name\":\"string\",\"settings\":{\"allowed_ips\":{\"ips\":[\"string\"],\"protected_branches_only\":true},\"audit_log_level\":\"base\",\"block_public_connections\":true,\"block_vpc_connections\":true,\"enable_logical_replication\":true,\"hipaa\":true,\"maintenance_window\":{\"end_time\":\"string\",\"start_time\":\"string\",\"weekdays\":[0]},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true},\"quota\":{\"active_time_seconds\":0,\"compute_time_seconds\":0,\"data_transfer_bytes\":0,\"logical_size_bytes\":0,\"written_data_bytes\":0}}}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"project\\\":{\\\"default_endpoint_settings\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"suspend_timeout_seconds\\\":0},\\\"history_retention_seconds\\\":0,\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"allowed_ips\\\":{\\\"ips\\\":[\\\"string\\\"],\\\"protected_branches_only\\\":true},\\\"audit_log_level\\\":\\\"base\\\",\\\"block_public_connections\\\":true,\\\"block_vpc_connections\\\":true,\\\"enable_logical_replication\\\":true,\\\"hipaa\\\":true,\\\"maintenance_window\\\":{\\\"end_time\\\":\\\"string\\\",\\\"start_time\\\":\\\"string\\\",\\\"weekdays\\\":[0]},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true},\\\"quota\\\":{\\\"active_time_seconds\\\":0,\\\"compute_time_seconds\\\":0,\\\"data_transfer_bytes\\\":0,\\\"logical_size_bytes\\\":0,\\\"written_data_bytes\\\":0}}}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/advisors":{"get":{"description":"Analyzes the database for security and performance issues.\nReturns a list of issues categorized by severity (ERROR, WARN, INFO).\n\nRequires read access to the project and Data API enabled.\n","operationId":"getProjectAdvisorSecurityIssues","parameters":[{"description":"Branch ID to analyze. If not specified, the project's default branch is used.","in":"query","name":"branch_id","required":false,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"Database name to analyze. Required if branch has multiple databases.","in":"query","name":"database_name","required":false,"schema":{"type":"string"}},{"description":"Filter issues by category","in":"query","name":"category","required":false,"schema":{"$ref":"#/components/schemas/AdvisorCategory"}},{"description":"Minimum severity level to include. For example, WARN returns WARN and ERROR issues, excluding INFO.","in":"query","name":"min_severity","required":false,"schema":{"enum":["INFO","WARN","ERROR"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/AdvisorIssue"},"type":"array"}},"required":["issues"],"type":"object"}}},"description":"Successfully retrieved security advisor issues"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Get advisor issues","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/advisors?branch_id=string&category=PERFORMANCE&database_name=string&min_severity=ERROR\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"alpha"},"parameters":[{"description":"Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/auth/domains":{"delete":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Removal scheduled for March 1, 2026.\n","operationId":"deleteNeonAuthDomainFromRedirectURIWhitelist","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthDeleteDomainFromRedirectURIWhitelistRequest"}}},"required":true},"responses":{"200":{"description":"Deleted the domain from the redirect_uri whitelist"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete trusted redirect URI domain","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/auth/domains\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/auth/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/auth/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/domains\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/domains', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/domains', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://console.neon.tech/api/v2/projects/string/auth/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/domains\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"},"get":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Removal scheduled for March 1, 2026.\n","operationId":"listNeonAuthRedirectURIWhitelistDomains","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthRedirectURIWhitelistResponse"}}},"description":"Returned the domains in the redirect_uri whitelist"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List trusted redirect URI domains","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/auth/domains\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/auth/domains'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/domains\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/domains\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/domains', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/domains', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/domains\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/domains\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Removal scheduled for March 1, 2026.\n","operationId":"addNeonAuthDomainToRedirectURIWhitelist","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthAddDomainToRedirectURIWhitelistRequest"}}},"required":true},"responses":{"201":{"description":"Added the domain to the redirect_uri whitelist"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Add trusted redirect URI domain","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/auth/domains\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/auth/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/auth/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/domains\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/domains', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/domains', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/auth/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/domains\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/auth/email_server":{"get":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Removal scheduled for March 1, 2026.\n","operationId":"getNeonAuthEmailServer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailServerConfigResponse"}}},"description":"Returns the email server configuration for the Neon Auth"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve email server configuration","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/auth/email_server\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/auth/email_server'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/email_server\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/email_server\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/email_server', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/email_server', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/email_server\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/email_server\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/email_server\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Removal scheduled for March 1, 2026.\n","operationId":"updateNeonAuthEmailServer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailServerConfig"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailServerConfigResponse"}}},"description":"The OAuth provider has been added to the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update email server configuration","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/auth/email_server\");\nrequest.Content = new StringContent(\"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/auth/email_server' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/auth/email_server\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/email_server\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/email_server', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/email_server', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/email_server\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/auth/email_server\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/email_server\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/auth/integration/{auth_provider}":{"delete":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth` instead. Removal scheduled for March 1, 2026.","operationId":"deleteNeonAuthIntegration","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The authentication provider name","in":"path","name":"auth_provider","required":true,"schema":{"$ref":"#/components/schemas/NeonAuthSupportedAuthProvider"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delete_data":{"default":false,"description":"If true, deletes the `neon_auth` schema from the database","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Delete the integration with the authentication provider"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete integration with auth provider","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth\");\nrequest.Content = new StringContent(\"{\\\"delete_data\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"delete_data\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"delete_data\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"delete_data\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"delete_data\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"delete_data\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"delete_data\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"delete_data\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/integration/better_auth\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"delete_data\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/auth/integrations":{"get":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth` instead. Removal scheduled for March 1, 2026.","operationId":"listNeonAuthIntegrations","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListNeonAuthIntegrationsResponse"}}},"description":"Return management API keys metadata"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List active integrations with auth providers","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/auth/integrations\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/auth/integrations'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/integrations\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/integrations\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/integrations', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/integrations', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/integrations\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/integrations\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/integrations\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/auth/oauth_providers":{"get":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Removal scheduled for March 1, 2026.\n","operationId":"listNeonAuthOauthProviders","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListNeonAuthOauthProvidersResponse"}}},"description":"Returns the OAuth providers for the Neon Auth"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List OAuth providers","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/auth/oauth_providers'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Removal scheduled for March 1, 2026.\n","operationId":"addNeonAuthOauthProvider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthAddOAuthProviderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthOauthProvider"}}},"description":"The OAuth provider has been added to the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Add an OAuth provider","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\");\nrequest.Content = new StringContent(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/auth/oauth_providers' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}":{"delete":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Removal scheduled for March 1, 2026.\n","operationId":"deleteNeonAuthOauthProvider","responses":{"200":{"description":"Deleted the OAuth provider from the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete OAuth provider","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The OAuth provider ID","in":"path","name":"oauth_provider_id","required":true,"schema":{"$ref":"#/components/schemas/NeonAuthOauthProviderId"}}],"patch":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Removal scheduled for March 1, 2026.\n","operationId":"updateNeonAuthOauthProvider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthUpdateOAuthProviderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthOauthProvider"}}},"description":"The OAuth provider has been added to the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update OAuth provider","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\");\nrequest.Content = new StringContent(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/oauth_providers/github\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/auth/users/{auth_user_id}":{"delete":{"deprecated":true,"description":"Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}` instead. Removal scheduled for March 1, 2026.\n","operationId":"deleteNeonAuthUser","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon user ID","in":"path","name":"auth_user_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted the auth user"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete auth user","tags":["Auth (legacy)"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/auth/users/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/auth/users/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/auth/users/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/auth/users/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/users/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/auth/users/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/auth/users/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/auth/users/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/auth/users/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-03-01"}},"/projects/{project_id}/available_preload_libraries":{"get":{"description":"Returns the shared preload libraries available for the specified project's Postgres version.\nShared preload libraries are Postgres extensions that require the `shared_preload_libraries`\nsetting and a compute restart to activate.\nUse this list to determine which libraries can be enabled in the project's\n`settings.preload_libraries` configuration.\n","operationId":"getAvailablePreloadLibraries","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailablePreloadLibraries"}}},"description":"Successfully returned available shared preload libraries"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List available shared preload libraries","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/available_preload_libraries\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/available_preload_libraries'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/available_preload_libraries\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/available_preload_libraries\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/available_preload_libraries', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/available_preload_libraries', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/available_preload_libraries\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/available_preload_libraries\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/available_preload_libraries\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branch_anonymized":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a new branch with anonymized data using PostgreSQL Anonymizer for static masking.\nThis allows developers to work with masked production data.\nOptionally, provide `masking_rules` to set initial masking rules for the branch\nand `start_anonymization` to automatically start anonymization after creation. This\ncombines functionality of updating masking rules and starting anonymization into the\nbranch creation request.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"createProjectBranchAnonymized","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchAnonymizedCreateRequest"}}},"required":true},"responses":{"201":{"$ref":"#/components/responses/CreatedBranch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create anonymized branch","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branch_anonymized\");\nrequest.Content = new StringContent(\"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch_create\\\":{\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]},\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}],\\\"start_anonymization\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branch_anonymized' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch_create\":{\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]},\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}],\"start_anonymization\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch_create\":{\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]},\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}],\"start_anonymization\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branch_anonymized\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branch_anonymized\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch_create\\\":{\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]},\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}],\\\"start_anonymization\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branch_anonymized', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch_create\":{\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]},\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}],\"start_anonymization\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branch_anonymized', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch_create\\\":{\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]},\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}],\\\"start_anonymization\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branch_anonymized\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch_create\\\":{\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]},\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}],\\\"start_anonymization\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branch_anonymized\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch_create\":{\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]},\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}],\"start_anonymization\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branch_anonymized\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch_create\\\":{\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]},\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}],\\\"start_anonymization\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches":{"get":{"description":"Retrieves a list of branches for the specified project.\n\nEach Neon project has a root branch named `main`.\nA `branch_id` value has a `br-` prefix.\nA project may contain child branches that were branched from `main` or from another branch.\nA parent branch is identified by the `parent_id` value, which is the `id` of the parent branch.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n","operationId":"listProjectBranches","parameters":[{"description":"Search by branch `name` or `id`. You can specify partial `name` or `id` values to filter results.","in":"query","name":"search","schema":{"type":"string"}},{"description":"Sort the branches by sort_field. If not provided, branches will be sorted by updated_at descending order","in":"query","name":"sort_by","schema":{"default":"updated_at","enum":["name","created_at","updated_at"],"type":"string"}},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/SortOrderParam"},{"$ref":"#/components/parameters/LimitParam"},{"description":"If true, return recoverable deleted branches too (soft-deleted within the recovery window).\nIf false or not provided, return only active (non-deleted) branches.\n\nThis parameter is part of the Branch Recovery feature, which is in preview and not available to all users.\n","in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":{"annotations":{"br-aged-salad-637688":{"created_at":"2022-11-23T17:42:25Z","object":{"id":"br-aged-salad-637688","type":"console/branch"},"updated_at":"2022-11-23T17:42:26Z","value":{"vercel-commit-ref":"test"}}},"branches":[{"active_time_seconds":100,"compute_time_seconds":100,"cpu_used_sec":100,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"ready","data_transfer_bytes":1000000,"default":true,"id":"br-aged-salad-637688","init_source":"parent-data","logical_size":28,"name":"main","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-23T17:42:26Z","written_data_bytes":100800},{"active_time_seconds":100,"compute_time_seconds":100,"cpu_used_sec":100,"created_at":"2022-11-30T19:09:48Z","creation_source":"console","current_state":"ready","data_transfer_bytes":1000000,"default":true,"id":"br-sweet-breeze-497520","init_source":"parent-data","logical_size":28,"name":"dev2","parent_id":"br-aged-salad-637688","parent_lsn":"0/1DE2850","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-30T19:09:49Z","written_data_bytes":100800},{"active_time_seconds":100,"compute_time_seconds":100,"cpu_used_sec":100,"created_at":"2022-11-30T17:36:57Z","creation_source":"console","current_state":"ready","data_transfer_bytes":1000000,"default":true,"id":"br-raspy-hill-832856","init_source":"parent-data","logical_size":21,"name":"dev1","parent_id":"br-aged-salad-637688","parent_lsn":"0/19623D8","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-30T17:36:57Z","written_data_bytes":100800}],"pagination":{"next":"eyJjcmVhdGV","sort_by":"updated_at","sort_order":"desc"}},"schema":{"allOf":[{"$ref":"#/components/schemas/BranchesResponse"},{"$ref":"#/components/schemas/AnnotationsMapResponse"},{"$ref":"#/components/schemas/CursorPaginationResponse"}]}}},"description":"Returned a list of branches for the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List branches","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches?cursor=string&include_deleted=false&limit=0&search=string&sort_by=updated_at&sort_order=desc\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a branch in the specified project.\nNo request body is required, but you can specify one to create a compute endpoint or select a non-default parent branch.\nBy default, the branch is created from the project's default branch with no compute endpoint, and the branch name is auto-generated.\nTo access the branch, add a `read_write` endpoint.\nEach branch supports one read-write endpoint and multiple read-only endpoints.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n","operationId":"createProjectBranch","requestBody":{"content":{"application/json":{"examples":{"branch_only":{"summary":"Branch only","value":{"branch":{"name":"mybranch","parent_id":"br-aged-salad-637688"}}},"branch_with_endpoint":{"summary":"Branch with endpoint","value":{"branch":{"name":"mybranch","parent_id":"br-aged-salad-637688"},"endpoints":[{"type":"read_write"}]}}},"schema":{"allOf":[{"$ref":"#/components/schemas/BranchCreateRequest"},{"$ref":"#/components/schemas/AnnotationCreateValueRequest"}]}}},"required":false},"responses":{"201":{"$ref":"#/components/responses/CreatedBranch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create branch","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches\");\nrequest.Content = new StringContent(\"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"annotation_value\":{\"github-commit-ref\":\"github-branch-name\"},\"branch\":{\"archived\":true,\"expires_at\":\"2025-06-09T18:02:16Z\",\"init_source\":\"parent-data\",\"name\":\"string\",\"parent_id\":\"string\",\"parent_lsn\":\"string\",\"parent_timestamp\":\"2024-02-26T12:00:00Z\",\"protected\":false},\"endpoints\":[{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"annotation_value\\\":{\\\"github-commit-ref\\\":\\\"github-branch-name\\\"},\\\"branch\\\":{\\\"archived\\\":true,\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"init_source\\\":\\\"parent-data\\\",\\\"name\\\":\\\"string\\\",\\\"parent_id\\\":\\\"string\\\",\\\"parent_lsn\\\":\\\"string\\\",\\\"parent_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\",\\\"protected\\\":false},\\\"endpoints\\\":[{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/count":{"get":{"description":"Retrieves the total number of branches in the specified project.\nSupports an optional `search` parameter to count branches matching a name filter.\n","operationId":"countProjectBranches","parameters":[{"description":"Count branches matching the `name` in search query","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BranchesCountResponse"}]}}},"description":"Returned a count of branches for the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve number of branches","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/count?search=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/count?search=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/count?search=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/count?search=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/count?search=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/count?search=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/count?search=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/count?search=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/count?search=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}":{"delete":{"description":"Deletes the specified branch from a project and places all compute endpoints into an idle state, breaking existing client connections.\n\nThe deletion completes after all operations finish.\nYou cannot delete a project's root or default branch, or a branch that has a child branch.\nA project must have at least one branch.\n\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n","operationId":"deleteProjectBranch","parameters":[],"responses":{"200":{"content":{"application/json":{"example":{"branch":{"active_time_seconds":100,"compute_time_seconds":100,"cpu_used_sec":100,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"ready","data_transfer_bytes":1000000,"default":true,"id":"br-aged-salad-637688","init_source":"parent-data","logical_size":28,"name":"main","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-23T17:42:26Z","written_data_bytes":100800},"operations":[{"action":"suspend_compute","branch_id":"br-sweet-breeze-497520","created_at":"2022-12-01T19:53:05Z","endpoint_id":"ep-soft-violet-752733","failures_count":0,"id":"b6afbc21-2990-4a76-980b-b57d8c2948f2","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-01T19:53:05Z"},{"action":"delete_timeline","branch_id":"br-sweet-breeze-497520","created_at":"2022-12-01T19:53:05Z","failures_count":0,"id":"b6afbc21-2990-4a76-980b-b57d8c2948f2","project_id":"shiny-wind-028834","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-01T19:53:05Z"}]},"schema":{"$ref":"#/components/schemas/BranchOperations"}}},"description":"Deleted the specified branch"},"204":{"description":"Returned if the branch doesn't exist or has already been deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete branch","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves information about the specified branch.\nA `branch_id` value has a `br-` prefix.\n\nEach Neon project is initially created with a root and default branch named `main`.\nA project can contain one or more branches.\nA parent branch is identified by a `parent_id` value, which is the `id` of the parent branch.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n","operationId":"getProjectBranch","responses":{"200":{"content":{"application/json":{"example":{"annotation":{"created_at":"2022-11-23T17:42:25Z","object":{"id":"br-aged-salad-637688","type":"console/branch"},"updated_at":"2022-11-23T17:42:26Z","value":{"vercel-commit-ref":"test"}},"branch":{"active_time_seconds":100,"compute_time_seconds":100,"cpu_used_sec":100,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"ready","data_transfer_bytes":1000000,"default":true,"id":"br-aged-salad-637688","init_source":"parent-data","logical_size":28,"name":"main","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-23T17:42:26Z","written_data_bytes":100800}},"schema":{"allOf":[{"$ref":"#/components/schemas/BranchResponse"},{"$ref":"#/components/schemas/AnnotationResponse"}]}}},"description":"Returned information about the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve branch details","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the specified branch.\nFor more information, see [Manage branches](https://neon.com/docs/manage/branches/).\n","operationId":"updateProjectBranch","requestBody":{"content":{"application/json":{"example":{"branch":{"name":"mybranch"}},"schema":{"$ref":"#/components/schemas/BranchUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"branch":{"active_time_seconds":100,"compute_time_seconds":100,"cpu_used_sec":100,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"ready","data_transfer_bytes":1000000,"default":true,"id":"br-icy-dream-250089","init_source":"parent-data","name":"mybranch","parent_id":"br-aged-salad-637688","parent_lsn":"0/1E19478","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-23T17:42:26Z","written_data_bytes":100800},"operations":[]},"schema":{"$ref":"#/components/schemas/BranchOperations"}}},"description":"Updated the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update branch","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string\");\nrequest.Content = new StringContent(\"{\\\"branch\\\":{\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\",\\\"protected\\\":true}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branch\":{\"expires_at\":\"2025-06-09T18:02:16Z\",\"name\":\"string\",\"protected\":true}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branch\":{\"expires_at\":\"2025-06-09T18:02:16Z\",\"name\":\"string\",\"protected\":true}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"branch\\\":{\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\",\\\"protected\\\":true}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branch\":{\"expires_at\":\"2025-06-09T18:02:16Z\",\"name\":\"string\",\"protected\":true}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branch\\\":{\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\",\\\"protected\\\":true}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branch\\\":{\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\",\\\"protected\\\":true}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branch\":{\"expires_at\":\"2025-06-09T18:02:16Z\",\"name\":\"string\",\"protected\":true}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branch\\\":{\\\"expires_at\\\":\\\"2025-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\",\\\"protected\\\":true}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/ai_gateway":{"get":{"description":"Returns the AI Gateway endpoint host for the specified branch, used to\nrender code-snippet base URLs. A 200 response means the branch is\nregistered and this region serves the AI gateway. A 404 response\nincludes a `reason` field indicating why the gateway is unavailable.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getProjectBranchAiGateway","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchAiGateway"}}},"description":"AI Gateway is enabled for this branch"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchAiGatewayNotEnabled"}}},"description":"AI Gateway is not available for this branch, or the project/branch\nwas not found. The body is always `BranchAiGatewayNotEnabled` — see\n`reason` for the exact cause.\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Get branch AI Gateway endpoint","tags":["AI Gateway"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/ai_gateway\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/anonymize":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Starts the anonymization process for an anonymized branch that is in the initialized, error, or anonymized state.\nThis will apply all defined masking rules to anonymize sensitive data in the branch databases.\nThe branch must be an anonymized branch to start anonymization.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"startAnonymization","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnonymizedBranchStatusResponse"}}},"description":"Anonymization started successfully"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Start anonymization","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/anonymize\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/anonymize'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/anonymize\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/anonymize\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/anonymize', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/anonymize', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/anonymize\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/anonymize\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/anonymize\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/anonymized_status":{"get":{"description":"Retrieves the current status of an anonymized branch, including its state and progress information.\nThis endpoint allows you to monitor the anonymization process from initialization through completion.\nOnly anonymized branches will have status information available.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getAnonymizedBranchStatus","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnonymizedBranchStatusResponse"}}},"description":"Anonymized branch status retrieved successfully"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve anonymized branch status","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/anonymized_status\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/auth":{"delete":{"description":"Disables the Neon Auth integration for the specified branch, removing the connection\nto the authentication provider.\nIf `delete_data` is `true`, also deletes the `neon_auth` schema and all associated tables\nfrom the branch database.\nThe integration can be re-enabled by calling `POST /projects/{project_id}/branches/{branch_id}/auth`.\n","operationId":"disableNeonAuth","requestBody":{"content":{"application/json":{"schema":{"properties":{"delete_data":{"default":false,"description":"If true, deletes the `neon_auth` schema from the database","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Delete the integration with the authentication provider"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Disable Neon Auth for the branch","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\");\nrequest.Content = new StringContent(\"{\\\"delete_data\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/auth' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"delete_data\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"delete_data\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"delete_data\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"delete_data\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"delete_data\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"delete_data\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"delete_data\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"delete_data\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"get":{"description":"Retrieves the Neon Auth integration details for the specified branch,\nincluding the auth provider type and integration status.\n","operationId":"getNeonAuth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthIntegration"}}},"description":"Fetched the details of the Neon Auth integration for the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve Neon Auth details for the branch","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Enables Neon Auth for the specified branch by connecting it to an authentication provider.\nCreating the integration provisions the `neon_auth` schema in the branch database, which stores user identity data synchronized from the provider.\n","operationId":"createNeonAuth","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableNeonAuthIntegrationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateIntegrationResponse"}}},"description":"Enables Neon Auth integration for the branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Enable Neon Auth for the branch","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"database_name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/auth' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"database_name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"database_name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"database_name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"database_name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"database_name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"database_name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"database_name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"database_name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/auth/allow_localhost":{"get":{"description":"Retrieves the localhost allow setting for the specified branch's Neon Auth integration.\nWhen enabled, authentication flows work from `localhost` without adding it to the redirect URI whitelist.\n","operationId":"getNeonAuthAllowLocalhost","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthAllowLocalhostResponse"}}},"description":"The allow localhost configuration"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve localhost allow setting","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the localhost allow setting for the specified branch's Neon Auth integration.\nWhen enabled, authentication flows work from `localhost` without adding it to the redirect URI whitelist.\n","operationId":"updateNeonAuthAllowLocalhost","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNeonAuthAllowLocalhostRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthAllowLocalhostResponse"}}},"description":"Updated the allow localhost configuration"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update localhost allow setting","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\");\nrequest.Content = new StringContent(\"{\\\"allow_localhost\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"allow_localhost\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"allow_localhost\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"allow_localhost\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"allow_localhost\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"allow_localhost\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"allow_localhost\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"allow_localhost\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/allow_localhost\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"allow_localhost\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/config":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/auth/domains":{"delete":{"description":"Removes a domain from the redirect URI whitelist for the specified branch.\nAfter removal, the domain can no longer be used as a redirect target after authentication.\n","operationId":"deleteBranchNeonAuthTrustedDomain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthDeleteDomainFromRedirectURIWhitelistRequest"}}},"required":true},"responses":{"200":{"description":"Deleted the domain from the redirect_uri whitelist"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete domain from redirect_uri whitelist","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"domains\":[{\"domain\":\"https://example.com\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domains\\\":[{\\\"domain\\\":\\\"https://example.com\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"get":{"description":"Lists the trusted domains in the redirect URI whitelist for the specified branch.\nOnly domains in this list are permitted as redirect targets after authentication.\n","operationId":"listBranchNeonAuthTrustedDomains","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthRedirectURIWhitelistResponse"}}},"description":"Returned the domains in the redirect_uri whitelist"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List domains in redirect_uri whitelist","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Adds a domain to the redirect URI whitelist for the specified branch.\nOnly domains in this list are permitted as redirect targets after authentication.\n","operationId":"addBranchNeonAuthTrustedDomain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthAddDomainToRedirectURIWhitelistRequest"}}},"required":true},"responses":{"201":{"description":"Added the domain to the redirect_uri whitelist"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Add domain to redirect_uri whitelist","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\");\nrequest.Content = new StringContent(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auth_provider\":\"better_auth\",\"domain\":\"https://example.com\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/domains\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auth_provider\\\":\\\"better_auth\\\",\\\"domain\\\":\\\"https://example.com\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/auth/email_and_password":{"get":{"description":"Retrieves the email and password authentication configuration for the specified branch's Neon Auth integration,\nincluding whether it is enabled and the email verification method.\n","operationId":"getNeonAuthEmailAndPasswordConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailAndPasswordConfig"}}},"description":"Returns the email and password configuration for Neon Auth"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve email and password configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the email and password authentication configuration for the specified branch's Neon Auth integration.\nOnly the fields provided in the request body are updated.\n","operationId":"updateNeonAuthEmailAndPasswordConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailAndPasswordConfigUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailAndPasswordConfig"}}},"description":"The email and password configuration has been updated"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update email and password configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\");\nrequest.Content = new StringContent(\"{\\\"auto_sign_in_after_verification\\\":true,\\\"disable_sign_up\\\":true,\\\"email_verification_method\\\":\\\"link\\\",\\\"enabled\\\":true,\\\"require_email_verification\\\":true,\\\"send_verification_email_on_sign_in\\\":true,\\\"send_verification_email_on_sign_up\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"auto_sign_in_after_verification\":true,\"disable_sign_up\":true,\"email_verification_method\":\"link\",\"enabled\":true,\"require_email_verification\":true,\"send_verification_email_on_sign_in\":true,\"send_verification_email_on_sign_up\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"auto_sign_in_after_verification\":true,\"disable_sign_up\":true,\"email_verification_method\":\"link\",\"enabled\":true,\"require_email_verification\":true,\"send_verification_email_on_sign_in\":true,\"send_verification_email_on_sign_up\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"auto_sign_in_after_verification\\\":true,\\\"disable_sign_up\\\":true,\\\"email_verification_method\\\":\\\"link\\\",\\\"enabled\\\":true,\\\"require_email_verification\\\":true,\\\"send_verification_email_on_sign_in\\\":true,\\\"send_verification_email_on_sign_up\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"auto_sign_in_after_verification\":true,\"disable_sign_up\":true,\"email_verification_method\":\"link\",\"enabled\":true,\"require_email_verification\":true,\"send_verification_email_on_sign_in\":true,\"send_verification_email_on_sign_up\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"auto_sign_in_after_verification\\\":true,\\\"disable_sign_up\\\":true,\\\"email_verification_method\\\":\\\"link\\\",\\\"enabled\\\":true,\\\"require_email_verification\\\":true,\\\"send_verification_email_on_sign_in\\\":true,\\\"send_verification_email_on_sign_up\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"auto_sign_in_after_verification\\\":true,\\\"disable_sign_up\\\":true,\\\"email_verification_method\\\":\\\"link\\\",\\\"enabled\\\":true,\\\"require_email_verification\\\":true,\\\"send_verification_email_on_sign_in\\\":true,\\\"send_verification_email_on_sign_up\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"auto_sign_in_after_verification\":true,\"disable_sign_up\":true,\"email_verification_method\":\"link\",\"enabled\":true,\"require_email_verification\":true,\"send_verification_email_on_sign_in\":true,\"send_verification_email_on_sign_up\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_and_password\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"auto_sign_in_after_verification\\\":true,\\\"disable_sign_up\\\":true,\\\"email_verification_method\\\":\\\"link\\\",\\\"enabled\\\":true,\\\"require_email_verification\\\":true,\\\"send_verification_email_on_sign_in\\\":true,\\\"send_verification_email_on_sign_up\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/email_provider":{"get":{"description":"Retrieves the email provider configuration for the specified branch's Neon Auth integration,\nincluding the provider type and server settings.\n","operationId":"getNeonAuthEmailProvider","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailServerConfigResponse"}}},"description":"Returns the email provider configuration for the Neon Auth"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve email provider configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the email provider configuration for the specified branch's Neon Auth integration.\nThe email provider handles transactional messages such as verification emails and password reset links.\n\nPartial `standard` updates — omitting fields to keep their stored values — are supported only for\nBetter Auth integrations, which merge omitted fields server-side. Legacy Stack Auth integrations do\nnot merge and require all six `standard` fields (`host`, `port`, `username`, `password`,\n`sender_email`, `sender_name`) on every update; a partial `standard` body is rejected with 400.\n","operationId":"updateNeonAuthEmailProvider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailServerConfig"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthEmailServerConfigResponse"}}},"description":"The email provider configuration has been updated"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update email provider configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\");\nrequest.Content = new StringContent(\"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"sender_email\":\"string\",\"sender_name\":\"string\",\"type\":\"shared\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"type\\\":\\\"shared\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/email_provider/test":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Sends a test email using the branch's already-saved custom SMTP configuration. Only the\n`recipient_email` is provided — the stored SMTP settings and password are used server-side,\nso the caller does not need to re-supply (or be able to read) the password. This avoids the\nGET response's masked password being sent back, which would fail SMTP authentication.\n\nRequires a configured custom SMTP provider on a Better Auth integration. A shared provider,\na missing configuration, or a non-Better-Auth integration is rejected.\n","operationId":"sendNeonAuthEmailProviderTest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNeonAuthEmailProviderTestRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNeonAuthTestEmailResponse"}}},"description":"Response with the result of the test email send"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Send test email using the saved email provider","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test\");\nrequest.Content = new StringContent(\"{\\\"recipient_email\\\":\\\"user@example.com\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"recipient_email\":\"user@example.com\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"recipient_email\":\"user@example.com\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"recipient_email\\\":\\\"user@example.com\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"recipient_email\":\"user@example.com\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"recipient_email\\\":\\\"user@example.com\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"recipient_email\\\":\\\"user@example.com\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"recipient_email\":\"user@example.com\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/email_provider/test\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"recipient_email\\\":\\\"user@example.com\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/auth/oauth_providers":{"get":{"description":"Lists the OAuth providers configured for the specified branch's Neon Auth integration.\n","operationId":"listBranchNeonAuthOauthProviders","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListNeonAuthOauthProvidersResponse"}}},"description":"Returns the OAuth providers for the Neon Auth"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List OAuth providers for the branch","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Adds an OAuth provider configuration to the specified branch's Neon Auth integration.\nAfter adding, users can authenticate using the configured provider.\n","operationId":"addBranchNeonAuthOauthProvider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthAddOAuthProviderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthOauthProvider"}}},"description":"The OAuth provider has been added to the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Add an OAuth provider","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\");\nrequest.Content = new StringContent(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"id\":\"github\",\"microsoft_tenant_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"id\\\":\\\"github\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}":{"delete":{"description":"Deletes an OAuth provider from the specified project.\n","operationId":"deleteBranchNeonAuthOauthProvider","responses":{"200":{"description":"Deleted the OAuth provider from the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete OAuth provider","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The OAuth provider ID","in":"path","name":"oauth_provider_id","required":true,"schema":{"$ref":"#/components/schemas/NeonAuthOauthProviderId"}}],"patch":{"description":"Updates an OAuth provider for the specified project.\n","operationId":"updateBranchNeonAuthOauthProvider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthUpdateOAuthProviderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthOauthProvider"}}},"description":"The OAuth provider has been added to the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update OAuth provider","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\");\nrequest.Content = new StringContent(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"microsoft_tenant_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/oauth_providers/github\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"microsoft_tenant_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/auth/plugins":{"get":{"description":"Returns all plugin configurations for Neon Auth in a single response.\nThis endpoint aggregates organization, email provider, email and password,\nOAuth providers, and localhost settings.\n","operationId":"getNeonAuthPluginConfigs","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthPluginConfigs"}}},"description":"Returns all plugin configurations"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve Neon Auth plugin configurations","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/auth/plugins/magic-link":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the magic link plugin configuration for Neon Auth.\nThe magic link plugin enables passwordless authentication via email magic links.\n","operationId":"updateNeonAuthMagicLinkPlugin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthMagicLinkConfigUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthMagicLinkConfig"}}},"description":"The magic link plugin configuration has been updated"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update magic link plugin configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link\");\nrequest.Content = new StringContent(\"{\\\"disable_sign_up\\\":true,\\\"enabled\\\":true,\\\"expires_in\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"disable_sign_up\":true,\"enabled\":true,\"expires_in\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"disable_sign_up\":true,\"enabled\":true,\"expires_in\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"disable_sign_up\\\":true,\\\"enabled\\\":true,\\\"expires_in\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"disable_sign_up\":true,\"enabled\":true,\"expires_in\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"disable_sign_up\\\":true,\\\"enabled\\\":true,\\\"expires_in\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"disable_sign_up\\\":true,\\\"enabled\\\":true,\\\"expires_in\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"disable_sign_up\":true,\"enabled\":true,\"expires_in\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/magic-link\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"disable_sign_up\\\":true,\\\"enabled\\\":true,\\\"expires_in\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/plugins/organization":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the organization plugin configuration for Neon Auth.\nThe organization plugin enables multi-tenant organization support.\n","operationId":"updateNeonAuthOrganizationPlugin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthOrganizationConfigUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthOrganizationConfig"}}},"description":"The organization plugin configuration has been updated"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update organization plugin configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization\");\nrequest.Content = new StringContent(\"{\\\"creator_role\\\":\\\"admin\\\",\\\"enabled\\\":true,\\\"membership_limit\\\":0,\\\"organization_limit\\\":0,\\\"send_invitation_email\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"creator_role\":\"admin\",\"enabled\":true,\"membership_limit\":0,\"organization_limit\":0,\"send_invitation_email\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"creator_role\":\"admin\",\"enabled\":true,\"membership_limit\":0,\"organization_limit\":0,\"send_invitation_email\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"creator_role\\\":\\\"admin\\\",\\\"enabled\\\":true,\\\"membership_limit\\\":0,\\\"organization_limit\\\":0,\\\"send_invitation_email\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"creator_role\":\"admin\",\"enabled\":true,\"membership_limit\":0,\"organization_limit\":0,\"send_invitation_email\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"creator_role\\\":\\\"admin\\\",\\\"enabled\\\":true,\\\"membership_limit\\\":0,\\\"organization_limit\\\":0,\\\"send_invitation_email\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"creator_role\\\":\\\"admin\\\",\\\"enabled\\\":true,\\\"membership_limit\\\":0,\\\"organization_limit\\\":0,\\\"send_invitation_email\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"creator_role\":\"admin\",\"enabled\":true,\"membership_limit\":0,\"organization_limit\":0,\"send_invitation_email\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/organization\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"creator_role\\\":\\\"admin\\\",\\\"enabled\\\":true,\\\"membership_limit\\\":0,\\\"organization_limit\\\":0,\\\"send_invitation_email\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number":{"get":{"description":"Returns the phone number plugin configuration for Neon Auth.\nThe phone number plugin enables phone-based OTP authentication.\n","operationId":"getNeonAuthPhoneNumberPlugin","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthPhoneNumberConfig"}}},"description":"Returns the phone number plugin configuration"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve phone number plugin configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the phone number plugin configuration for Neon Auth.\nOnly the fields provided in the request body are updated; omitted fields retain their current values.\nThe phone number plugin enables phone-based OTP authentication.\nOTP codes are delivered via the `send.otp` webhook event with `delivery_preference: \"sms\"`.\nA webhook must be configured with the `send.otp` event enabled for SMS delivery to work.\n","operationId":"updateNeonAuthPhoneNumberPlugin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthPhoneNumberConfigUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthPhoneNumberConfig"}}},"description":"The phone number plugin configuration has been updated"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update phone number plugin configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\");\nrequest.Content = new StringContent(\"{\\\"enabled\\\":true,\\\"otp_expires_in\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"enabled\":true,\"otp_expires_in\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"enabled\":true,\"otp_expires_in\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"enabled\\\":true,\\\"otp_expires_in\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"enabled\":true,\"otp_expires_in\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"enabled\\\":true,\\\"otp_expires_in\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"enabled\\\":true,\\\"otp_expires_in\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"enabled\":true,\"otp_expires_in\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/plugins/phone-number\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"enabled\\\":true,\\\"otp_expires_in\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/send_test_email":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"deprecated":true,"description":"Sends a test email using the SMTP server settings supplied in the request body to verify connectivity and credentials.\nThe request body must include the full SMTP server settings\n(`host`, `port`, `username`, `password`, `sender_email`, `sender_name`) and the `recipient_email` address.\n\nDeprecated: to test a branch's already-saved configuration, use `sendNeonAuthEmailProviderTest`, which\nreuses the stored SMTP password server-side so the caller never has to re-supply (or be able to read) it.\nThis endpoint remains available for testing an unsaved full configuration and for non-Better-Auth providers.\n","operationId":"sendNeonAuthTestEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNeonAuthTestEmailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNeonAuthTestEmailResponse"}}},"description":"Response with the result of the test email send"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Send test email","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email\");\nrequest.Content = new StringContent(\"{\\\"host\\\":\\\"string\\\",\\\"password\\\":\\\"\\\",\\\"port\\\":0,\\\"recipient_email\\\":\\\"user@example.com\\\",\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"host\":\"string\",\"password\":\"[REDACTED]\",\"port\":0,\"recipient_email\":\"user@example.com\",\"sender_email\":\"string\",\"sender_name\":\"string\",\"username\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"host\":\"string\",\"password\":\"[REDACTED]\",\"port\":0,\"recipient_email\":\"user@example.com\",\"sender_email\":\"string\",\"sender_name\":\"string\",\"username\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"host\\\":\\\"string\\\",\\\"password\\\":\\\"\\\",\\\"port\\\":0,\\\"recipient_email\\\":\\\"user@example.com\\\",\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"host\":\"string\",\"password\":\"[REDACTED]\",\"port\":0,\"recipient_email\":\"user@example.com\",\"sender_email\":\"string\",\"sender_name\":\"string\",\"username\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"host\\\":\\\"string\\\",\\\"password\\\":\\\"\\\",\\\"port\\\":0,\\\"recipient_email\\\":\\\"user@example.com\\\",\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"host\\\":\\\"string\\\",\\\"password\\\":\\\"\\\",\\\"port\\\":0,\\\"recipient_email\\\":\\\"user@example.com\\\",\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"host\":\"string\",\"password\":\"[REDACTED]\",\"port\":0,\"recipient_email\":\"user@example.com\",\"sender_email\":\"string\",\"sender_name\":\"string\",\"username\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/send_test_email\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"host\\\":\\\"string\\\",\\\"password\\\":\\\"\\\",\\\"port\\\":0,\\\"recipient_email\\\":\\\"user@example.com\\\",\\\"sender_email\\\":\\\"string\\\",\\\"sender_name\\\":\\\"string\\\",\\\"username\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta","x-sunset":"2027-02-28"}},"/projects/{project_id}/branches/{branch_id}/auth/users":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a new user in the Neon Auth user directory for the specified branch.\nThe user is created in the `neon_auth.users_sync` table and can immediately authenticate\nusing the branch's configured auth providers.\n","operationId":"createBranchNeonAuthNewUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBranchNeonAuthNewUserRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthCreateNewUserResponse"}}},"description":"Creates new user"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create new auth user","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users\");\nrequest.Content = new StringContent(\"{\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/users' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"user@example.com\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"email\":\"user@example.com\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/users', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"email\":\"user@example.com\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/users', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"email\":\"user@example.com\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"email\\\":\\\"user@example.com\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}":{"delete":{"description":"Deletes the specified user from the Neon Auth user directory for the specified branch.\nRemoves the user record from `neon_auth.users_sync`. This action cannot be undone.\n","operationId":"deleteBranchNeonAuthUser","responses":{"204":{"description":"Deleted the auth user"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete auth user","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon user ID","in":"path","name":"auth_user_id","required":true,"schema":{"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}/role":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon user ID","in":"path","name":"auth_user_id","required":true,"schema":{"type":"string"}}],"put":{"description":"Updates the role of a user in the Neon Auth user directory for the specified branch.\nThe role controls the user's level of access within the Neon Auth integration.\n","operationId":"updateNeonAuthUserRole","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNeonAuthUserRoleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNeonAuthUserRoleResponse"}}},"description":"Updated the auth user role"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update auth user role","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role\");\nrequest.Content = new StringContent(\"{\\\"roles\\\":[\\\"admin\\\"]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"roles\":[\"admin\"]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"roles\":[\"admin\"]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"roles\\\":[\\\"admin\\\"]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"roles\":[\"admin\"]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"roles\\\":[\\\"admin\\\"]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"roles\\\":[\\\"admin\\\"]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"roles\":[\"admin\"]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/users/string/role\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"roles\\\":[\\\"admin\\\"]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/auth/webhooks":{"get":{"description":"Returns the webhook configuration for the specified branch's Neon Auth integration,\nincluding the endpoint URL and the events that trigger it.\n","operationId":"getNeonAuthWebhookConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthWebhookConfig"}}},"description":"Returns webhook configuration for Neon Auth"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve Neon Auth webhook configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"put":{"description":"Updates the webhook configuration for the specified branch's Neon Auth integration.\nWebhooks notify an external endpoint when auth events occur, such as user creation or sign-in.\n","operationId":"updateNeonAuthWebhookConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthWebhookConfig"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonAuthWebhookConfig"}}},"description":"Returns the updated webhook configuration"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update Neon Auth webhook configuration","tags":["Auth"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\");\nrequest.Content = new StringContent(\"{\\\"enabled\\\":true,\\\"enabled_events\\\":[\\\"organization.invitation.accepted\\\"],\\\"timeout_seconds\\\":5,\\\"webhook_url\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"enabled\":true,\"enabled_events\":[\"organization.invitation.accepted\"],\"timeout_seconds\":5,\"webhook_url\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"enabled\":true,\"enabled_events\":[\"organization.invitation.accepted\"],\"timeout_seconds\":5,\"webhook_url\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"enabled\\\":true,\\\"enabled_events\\\":[\\\"organization.invitation.accepted\\\"],\\\"timeout_seconds\\\":5,\\\"webhook_url\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"enabled\":true,\"enabled_events\":[\"organization.invitation.accepted\"],\"timeout_seconds\":5,\"webhook_url\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"enabled\\\":true,\\\"enabled_events\\\":[\\\"organization.invitation.accepted\\\"],\\\"timeout_seconds\\\":5,\\\"webhook_url\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"enabled\\\":true,\\\"enabled_events\\\":[\\\"organization.invitation.accepted\\\"],\\\"timeout_seconds\\\":5,\\\"webhook_url\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"enabled\":true,\"enabled_events\":[\"organization.invitation.accepted\"],\"timeout_seconds\":5,\"webhook_url\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/auth/webhooks\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"enabled\\\":true,\\\"enabled_events\\\":[\\\"organization.invitation.accepted\\\"],\\\"timeout_seconds\\\":5,\\\"webhook_url\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/backup_schedule":{"get":{"description":"Returns the backup schedule for the specified branch, including the configured snapshot frequencies.\n","operationId":"getSnapshotSchedule","responses":{"200":{"$ref":"#/components/responses/SnapshotSchedule"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve backup schedule","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"put":{"description":"Updates the backup schedule for the specified branch.\nThe schedule defines how often automatic snapshots are created (for example, `daily` or `weekly`). Requires a paid plan.\n","operationId":"setSnapshotSchedule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupSchedule"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/EmptyResponse"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update backup schedule","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\");\nrequest.Content = new StringContent(\"{\\\"schedule\\\":[{\\\"day\\\":0,\\\"frequency\\\":\\\"daily\\\",\\\"hour\\\":0,\\\"month\\\":0,\\\"retention_seconds\\\":3024000}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"schedule\":[{\"day\":0,\"frequency\":\"daily\",\"hour\":0,\"month\":0,\"retention_seconds\":3024000}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"schedule\":[{\"day\":0,\"frequency\":\"daily\",\"hour\":0,\"month\":0,\"retention_seconds\":3024000}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"schedule\\\":[{\\\"day\\\":0,\\\"frequency\\\":\\\"daily\\\",\\\"hour\\\":0,\\\"month\\\":0,\\\"retention_seconds\\\":3024000}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"schedule\":[{\"day\":0,\"frequency\":\"daily\",\"hour\":0,\"month\":0,\"retention_seconds\":3024000}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"schedule\\\":[{\\\"day\\\":0,\\\"frequency\\\":\\\"daily\\\",\\\"hour\\\":0,\\\"month\\\":0,\\\"retention_seconds\\\":3024000}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"schedule\\\":[{\\\"day\\\":0,\\\"frequency\\\":\\\"daily\\\",\\\"hour\\\":0,\\\"month\\\":0,\\\"retention_seconds\\\":3024000}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"schedule\":[{\"day\":0,\"frequency\":\"daily\",\"hour\":0,\"month\":0,\"retention_seconds\":3024000}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/backup_schedule\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"schedule\\\":[{\\\"day\\\":0,\\\"frequency\\\":\\\"daily\\\",\\\"hour\\\":0,\\\"month\\\":0,\\\"retention_seconds\\\":3024000}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/buckets":{"get":{"description":"Lists branchable object storage buckets visible on the specified branch,\nincluding those inherited from ancestor branches.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"listProjectBranchBuckets","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BucketsListResponse"}}},"description":"The list of buckets"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List buckets on the branch","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a new branchable object storage bucket on the specified branch.\nBuckets are managed by the Neon Platform branchable object storage service.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"createProjectBranchBucket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BucketCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BucketResponse"}}},"description":"Bucket created"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"The project has been deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create a bucket on the branch","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\");\nrequest.Content = new StringContent(\"{\\\"access_level\\\":\\\"private\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"access_level\":\"private\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"access_level\":\"private\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"access_level\\\":\\\"private\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"access_level\":\"private\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"access_level\\\":\\\"private\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"access_level\\\":\\\"private\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"access_level\":\"private\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"access_level\\\":\\\"private\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}":{"delete":{"description":"Deletes the named bucket from the specified branch.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"deleteProjectBranchBucket","responses":{"204":{"description":"Bucket deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Bucket not found"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete a bucket on the branch","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The bucket name","in":"path","name":"bucket_name","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects":{"get":{"description":"Lists objects visible in the named bucket on the specified branch,\nincluding those inherited from ancestor branches. Listing is served by\nthe user's session (no customer S3 credentials required).\n\nWhen `delimiter` is supplied (typically `/`), keys are collapsed into\ncommon prefixes (`folders`) so callers can render a folder-style\nbrowser; keys that do not contain the delimiter after `prefix` are\nreturned as `objects`.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"listProjectBranchBucketObjects","parameters":[{"description":"Only list objects whose key starts with this prefix.","in":"query","name":"prefix","required":false,"schema":{"type":"string"}},{"description":"Collapse keys sharing a common prefix up to the first occurrence of\nthis delimiter (typically `/`) into the `folders` array.\n","in":"query","name":"delimiter","required":false,"schema":{"type":"string"}},{"description":"Opaque pagination cursor returned as `next_cursor` by a previous\ncall. Resume listing after the last item of the previous page.\n","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Maximum number of items (objects + folders) to return.","in":"query","name":"limit","required":false,"schema":{"default":1000,"format":"int32","maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BucketObjectsListResponse"}}},"description":"The list of objects and folders"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List objects in a bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects?cursor=string&delimiter=string&limit=1000&prefix=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The bucket name","in":"path","name":"bucket_name","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix":{"delete":{"description":"Soft-deletes every object on the specified branch whose key starts with\n`prefix`, in a single call. Intended to back a \"delete folder\" action in\nan object browser: a `prefix` of `app/avatars/` removes every object\nbeneath that folder. Served by the user's session (no customer S3\ncredentials required).\n\n`prefix` must be non-empty, end with `/`, be at most 1024 bytes, and\ncontain no control characters - a partial-segment prefix cannot\naccidentally delete sibling keys. Returns the number of objects\nsoft-deleted (`deleted`), which may be 0 when no live object matched the\nprefix on this branch.\n\nOnly objects physically present on this branch are tombstoned; objects\ninherited from an ancestor branch via copy-on-write (not materialized on\nthis branch) are out of scope.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"deleteProjectBranchBucketObjectsByPrefix","parameters":[{"description":"The key prefix (folder) to delete. Must be non-empty and end with\n`/`. Every object on this branch whose key starts with this prefix\nis soft-deleted.\n","in":"query","name":"prefix","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BucketObjectsDeletePrefixResponse"}}},"description":"The prefix was soft-deleted. `deleted` is the number of objects\ntombstoned (may be 0 when nothing live matched on this branch).\n"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Bucket not found"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete every object under a key prefix (folder) in a bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects-by-prefix?prefix=string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The bucket name","in":"path","name":"bucket_name","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}":{"delete":{"description":"Deletes the named object from the bucket on the specified branch.\nServed by the user's session (no customer S3 credentials required).\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"deleteProjectBranchBucketObject","responses":{"204":{"description":"Object deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Object not found"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete an object in a bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The bucket name","in":"path","name":"bucket_name","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},{"description":"The object key. Keys may contain `/`; the `/` characters of nested\nkeys must be percent-encoded (`%2F`) in the path segment.\n","in":"path","name":"object_key","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download":{"get":{"description":"Streams the raw bytes of the named object from the bucket on the\nspecified branch, including objects inherited from ancestor branches.\nServed by the user's session (no customer S3 credentials required).\n\nThe body is returned as `application/octet-stream` so a browser treats\nit as a download; the `Content-Length` and `ETag` response headers echo\nthe stored object metadata.\n\nBINARY-STREAM EXCEPTION TO THE BUILD-GENERATED-TYPES RULE (#7029): the\nsuccessful 200 body is the raw object stream, proxied verbatim from the\nplatform object storage admin endpoint. It is modeled as an\n`application/octet-stream` binary body (not a JSON response schema) and\nis streamed without buffering the whole object in memory. Error\nresponses still use the generated `GeneralError` shape.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getProjectBranchBucketObject","responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The object's raw bytes, streamed verbatim. `Content-Length` and\n`ETag` headers are set from the stored object metadata;\n`X-Content-Type-Options` and `Content-Disposition` harden the\nbrowser against the caller-controlled bytes.\n","headers":{"Content-Disposition":{"description":"Always `attachment`. Forces a download rather than inline\nrendering, neutralizing stored-XSS via the object body.\n","schema":{"type":"string"}},"Content-Length":{"description":"The object size in bytes.","schema":{"format":"int64","type":"integer"}},"ETag":{"description":"The object's entity tag (content hash).","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"Always `nosniff`. Stops the browser from MIME-sniffing the\ncaller-controlled bytes into an executable type.\n","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Object not found"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Download an object's bytes","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/download\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The bucket name","in":"path","name":"bucket_name","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},{"description":"The object key. Keys may contain `/`; the `/` characters of nested\nkeys must be percent-encoded (`%2F`) in the path segment.\n","in":"path","name":"object_key","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The bucket name","in":"path","name":"bucket_name","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},{"description":"The object key. Keys may contain `/`; the `/` characters of nested\nkeys must be percent-encoded (`%2F`) in the path segment.\n","in":"path","name":"object_key","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}}],"post":{"description":"Returns a presigned URL that transfers bytes directly to or from the\nobject's bucket on the specified branch, without the caller ever\nhandling S3 credentials. The `operation` field selects the direction:\n\n- `upload` returns a presigned `PUT` URL (the caller `PUT`s the file\n  bytes straight to `url` with the returned `headers`). Authorized with\n  project write access.\n- `download` returns a presigned `GET` URL (the caller `GET`s the\n  bytes straight from `url`). Authorized with project read access.\n\nThe platform mints a short-lived credential and builds the SigV4-signed\nURL against the branch's S3 data-plane host, returning it together with\nthe HTTP method, any headers the caller must echo, and the URL's expiry.\n\nServed by the user's session (no customer S3 credentials required).\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"presignProjectBranchBucketObject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignResponse"}}},"description":"A presigned URL valid until `expires_at`. The caller transfers the\nobject bytes by issuing `method url` with the returned `headers`.\n"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Bucket or branch not found"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Presign an upload or download for an object in a bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign\");\nrequest.Content = new StringContent(\"{\\\"content_type\\\":\\\"string\\\",\\\"expires_in_seconds\\\":900,\\\"operation\\\":\\\"download\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"content_type\":\"string\",\"expires_in_seconds\":900,\"operation\":\"download\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"content_type\":\"string\",\"expires_in_seconds\":900,\"operation\":\"download\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"content_type\\\":\\\"string\\\",\\\"expires_in_seconds\\\":900,\\\"operation\\\":\\\"download\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"content_type\":\"string\",\"expires_in_seconds\":900,\"operation\":\"download\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"content_type\\\":\\\"string\\\",\\\"expires_in_seconds\\\":900,\\\"operation\\\":\\\"download\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"content_type\\\":\\\"string\\\",\\\"expires_in_seconds\\\":900,\\\"operation\\\":\\\"download\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"content_type\":\"string\",\"expires_in_seconds\":900,\"operation\":\"download\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/buckets/string/objects/string/presign\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"content_type\\\":\\\"string\\\",\\\"expires_in_seconds\\\":900,\\\"operation\\\":\\\"download\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/compare_schema":{"get":{"description":"Compares the schema from the specified database with another branch's schema.","operationId":"getProjectBranchSchemaComparison","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID to compare the schema with","in":"query","name":"base_branch_id","required":false,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"Name of the database for which the schema is retrieved","in":"query","name":"db_name","required":true,"schema":{"type":"string"}},{"description":"The Log Sequence Number (LSN) for which the schema is retrieved\n","in":"query","name":"lsn","schema":{"type":"string"}},{"description":"The point in time for which the schema is retrieved\n","in":"query","name":"timestamp","schema":{"example":"2022-11-30T20:09:48Z","format":"date-time","type":"string"}},{"description":"The Log Sequence Number (LSN) for the base branch schema\n","in":"query","name":"base_lsn","schema":{"type":"string"}},{"description":"The point in time for the base branch schema\n","in":"query","name":"base_timestamp","schema":{"example":"2022-11-30T20:09:48Z","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchSchemaCompareResponse"}}},"description":"Difference between the schemas"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Compare database schema","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/compare_schema?base_branch_id=string&base_lsn=string&base_timestamp=2022-11-30T20%3A09%3A48Z&db_name=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/credentials":{"get":{"description":"Returns metadata for customer-issued credentials on the branch.\nSecrets are never included.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"listCredentials","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCredentialsResponse"}}},"description":"The list of credentials"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List credentials on the branch","tags":["Credentials"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/credentials'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Issues a new scoped service credential anchored to the specified\nbranch. The response carries `api_token` and `s3_secret_access_key`\nexactly once — they are not stored server-side.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"createCredential","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialResponse"}}},"description":"Credential issued — secrets shown once."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Issue a scoped credential on the branch","tags":["Credentials"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\",\\\"principal_type\\\":\\\"user\\\",\\\"scopes\\\":[\\\"ai_gateway:invoke\\\"]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/credentials' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\",\"principal_type\":\"user\",\"scopes\":[\"ai_gateway:invoke\"]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\",\"principal_type\":\"user\",\"scopes\":[\"ai_gateway:invoke\"]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\",\\\"principal_type\\\":\\\"user\\\",\\\"scopes\\\":[\\\"ai_gateway:invoke\\\"]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\",\"principal_type\":\"user\",\"scopes\":[\"ai_gateway:invoke\"]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\",\\\"principal_type\\\":\\\"user\\\",\\\"scopes\\\":[\\\"ai_gateway:invoke\\\"]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\",\\\"principal_type\\\":\\\"user\\\",\\\"scopes\\\":[\\\"ai_gateway:invoke\\\"]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\",\"principal_type\":\"user\",\"scopes\":[\"ai_gateway:invoke\"]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\",\\\"principal_type\\\":\\\"user\\\",\\\"scopes\\\":[\\\"ai_gateway:invoke\\\"]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/credentials/{token_id}":{"delete":{"description":"Soft-deletes the credential.  Idempotent.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"revokeCredential","responses":{"204":{"description":"Credential revoked"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Credential not found"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Revoke a credential","tags":["Credentials"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The opaque credential id (e.g. nak_live_<32hex>).","in":"path","name":"token_id","required":true,"schema":{"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/credentials/{token_id}/reveal":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The opaque credential id (e.g. nak_live_<32hex>).","in":"path","name":"token_id","required":true,"schema":{"type":"string"}}],"post":{"description":"Returns the live `api_token` and `s3_secret_access_key` of an existing\ncredential, so a credential whose issuance response was lost can be\nrecovered without minting a new one.\n\nThis is a POST with an explicit `/reveal` verb so the secrets never ride\na GET, where they would land in access logs, browser history and proxy\ncaches. Revoked and expired credentials return 404, as does a\n`token_id` that does not belong to this project.\n\nA credential issued before secret retrieval was supported has no\nrecoverable secret and returns 409 — rotate it to obtain one.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"revealCredential","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialSecret"}}},"description":"The credential's live secrets."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Credential not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"The credential exists but has no recoverable secret because it was\nissued before secret retrieval was supported. Rotate the credential\nto obtain a recoverable secret.\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Reveal a credential's secrets","tags":["Credentials"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/reveal\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/credentials/{token_id}/rotate":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The opaque credential id (e.g. nak_live_<32hex>).","in":"path","name":"token_id","required":true,"schema":{"type":"string"}}],"post":{"description":"Replaces the secret material on an existing scoped credential in\nplace. `token_id` is preserved — it is the `AWS_ACCESS_KEY_ID` for\nS3-compatible clients, so the access key id your application already\nholds keeps working and only the secret changes. This is the analog of\nresetting a Postgres password, not of issuing a second credential.\n\nThe response carries the new `api_token` and `s3_secret_access_key`\nexactly once. Rotation is **not** idempotent: retrying after an\nambiguous timeout mints another secret and supersedes the previous\nreplacement, so a retry does not recover a lost response — it only\ninvalidates the secret you did not receive. If you lose the response,\nissue a replacement credential and revoke this one.\n\nThe old secret stops authenticating as soon as the rotation commits.\nWhere a region caches credentials on its data-plane verifiers, a\nreplica may briefly keep accepting the old secret — and rejecting the\nnew one — until its cache entry expires; where it does not, the\ncutover is immediate apart from requests already in flight. Either way\nthe changeover is not atomic across replicas, so retry an unexpected\nauthentication failure right after rotating rather than treating the\nnew secret as bad. `last_used_at` continues to report the logical\ncredential's prior usage and says nothing about whether the new secret\nhas been used yet.\n\nOnly a live, unexpired, unrevoked customer-managed (`user`) credential\non a live project and live branch is eligible. Anything else —\nincluding the platform-internal `function` and `system` credentials —\nis reported as not found, indistinguishable from an unknown\n`token_id`.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"rotateCredential","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateCredentialResponse"}}},"description":"Credential rotated — new secrets shown once."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Rotate a credential's secrets","tags":["Credentials"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/credentials/string/rotate\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/custom-domains":{"get":{"description":"Lists all custom domains registered on the branch, across every target\nentity.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"listProjectBranchCustomDomains","parameters":[{"$ref":"#/components/parameters/CursorParam"},{"description":"Specify a value from 1 to 1000 to limit number of domains in the response","in":"query","name":"limit","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CustomDomainsListResponse"},{"$ref":"#/components/schemas/CursorPaginationResponse"}]}}},"description":"The list of custom domains"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List the custom domains on a branch","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains?cursor=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Registers a customer-owned domain (for example `dashboard.acme.com`) on the\nbranch and points it at a target entity, chosen by `entity_type` +\n`entity_id`. In v1 only `entity_type: function` is supported (an\nunsupported type is rejected with `400`), where `entity_id` is the function\nslug and the function must already exist on the branch (else `404`).\n\nThe response includes the `cname_target` the customer must point their\ndomain at with a CNAME record; the domain goes live only once that DNS\nresolves and a certificate is issued on the first request. A domain already\nregistered to another resource is rejected with `409` and no detail about\nthe owner. Re-registering the same domain for the same entity is idempotent.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"registerProjectBranchCustomDomain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainRegisterRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}},"description":"The registered custom domain"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Register a custom domain on a branch","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains\");\nrequest.Content = new StringContent(\"{\\\"domain\\\":\\\"string\\\",\\\"entity_id\\\":\\\"string\\\",\\\"entity_type\\\":\\\"function\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"domain\":\"string\",\"entity_id\":\"string\",\"entity_type\":\"function\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"domain\":\"string\",\"entity_id\":\"string\",\"entity_type\":\"function\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"domain\\\":\\\"string\\\",\\\"entity_id\\\":\\\"string\\\",\\\"entity_type\\\":\\\"function\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"domain\":\"string\",\"entity_id\":\"string\",\"entity_type\":\"function\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"domain\\\":\\\"string\\\",\\\"entity_id\\\":\\\"string\\\",\\\"entity_type\\\":\\\"function\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"domain\\\":\\\"string\\\",\\\"entity_id\\\":\\\"string\\\",\\\"entity_type\\\":\\\"function\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"domain\":\"string\",\"entity_id\":\"string\",\"entity_type\":\"function\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"domain\\\":\\\"string\\\",\\\"entity_id\\\":\\\"string\\\",\\\"entity_type\\\":\\\"function\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/custom-domains/{domain}":{"delete":{"description":"Removes a custom domain registered on the branch and stops routing it.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"deleteProjectBranchCustomDomain","responses":{"204":{"description":"Custom domain deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete a custom domain from a branch","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/custom-domains/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The registered custom domain (case-insensitive).","in":"path","name":"domain","required":true,"schema":{"maxLength":254,"minLength":3,"pattern":"^[A-Za-z0-9.-]+$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/data-api/{database_name}":{"delete":{"description":"Deletes the Neon Data API for the specified branch.\nExisting connections using the Data API endpoint will fail after deletion.\n","operationId":"deleteProjectBranchDataAPI","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"Deleted the Neon Data API for the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete Neon Data API","tags":["DataAPI"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves the Neon Data API configuration for the specified branch,\nincluding endpoint URL, enabled state, and database settings.\n","operationId":"getProjectBranchDataAPI","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataAPIReponse"}}},"description":"Returns the Neon Data API for the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve Neon Data API configuration","tags":["DataAPI"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The database name","in":"path","name":"database_name","required":true,"schema":{"type":"string"}}],"patch":{"description":"Updates the Neon Data API configuration for the specified branch.\nYou can optionally provide settings to update the Data API configuration.\nThe schema cache is always refreshed as part of this operation.\n","operationId":"updateProjectBranchDataAPI","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataAPIUpdateRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"Updated the Neon Data API configuration and refreshed the schema cache"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update Neon Data API","tags":["DataAPI"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\nrequest.Content = new StringContent(\"{\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new instance of Neon Data API in the specified branch.\nThe Data API exposes a REST interface over the branch database. The `database_name` path parameter determines which database the API serves.\n","operationId":"createProjectBranchDataAPI","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataAPICreateRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataAPICreateResponse"}}},"description":"Creates a new app"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create Neon Data API","tags":["DataAPI"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\nrequest.Content = new StringContent(\"{\\\"add_default_grants\\\":false,\\\"auth_provider\\\":\\\"external\\\",\\\"jwks_url\\\":\\\"https://example.com\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true},\\\"skip_auth_schema\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"add_default_grants\":false,\"auth_provider\":\"external\",\"jwks_url\":\"https://example.com\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true},\"skip_auth_schema\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"add_default_grants\":false,\"auth_provider\":\"external\",\"jwks_url\":\"https://example.com\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true},\"skip_auth_schema\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"add_default_grants\\\":false,\\\"auth_provider\\\":\\\"external\\\",\\\"jwks_url\\\":\\\"https://example.com\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true},\\\"skip_auth_schema\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"add_default_grants\":false,\"auth_provider\":\"external\",\"jwks_url\":\"https://example.com\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true},\"skip_auth_schema\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"add_default_grants\\\":false,\\\"auth_provider\\\":\\\"external\\\",\\\"jwks_url\\\":\\\"https://example.com\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true},\\\"skip_auth_schema\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"add_default_grants\\\":false,\\\"auth_provider\\\":\\\"external\\\",\\\"jwks_url\\\":\\\"https://example.com\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true},\\\"skip_auth_schema\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"add_default_grants\":false,\"auth_provider\":\"external\",\"jwks_url\":\"https://example.com\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"settings\":{\"db_aggregates_enabled\":true,\"db_anon_role\":\"anonymous\",\"db_extra_search_path\":\"string\",\"db_max_rows\":0,\"db_schemas\":[\"string\"],\"jwt_cache_max_lifetime\":0,\"jwt_role_claim_key\":\".role\",\"openapi_mode\":\"disabled\",\"server_cors_allowed_origins\":\"string\",\"server_timing_enabled\":true},\"skip_auth_schema\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/data-api/string\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"add_default_grants\\\":false,\\\"auth_provider\\\":\\\"external\\\",\\\"jwks_url\\\":\\\"https://example.com\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"settings\\\":{\\\"db_aggregates_enabled\\\":true,\\\"db_anon_role\\\":\\\"anonymous\\\",\\\"db_extra_search_path\\\":\\\"string\\\",\\\"db_max_rows\\\":0,\\\"db_schemas\\\":[\\\"string\\\"],\\\"jwt_cache_max_lifetime\\\":0,\\\"jwt_role_claim_key\\\":\\\".role\\\",\\\"openapi_mode\\\":\\\"disabled\\\",\\\"server_cors_allowed_origins\\\":\\\"string\\\",\\\"server_timing_enabled\\\":true},\\\"skip_auth_schema\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/databases":{"get":{"description":"Retrieves a list of databases for the specified branch.\nA branch can have multiple databases.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n","operationId":"listProjectBranchDatabases","responses":{"200":{"content":{"application/json":{"example":{"databases":[{"branch_id":"br-aged-salad-637688","created_at":"2022-11-30T18:25:15Z","id":834686,"name":"main","owner_name":"casey","updated_at":"2022-11-30T18:25:15Z"},{"branch_id":"br-aged-salad-637688","created_at":"2022-10-30T17:14:13Z","id":834686,"name":"mydb","owner_name":"casey","updated_at":"2022-10-30T17:14:13Z"}]},"schema":{"$ref":"#/components/schemas/DatabasesResponse"}}},"description":"Returned a list of databases of the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List databases","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/databases\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/databases'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a database in the specified branch.\nA branch can have multiple databases.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n","operationId":"createProjectBranchDatabase","requestBody":{"content":{"application/json":{"example":{"database":{"name":"mydb","owner_name":"casey"}},"schema":{"$ref":"#/components/schemas/DatabaseCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"database":{"branch_id":"br-aged-salad-637688","created_at":"2022-12-04T00:15:04Z","id":876692,"name":"mydb","owner_name":"casey","updated_at":"2022-12-04T00:15:04Z"},"operations":[{"action":"apply_config","branch_id":"br-aged-salad-637688","created_at":"2022-12-04T00:15:04Z","endpoint_id":"ep-little-smoke-851426","failures_count":0,"id":"39426015-db00-40fa-85c5-1c7072df46d0","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-04T00:15:04Z"},{"action":"suspend_compute","branch_id":"br-aged-salad-637688","created_at":"2022-12-04T00:15:04Z","endpoint_id":"ep-little-smoke-851426","failures_count":0,"id":"b7483d4e-33da-4d40-b319-ac858d4d3e69","project_id":"shiny-wind-028834","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-04T00:15:04Z"}]},"schema":{"$ref":"#/components/schemas/DatabaseOperations"}}},"description":"Created a database in the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create database","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/databases\");\nrequest.Content = new StringContent(\"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/databases' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/databases\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/databases/{database_name}":{"delete":{"description":"Deletes the specified database from the branch.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n","operationId":"deleteProjectBranchDatabase","responses":{"200":{"content":{"application/json":{"example":{"database":{"branch_id":"br-raspy-hill-832856","created_at":"2022-12-01T19:41:46Z","id":851537,"name":"mydb","owner_name":"casey","updated_at":"2022-12-01T19:41:46Z"},"operations":[{"action":"apply_config","branch_id":"br-raspy-hill-832856","created_at":"2022-12-01T19:51:41Z","endpoint_id":"ep-steep-bush-777093","failures_count":0,"id":"9ef1c2ed-dce4-43aa-bae8-78aea636bf8a","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-01T19:51:41Z"},{"action":"suspend_compute","branch_id":"br-raspy-hill-832856","created_at":"2022-12-01T19:51:41Z","endpoint_id":"ep-steep-bush-777093","failures_count":0,"id":"42dafb46-f861-497b-ae89-f2bec54f4966","project_id":"shiny-wind-028834","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-01T19:51:41Z"}]},"schema":{"$ref":"#/components/schemas/DatabaseOperations"}}},"description":"Deleted the specified database"},"204":{"description":"Returned if the database doesn't exist or has already been deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete database","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/databases/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves information about the specified database.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n","operationId":"getProjectBranchDatabase","responses":{"200":{"content":{"application/json":{"example":{"database":{"branch_id":"br-aged-salad-637688","created_at":"2022-11-30T18:25:15Z","id":834686,"name":"main","owner_name":"casey","updated_at":"2022-11-30T18:25:15Z"}},"schema":{"$ref":"#/components/schemas/DatabaseResponse"}}},"description":"Returned the database details"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve database details","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/databases/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The database name","in":"path","name":"database_name","required":true,"schema":{"type":"string"}}],"patch":{"description":"Updates the specified database in the branch.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n","operationId":"updateProjectBranchDatabase","requestBody":{"content":{"application/json":{"example":{"database":{"name":"mydb","owner_name":"sally"}},"schema":{"$ref":"#/components/schemas/DatabaseUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"database":{"branch_id":"br-aged-salad-637688","created_at":"2022-12-04T00:15:04Z","id":876692,"name":"mydb","owner_name":"sally","updated_at":"2022-12-04T00:15:04Z"},"operations":[{"action":"apply_config","branch_id":"br-aged-salad-637688","created_at":"2022-12-04T00:21:01Z","endpoint_id":"ep-little-smoke-851426","failures_count":0,"id":"9ef1c2ed-dce4-43aa-bae8-78aea636bf8a","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-04T00:21:01Z"},{"action":"suspend_compute","branch_id":"br-aged-salad-637688","created_at":"2022-12-04T00:21:01Z","endpoint_id":"ep-little-smoke-851426","failures_count":0,"id":"42dafb46-f861-497b-ae89-f2bec54f4966","project_id":"shiny-wind-028834","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-04T00:21:01Z"}]},"schema":{"$ref":"#/components/schemas/DatabaseOperations"}}},"description":"Updated the database"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update database","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\");\nrequest.Content = new StringContent(\"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/databases/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/databases/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"database\":{\"name\":\"string\",\"owner_name\":\"string\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/databases/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"database\\\":{\\\"name\\\":\\\"string\\\",\\\"owner_name\\\":\\\"string\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/endpoints":{"get":{"description":"Retrieves a list of compute endpoints for the specified branch.\nNeon permits only one read-write compute endpoint per branch.\nA branch can have multiple read-only compute endpoints.\n","operationId":"listProjectBranchEndpoints","responses":{"200":{"content":{"application/json":{"example":{"endpoints":[{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-aged-salad-637688","created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-little-smoke-851426.us-east-2.aws.neon.tech","id":"ep-little-smoke-851426","last_active":"2022-11-23T17:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-11-30T18:25:21Z"}]},"schema":{"$ref":"#/components/schemas/EndpointsResponse"}}},"description":"Returned a list of endpoints for the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List branch endpoints","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/endpoints\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/endpoints'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/endpoints\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/endpoints\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/endpoints', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/endpoints', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/endpoints\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/endpoints\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/endpoints\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/finalize_restore":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Finalize the restore operation for a branch created from a snapshot.\nThis operation updates the branch so it functions as the original branch it replaced.\nThis includes:\n  - Reassigning any computes from the original branch to the restored branch (this will restart the computes)\n  - Renaming the restored branch to the original branch's name\n  - Renaming the original branch so it no longer uses the original name\n\nThis operation only applies to branches created using the `restoreSnapshot` endpoint with `finalize_restore: false`.\n","operationId":"finalizeRestoreBranch","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Name for the replaced branch. If omitted, a unique name is generated.","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsResponse"}}},"description":"OK"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Finalize branch restore from snapshot","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/finalize_restore\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/functions":{"get":{"description":"Lists functions on the specified branch.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"listProjectBranchFunctions","parameters":[{"$ref":"#/components/parameters/CursorParam"},{"description":"Specify a value from 1 to 1000 to limit number of functions in the response","in":"query","name":"limit","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/NeonFunctionsListResponse"},{"$ref":"#/components/schemas/CursorPaginationResponse"}]}}},"description":"The list of functions"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List functions on the branch","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions?cursor=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/functions/{slug}":{"delete":{"description":"Deletes the function identified by its slug.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"deleteProjectBranchFunction","responses":{"204":{"description":"Function deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete a function on the branch","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/functions/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"get":{"description":"Returns the function identified by its slug.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getProjectBranchFunction","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonFunctionResponse"}}},"description":"The function details"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Get function details","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/functions/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The function slug","in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9]{1,20}$","type":"string"}}],"patch":{"description":"Updates the function's mutable metadata — currently only the display\n`name`. A string sets the display name; `null` clears it, after which\nthe function's `name` falls back to its slug. Leading and trailing\nwhitespace is trimmed; a whitespace-only name is rejected. Acts only\non a function owned by the branch: a slug that is only inherited from\nan ancestor branch returns 404 — rename it on the branch that owns\nit. Like every other change on a branch, a rename is isolated per\nbranch: a branch forked before the rename keeps the name it had at\nfork time.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"updateProjectBranchFunction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonFunctionUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonFunctionResponse"}}},"description":"The updated function"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update a function","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/functions/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/functions/{slug}/deployments":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The function slug","in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9]{1,20}$","type":"string"}}],"post":{"description":"Creates a deployment for the function. Supply any subset of zip,\nenvironment, and runtime; omitted fields inherit the\nfunction's latest version. At least one field must be supplied. The\nfirst deployment of a function must include zip. The newest deployment\nbecomes active.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"createProjectBranchFunctionDeployment","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FunctionDeployRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeonFunctionDeploymentResponse"}}},"description":"The created deployment"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Deploy code to a function","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments\");\nrequest.Content = new StringContent(\"{\\\"environment\\\":\\\"string\\\",\\\"runtime\\\":\\\"nodejs24\\\",\\\"zip\\\":\\\"binary\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"environment\":\"string\",\"runtime\":\"nodejs24\",\"zip\":\"binary\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"environment\":\"string\",\"runtime\":\"nodejs24\",\"zip\":\"binary\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"environment\\\":\\\"string\\\",\\\"runtime\\\":\\\"nodejs24\\\",\\\"zip\\\":\\\"binary\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"environment\":\"string\",\"runtime\":\"nodejs24\",\"zip\":\"binary\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"environment\\\":\\\"string\\\",\\\"runtime\\\":\\\"nodejs24\\\",\\\"zip\\\":\\\"binary\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"environment\\\":\\\"string\\\",\\\"runtime\\\":\\\"nodejs24\\\",\\\"zip\\\":\\\"binary\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"environment\":\"string\",\"runtime\":\"nodejs24\",\"zip\":\"binary\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/functions/string/deployments\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"environment\\\":\\\"string\\\",\\\"runtime\\\":\\\"nodejs24\\\",\\\"zip\\\":\\\"binary\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/logs/fields":{"get":{"description":"Lists the low-cardinality log fields observed on this branch whose\ndistinct values can be discovered with the log field-values endpoint.\n\nThe set is computed per branch and grows as new fields are observed, so\ntreat it as data rather than a fixed list: discover a field here, then\npass it as `field_name` to the field-values endpoint.\n\n**Note**: This endpoint is currently in Private Beta.\n","operationId":"listProjectBranchLogFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogFieldsResponse"}}},"description":"Log fields available for value discovery on this branch"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsNotAvailable"}}},"description":"Logs are not available for this branch, or the project/branch was\nnot found. The body is always `ProjectBranchLogsNotAvailable` — see\n`reason` for the exact cause.\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List branch log fields","tags":["Logs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/logs/fields/{field_name}/values":{"get":{"description":"Lists the distinct values observed for a low-cardinality log field in\nthe requested time range. Call the log fields endpoint first to learn\nwhich `field_name` values this branch supports; a field that branch has\nnever emitted is rejected with `unknown_field`.\n\nGive the window either as `since` or as an explicit `start_time`;\nsupplying both is rejected. If neither is given, the previous six hours\nare used. The maximum supported time range is seven days.\n\n**Note**: This endpoint is currently in Private Beta.\n","operationId":"listProjectBranchLogFieldValues","parameters":[{"description":"Length of the lookup window, ending at `end_time` or at the current\ntime when `end_time` is omitted. Mutually exclusive with\n`start_time`. Defaults to six hours.\n","in":"query","name":"since","schema":{"$ref":"#/components/schemas/ProjectBranchLogDuration"}},{"description":"Inclusive beginning of the lookup window. Mutually exclusive with\n`since`.\n","in":"query","name":"start_time","schema":{"format":"date-time","type":"string"}},{"description":"Exclusive end of the lookup window. Defaults to the current time.","in":"query","name":"end_time","schema":{"format":"date-time","type":"string"}},{"description":"Only consider records emitted by this Neon service.","in":"query","name":"source","schema":{"$ref":"#/components/schemas/ProjectBranchLogSource"}},{"description":"Maximum number of distinct values to return. The response sets\n`is_truncated` when this bound, or the server's own scan cap, cut the\nlist short.\n","in":"query","name":"limit","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogFieldValuesResponse"}}},"description":"Distinct values for the requested log field"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsInvalidQuery"}}},"description":"The lookup could not be served as written. The body is always\n`ProjectBranchLogsInvalidQuery` — see `reason` for the exact cause.\n"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsNotAvailable"}}},"description":"Logs are not available for this branch, or the project/branch was\nnot found. The body is always `ProjectBranchLogsNotAvailable` — see\n`reason` for the exact cause.\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List branch log field values","tags":["Logs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/fields/string/values?end_time=2026-06-09T00%3A00%3A00Z&limit=100&since=1h&source=function&start_time=2026-06-09T00%3A00%3A00Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The log field whose distinct values should be returned. Must be one of\nthe names returned by the log fields endpoint for this branch.\n","in":"path","name":"field_name","required":true,"schema":{"minLength":1,"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/logs/query":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Returns logs emitted by services running on the specified branch,\nordered by timestamp according to `sort_order`.\n\nAll supplied filters are combined with `AND`: a record is returned only\nwhen it matches every filter. `minimum_severity` and `severity_text` are\nindependent filters, so setting both requires a record to clear the\nseverity floor *and* match the exact severity text.\n\nSupply `logql` instead of the structured filters to run a raw LogQL\nexpression. Combining it with any structured filter is rejected rather\nthan silently ignored; `limit`, `sort_order`, and the time window still\napply, because those bound the query rather than form part of the\nexpression.\n\nGive the window either as `since` — a duration ending at `end_time`, or\nat the current time when `end_time` is omitted — or as an explicit\n`start_time`. Supplying both is rejected.\n\nA single response holds at most 1,000 records. When `is_truncated` is\n`true`, pass the returned `next_cursor` back as `cursor` to fetch the\nnext page, repeating the time range and every filter unchanged.\n\nIf no time range is supplied, the query covers the previous hour. The\nmaximum supported time range is seven days. `end_time` is exclusive.\n\n**Note**: This endpoint is currently in Private Beta.\n","operationId":"queryProjectBranchLogs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsQueryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsQueryResponse"}}},"description":"Logs matching the supplied filters"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsInvalidQuery"}}},"description":"The query could not be served as written. The body is always\n`ProjectBranchLogsInvalidQuery` — see `reason` for the exact cause.\n"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBranchLogsNotAvailable"}}},"description":"Logs are not available for this branch, or the project/branch was\nnot found. The body is always `ProjectBranchLogsNotAvailable` — see\n`reason` for the exact cause.\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Query branch logs","tags":["Logs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/query\");\nrequest.Content = new StringContent(\"{\\\"body_contains\\\":\\\"string\\\",\\\"cursor\\\":\\\"string\\\",\\\"end_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"limit\\\":100,\\\"logql\\\":\\\"{entity_type=\\\\\\\"function\\\\\\\"} |~ \\\\\\\"(?i)timeout\\\\\\\"\\\",\\\"minimum_severity\\\":\\\"debug\\\",\\\"scope_name\\\":\\\"string\\\",\\\"service_name\\\":\\\"string\\\",\\\"severity_text\\\":\\\"string\\\",\\\"since\\\":\\\"1h\\\",\\\"sort_order\\\":\\\"desc\\\",\\\"source\\\":\\\"function\\\",\\\"start_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"trace_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/logs/query' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body_contains\":\"string\",\"cursor\":\"string\",\"end_time\":\"2026-06-09T00:00:00Z\",\"limit\":100,\"logql\":\"{entity_type=\\\"function\\\"} |~ \\\"(?i)timeout\\\"\",\"minimum_severity\":\"debug\",\"scope_name\":\"string\",\"service_name\":\"string\",\"severity_text\":\"string\",\"since\":\"1h\",\"sort_order\":\"desc\",\"source\":\"function\",\"start_time\":\"2026-06-09T00:00:00Z\",\"trace_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"body_contains\":\"string\",\"cursor\":\"string\",\"end_time\":\"2026-06-09T00:00:00Z\",\"limit\":100,\"logql\":\"{entity_type=\\\"function\\\"} |~ \\\"(?i)timeout\\\"\",\"minimum_severity\":\"debug\",\"scope_name\":\"string\",\"service_name\":\"string\",\"severity_text\":\"string\",\"since\":\"1h\",\"sort_order\":\"desc\",\"source\":\"function\",\"start_time\":\"2026-06-09T00:00:00Z\",\"trace_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/query\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/query\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"body_contains\\\":\\\"string\\\",\\\"cursor\\\":\\\"string\\\",\\\"end_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"limit\\\":100,\\\"logql\\\":\\\"{entity_type=\\\\\\\"function\\\\\\\"} |~ \\\\\\\"(?i)timeout\\\\\\\"\\\",\\\"minimum_severity\\\":\\\"debug\\\",\\\"scope_name\\\":\\\"string\\\",\\\"service_name\\\":\\\"string\\\",\\\"severity_text\\\":\\\"string\\\",\\\"since\\\":\\\"1h\\\",\\\"sort_order\\\":\\\"desc\\\",\\\"source\\\":\\\"function\\\",\\\"start_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"trace_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/logs/query', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"body_contains\":\"string\",\"cursor\":\"string\",\"end_time\":\"2026-06-09T00:00:00Z\",\"limit\":100,\"logql\":\"{entity_type=\\\"function\\\"} |~ \\\"(?i)timeout\\\"\",\"minimum_severity\":\"debug\",\"scope_name\":\"string\",\"service_name\":\"string\",\"severity_text\":\"string\",\"since\":\"1h\",\"sort_order\":\"desc\",\"source\":\"function\",\"start_time\":\"2026-06-09T00:00:00Z\",\"trace_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/logs/query', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"body_contains\\\":\\\"string\\\",\\\"cursor\\\":\\\"string\\\",\\\"end_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"limit\\\":100,\\\"logql\\\":\\\"{entity_type=\\\\\\\"function\\\\\\\"} |~ \\\\\\\"(?i)timeout\\\\\\\"\\\",\\\"minimum_severity\\\":\\\"debug\\\",\\\"scope_name\\\":\\\"string\\\",\\\"service_name\\\":\\\"string\\\",\\\"severity_text\\\":\\\"string\\\",\\\"since\\\":\\\"1h\\\",\\\"sort_order\\\":\\\"desc\\\",\\\"source\\\":\\\"function\\\",\\\"start_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"trace_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/query\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"body_contains\\\":\\\"string\\\",\\\"cursor\\\":\\\"string\\\",\\\"end_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"limit\\\":100,\\\"logql\\\":\\\"{entity_type=\\\\\\\"function\\\\\\\"} |~ \\\\\\\"(?i)timeout\\\\\\\"\\\",\\\"minimum_severity\\\":\\\"debug\\\",\\\"scope_name\\\":\\\"string\\\",\\\"service_name\\\":\\\"string\\\",\\\"severity_text\\\":\\\"string\\\",\\\"since\\\":\\\"1h\\\",\\\"sort_order\\\":\\\"desc\\\",\\\"source\\\":\\\"function\\\",\\\"start_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"trace_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/logs/query\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"body_contains\":\"string\",\"cursor\":\"string\",\"end_time\":\"2026-06-09T00:00:00Z\",\"limit\":100,\"logql\":\"{entity_type=\\\\\"function\\\\\"} |~ \\\\\"(?i)timeout\\\\\"\",\"minimum_severity\":\"debug\",\"scope_name\":\"string\",\"service_name\":\"string\",\"severity_text\":\"string\",\"since\":\"1h\",\"sort_order\":\"desc\",\"source\":\"function\",\"start_time\":\"2026-06-09T00:00:00Z\",\"trace_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/logs/query\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"body_contains\\\":\\\"string\\\",\\\"cursor\\\":\\\"string\\\",\\\"end_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"limit\\\":100,\\\"logql\\\":\\\"{entity_type=\\\\\\\"function\\\\\\\"} |~ \\\\\\\"(?i)timeout\\\\\\\"\\\",\\\"minimum_severity\\\":\\\"debug\\\",\\\"scope_name\\\":\\\"string\\\",\\\"service_name\\\":\\\"string\\\",\\\"severity_text\\\":\\\"string\\\",\\\"since\\\":\\\"1h\\\",\\\"sort_order\\\":\\\"desc\\\",\\\"source\\\":\\\"function\\\",\\\"start_time\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"trace_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/masking_rules":{"get":{"description":"Retrieves the masking rules for the specified anonymized branch.\nMasking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getMaskingRules","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaskingRulesResponse"}}},"description":"Masking rules retrieved successfully"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve masking rules","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the masking rules for the specified anonymized branch.\nMasking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"updateMaskingRules","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaskingRulesUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaskingRulesResponse"}}},"description":"Masking rules updated successfully"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update masking rules","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\");\nrequest.Content = new StringContent(\"{\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"masking_rules\":[{\"column_name\":\"email\",\"database_name\":\"neondb\",\"masking_function\":\"anon.fake_email()\",\"schema_name\":\"public\",\"table_name\":\"users\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/masking_rules\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"masking_rules\\\":[{\\\"column_name\\\":\\\"email\\\",\\\"database_name\\\":\\\"neondb\\\",\\\"masking_function\\\":\\\"anon.fake_email()\\\",\\\"schema_name\\\":\\\"public\\\",\\\"table_name\\\":\\\"users\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/restore":{"post":{"description":"Restores a branch to an earlier state in its own or another branch's history\nby specifying an LSN or timestamp.\nCreates a new branch from the historical state.\n","operationId":"restoreProjectBranch","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRestoreRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchOperations"}}},"description":"Updated the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Restore branch to a historical state","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/restore\");\nrequest.Content = new StringContent(\"{\\\"preserve_under_name\\\":\\\"string\\\",\\\"source_branch_id\\\":\\\"string\\\",\\\"source_lsn\\\":\\\"string\\\",\\\"source_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/restore' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"preserve_under_name\":\"string\",\"source_branch_id\":\"string\",\"source_lsn\":\"string\",\"source_timestamp\":\"2024-02-26T12:00:00Z\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"preserve_under_name\":\"string\",\"source_branch_id\":\"string\",\"source_lsn\":\"string\",\"source_timestamp\":\"2024-02-26T12:00:00Z\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/restore\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/restore\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"preserve_under_name\\\":\\\"string\\\",\\\"source_branch_id\\\":\\\"string\\\",\\\"source_lsn\\\":\\\"string\\\",\\\"source_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/restore', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"preserve_under_name\":\"string\",\"source_branch_id\":\"string\",\"source_lsn\":\"string\",\"source_timestamp\":\"2024-02-26T12:00:00Z\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/restore', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"preserve_under_name\\\":\\\"string\\\",\\\"source_branch_id\\\":\\\"string\\\",\\\"source_lsn\\\":\\\"string\\\",\\\"source_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/restore\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"preserve_under_name\\\":\\\"string\\\",\\\"source_branch_id\\\":\\\"string\\\",\\\"source_lsn\\\":\\\"string\\\",\\\"source_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/restore\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"preserve_under_name\":\"string\",\"source_branch_id\":\"string\",\"source_lsn\":\"string\",\"source_timestamp\":\"2024-02-26T12:00:00Z\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/restore\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"preserve_under_name\\\":\\\"string\\\",\\\"source_branch_id\\\":\\\"string\\\",\\\"source_lsn\\\":\\\"string\\\",\\\"source_timestamp\\\":\\\"2024-02-26T12:00:00Z\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/roles":{"get":{"description":"Retrieves a list of Postgres roles from the specified branch.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n","operationId":"listProjectBranchRoles","responses":{"200":{"content":{"application/json":{"example":{"roles":[{"branch_id":"br-aged-salad-637688","created_at":"2022-11-23T17:42:25Z","name":"casey","protected":false,"updated_at":"2022-11-23T17:42:25Z"},{"branch_id":"br-aged-salad-637688","created_at":"2022-10-22T17:38:21Z","name":"thomas","protected":false,"updated_at":"2022-10-22T17:38:21Z"}]},"schema":{"$ref":"#/components/schemas/RolesResponse"}}},"description":"Returned a list of roles from the specified branch."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List roles","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/roles\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/roles'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a Postgres role in the specified branch.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n\nConnections established to the active compute endpoint will be dropped.\nIf the compute endpoint is idle, the endpoint becomes active for a short period of time and is suspended afterward.\n","operationId":"createProjectBranchRole","requestBody":{"content":{"application/json":{"example":{"role":{"name":"sally"}},"schema":{"$ref":"#/components/schemas/RoleCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"operations":[{"action":"apply_config","branch_id":"br-noisy-sunset-458773","created_at":"2022-12-03T11:58:29Z","endpoint_id":"ep-small-pine-767857","failures_count":0,"id":"2c2be371-d5ac-4db5-8b68-79f05e8bc287","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T11:58:29Z"}],"role":{"branch_id":"br-noisy-sunset-458773","created_at":"2022-12-03T11:58:29Z","name":"sally","password":"","protected":false,"updated_at":"2022-12-03T11:58:29Z"}},"schema":{"$ref":"#/components/schemas/RoleOperations"}}},"description":"Created a role in the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create role","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/roles\");\nrequest.Content = new StringContent(\"{\\\"role\\\":{\\\"name\\\":\\\"string\\\",\\\"no_login\\\":true}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/roles' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"role\":{\"name\":\"string\",\"no_login\":true}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"role\":{\"name\":\"string\",\"no_login\":true}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"role\\\":{\\\"name\\\":\\\"string\\\",\\\"no_login\\\":true}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"role\":{\"name\":\"string\",\"no_login\":true}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"role\\\":{\\\"name\\\":\\\"string\\\",\\\"no_login\\\":true}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"role\\\":{\\\"name\\\":\\\"string\\\",\\\"no_login\\\":true}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/roles\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"role\":{\"name\":\"string\",\"no_login\":true}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"role\\\":{\\\"name\\\":\\\"string\\\",\\\"no_login\\\":true}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/roles/{role_name}":{"delete":{"description":"Deletes the specified Postgres role from the branch.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n","operationId":"deleteProjectBranchRole","responses":{"200":{"content":{"application/json":{"example":{"operations":[{"action":"apply_config","branch_id":"br-raspy-hill-832856","created_at":"2022-12-01T19:48:11Z","endpoint_id":"ep-steep-bush-777093","failures_count":0,"id":"db646be3-eace-4910-9f60-8150823c5cb8","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-01T19:48:11Z"},{"action":"suspend_compute","branch_id":"br-raspy-hill-832856","created_at":"2022-12-01T19:48:11Z","endpoint_id":"ep-steep-bush-777093","failures_count":0,"id":"ab94cdad-7630-4943-a55e-5a0952d2e598","project_id":"shiny-wind-028834","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-01T19:48:11Z"}],"role":{"branch_id":"br-raspy-hill-832856","created_at":"2022-12-01T14:36:23Z","name":"thomas","protected":false,"updated_at":"2022-12-01T14:36:23Z"}},"schema":{"$ref":"#/components/schemas/RoleOperations"}}},"description":"Deleted the specified role from the branch"},"204":{"description":"Returned if the role doesn't exist or has already been deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete role","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/roles/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves details about the specified role.\nIn Neon, the terms \"role\" and \"user\" are synonymous.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n","operationId":"getProjectBranchRole","responses":{"200":{"content":{"application/json":{"example":{"role":{"branch_id":"br-noisy-sunset-458773","created_at":"2022-11-23T17:42:25Z","name":"casey","protected":false,"updated_at":"2022-11-23T17:42:25Z"}},"schema":{"$ref":"#/components/schemas/RoleResponse"}}},"description":"Returned details for the specified role"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve role details","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/roles/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The role name","in":"path","name":"role_name","required":true,"schema":{"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reset_password":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The role name","in":"path","name":"role_name","required":true,"schema":{"type":"string"}}],"post":{"description":"Resets the password for the specified Postgres role.\nReturns a new password and operations. The new password is ready to use when the last operation finishes.\nThe old password remains valid until last operation finishes.\nConnections to the compute endpoint are dropped. If idle,\nthe compute endpoint becomes active for a short period of time.\n\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n","operationId":"resetProjectBranchRolePassword","responses":{"200":{"content":{"application/json":{"example":{"operations":[{"action":"apply_config","branch_id":"br-noisy-sunset-458773","created_at":"2022-12-03T12:58:18Z","endpoint_id":"ep-small-pine-767857","failures_count":0,"id":"6bef07a0-ebca-40cd-9100-7324036cfff2","project_id":"shiny-wind-028834","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T12:58:18Z"},{"action":"suspend_compute","branch_id":"br-noisy-sunset-458773","created_at":"2022-12-03T12:58:18Z","endpoint_id":"ep-small-pine-767857","failures_count":0,"id":"16b5bfca-4697-4194-a338-d2cdc9aca2af","project_id":"shiny-wind-028834","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-03T12:58:18Z"}],"role":{"branch_id":"br-noisy-sunset-458773","created_at":"2022-12-03T12:39:39Z","name":"sally","password":"","protected":false,"updated_at":"2022-12-03T12:58:18Z"}},"schema":{"$ref":"#/components/schemas/RoleOperations"}}},"description":"Reset the password for the specified role"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Reset role password","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reset_password\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reveal_password":{"get":{"description":"Retrieves the password for the specified Postgres role, if possible.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n","operationId":"getProjectBranchRolePassword","responses":{"200":{"content":{"application/json":{"example":{"password":""},"schema":{"$ref":"#/components/schemas/RolePasswordResponse"}}},"description":"Returned password for the specified role"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Role not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"}}},"description":"Storing passwords is disabled"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve role password","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/roles/string/reveal_password\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The role name","in":"path","name":"role_name","required":true,"schema":{"type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/schema":{"get":{"description":"Retrieves the database schema. Specify `lsn` or `timestamp` (not both) to read at a point in time; omit both to read from the database's head.","operationId":"getProjectBranchSchema","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"Name of the database for which the schema is retrieved","in":"query","name":"db_name","required":true,"schema":{"type":"string"}},{"description":"The Log Sequence Number (LSN) for which the schema is retrieved\n","in":"query","name":"lsn","schema":{"type":"string"}},{"description":"The point in time for which the schema is retrieved\n","in":"query","name":"timestamp","schema":{"example":"2022-11-30T20:09:48Z","format":"date-time","type":"string"}},{"description":"The format of the schema to retrieve. Possible values:\n- `sql` (default)\n- `json`\n","in":"query","name":"format","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchSchemaResponse"}}},"description":"Schema definition"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve database schema","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/schema?db_name=string&format=string&lsn=string&timestamp=2022-11-30T20%3A09%3A48Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/set_as_default":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Sets the specified branch as the project's default branch.\nThe default designation is automatically removed from the previous default branch.\nFor more information, see [Manage branches](https://neon.com/docs/manage/branches/).\n","operationId":"setDefaultProjectBranch","responses":{"200":{"content":{"application/json":{"example":{"branch":{"active_time_seconds":1,"compute_time_seconds":1,"cpu_used_sec":1,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"ready","data_transfer_bytes":100,"default":true,"id":"br-icy-dream-250089","init_source":"parent-data","name":"mybranch","parent_id":"br-aged-salad-637688","parent_lsn":"0/1E19478","project_id":"shiny-wind-028834","protected":false,"state_changed_at":"2022-11-30T20:09:48Z","updated_at":"2022-11-23T17:42:26Z","written_data_bytes":100},"operations":[]},"schema":{"$ref":"#/components/schemas/BranchOperations"}}},"description":"Updated the specified branch"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Set branch as default","tags":["Branch"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/set_as_default\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/snapshot":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a snapshot from the specified branch.\nThis operation may initiate an asynchronous process.\n","operationId":"createSnapshot","parameters":[{"description":"The target Log Sequence Number (LSN) to take the snapshot from.\nMust fall within the restore window. Cannot be used with `timestamp`\n","in":"query","name":"lsn","required":false,"schema":{"type":"string"}},{"description":"The target timestamp for the snapshot. Must fall within the restore window. RFC 3339 format. Cannot be used with `lsn`.\n","in":"query","name":"timestamp","required":false,"schema":{"example":"2025-08-05T22:00:00Z","type":"string"}},{"description":"A name for the snapshot.","in":"query","name":"name","required":false,"schema":{"type":"string"}},{"description":"User-defined snapshot resource ID. Must be unique within the project.\nMust start with a lowercase letter, contain only lowercase letters, numbers, and hyphens,\nand end with a letter or number. If omitted, the control plane generates a value.\n","in":"query","name":"slug","required":false,"schema":{"maxLength":63,"minLength":1,"pattern":"^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$","type":"string"}},{"description":"The time at which the snapshot will be automatically deleted. RFC 3339 format.\n","in":"query","name":"expires_at","required":false,"schema":{"example":"2025-08-05T22:00:00Z","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/Operation"},"type":"array"},"snapshot":{"$ref":"#/components/schemas/Snapshot"}},"required":["operations","snapshot"],"type":"object"}}},"description":"Successfully created the snapshot"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create snapshot","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/snapshot?expires_at=2025-08-05T22%3A00%3A00Z&lsn=string&name=string&slug=string&timestamp=2025-08-05T22%3A00%3A00Z\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/branches/{branch_id}/storage":{"get":{"description":"Returns whether branchable object storage is usable for the specified\nbranch. A 200 response means the branch is registered in the object storage\nservice and the S3 data plane will accept requests for it. A 404\nresponse includes a `reason` field indicating why object storage is unavailable.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getProjectBranchStorage","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchStorage"}}},"description":"Object storage is enabled for this branch"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchStorageNotEnabled"}}},"description":"Object storage is not enabled for this branch, or the project/branch was not\nfound. The body is always `BranchStorageNotEnabled` — see `reason` for\nthe exact cause.\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Get branch object storage state","tags":["Storage"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/storage\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/storage'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/storage\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/storage\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/storage', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/storage', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/storage\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/storage\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/storage\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/branches/{branch_id}/triggers":{"get":{"description":"Lists the complete project-bounded set of triggers visible on the branch,\nordered by `trigger_id`. An inherited trigger keeps its project-wide ID\nand configuration, and is disabled on the child until explicitly enabled\nthere.\n\nThe supported trigger types are `schedule` and\n`storage_object_created`. A storage-object-created trigger watches one\nexact bucket and fires only after an object upload succeeds.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"listProjectBranchTriggers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggersListResponse"}}},"description":"The branch-effective trigger list"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List triggers on the branch","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/triggers'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a trigger for a Function visible on the branch. The required\n`type` discriminator selects the trigger-specific configuration. The\nsupported types are `schedule` and `storage_object_created`. A schedule\ntrigger uses a numeric five-field cron expression interpreted in UTC. A\nstorage-object-created trigger fires only after a successful upload to\none exact bucket and may narrow matches to an object-key prefix.\n\nThe name must be unique among triggers visible on the branch, including\ninherited triggers.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"createProjectBranchTrigger","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}},"description":"Trigger created"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create a trigger","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\");\nrequest.Content = new StringContent(\"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"/\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/branches/string/triggers' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"enabled\":true,\"function_path\":\"/\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"enabled\":true,\"function_path\":\"/\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"/\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"enabled\":true,\"function_path\":\"/\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"/\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"/\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"enabled\":true,\"function_path\":\"/\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"/\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}":{"delete":{"description":"Deletes a branch-local trigger or writes a branch-local tombstone for an\ninherited trigger so it does not reappear. Deletion stops future\nscheduling or storage-event matching but does not cancel invocations\nalready committed for delivery. The supported trigger types are\n`schedule` and `storage_object_created`.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"deleteProjectBranchTrigger","responses":{"204":{"description":"Trigger deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete a trigger","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"get":{"description":"Returns the trigger visible on the branch. The supported trigger types\nare `schedule` and `storage_object_created`.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"getProjectBranchTrigger","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}},"description":"The trigger"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Get a trigger","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon branch ID","in":"path","name":"branch_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The opaque, project-wide trigger ID","in":"path","name":"trigger_id","required":true,"schema":{"$ref":"#/components/schemas/TriggerID"}}],"patch":{"description":"Applies a partial update. The required `type` discriminator must identify\nthe existing trigger kind. The supported types are `schedule` and\n`storage_object_created`. Editing an inherited trigger creates a\nchild-local shadow with the same `trigger_id`; it remains disabled unless\nthis request explicitly enables it. For a schedule trigger, updating the\nschedule or enabled state increments `version` and recomputes\n`next_run_at`.\n\nDisabling stops future scheduling but does not cancel occurrences already\ncommitted for delivery. For `storage_object_created`, the configuration\nselects one exact bucket. An omitted object-key prefix matches every key\nin that bucket; a present prefix is matched byte-for-byte and\ncase-sensitively against the full key, without path normalization or a\npath-segment boundary.\n\n**Note**: This endpoint is currently in Beta.\n","operationId":"updateProjectBranchTrigger","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}},"description":"The updated trigger"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update a trigger","tags":["Functions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\");\nrequest.Content = new StringContent(\"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"string\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"enabled\":true,\"function_path\":\"string\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"enabled\":true,\"function_path\":\"string\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"string\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"enabled\":true,\"function_path\":\"string\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"string\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"string\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"enabled\":true,\"function_path\":\"string\",\"function_slug\":\"string\",\"name\":\"string\",\"schedule\":{\"cron\":\"0 9 * * 1-5\"},\"type\":\"schedule\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/branches/string/triggers/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"enabled\\\":true,\\\"function_path\\\":\\\"string\\\",\\\"function_slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"schedule\\\":{\\\"cron\\\":\\\"0 9 * * 1-5\\\"},\\\"type\\\":\\\"schedule\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/connection_uri":{"get":{"description":"Retrieves a connection URI for the specified database.\nThe URI uses the standard PostgreSQL connection string format. Set `pooled=true` to include the `-pooler` suffix for a connection pooler URI.\n","operationId":"getConnectionURI","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The branch ID. Defaults to your project's default `branch_id` if not specified.","in":"query","name":"branch_id","required":false,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The endpoint ID. Defaults to the read-write `endpoint_id` associated with the `branch_id` if not specified.","in":"query","name":"endpoint_id","required":false,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The database name","in":"query","name":"database_name","required":true,"schema":{"type":"string"}},{"description":"The role name","in":"query","name":"role_name","required":true,"schema":{"type":"string"}},{"description":"Adds the `-pooler` option to the connection URI when set to `true`, creating a pooled connection URI.","in":"query","name":"pooled","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionURIResponse"}}},"description":"Returned the connection URI"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve connection URI","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/connection_uri?branch_id=string&database_name=string&endpoint_id=string&pooled=true&role_name=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/endpoints":{"get":{"description":"Retrieves a list of compute endpoints for the specified project.\nA compute endpoint is a Neon compute instance.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"listProjectEndpoints","responses":{"200":{"content":{"application/json":{"example":{"endpoints":[{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-aged-salad-637688","created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-little-smoke-851426.us-east-2.aws.neon.tech","id":"ep-little-smoke-851426","last_active":"2022-11-23T17:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-11-30T18:25:21Z"},{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-raspy-hill-832856","created_at":"2022-11-30T17:36:57Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-steep-bush-777093.us-east-2.aws.neon.tech","id":"ep-steep-bush-777093","last_active":"2022-11-30T17:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-11-30T18:42:58Z"},{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-sweet-breeze-497520","created_at":"2022-11-30T19:09:48Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-soft-violet-752733.us-east-2.aws.neon.tech","id":"ep-soft-violet-752733","last_active":"2022-11-30T19:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-11-30T19:14:51Z"}]},"schema":{"$ref":"#/components/schemas/EndpointsResponse"}}},"description":"Returned a list of endpoints for the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List compute endpoints","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/endpoints\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/endpoints'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/endpoints\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/endpoints\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a compute endpoint for the specified branch.\nA compute endpoint is a Neon compute instance.\nThere is a maximum of one read-write compute endpoint per branch.\nIf the specified branch already has a read-write compute endpoint, the operation fails.\nA branch can have multiple read-only compute endpoints.\n\nFor more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"createProjectEndpoint","requestBody":{"content":{"application/json":{"examples":{"required_attributes_only":{"summary":"Required attributes only","value":{"endpoint":{"branch_id":"br-floral-mountain-251143","type":"read_write"}}},"with_pooler_attribute":{"summary":"With pooler attribute","value":{"endpoint":{"branch_id":"br-floral-mountain-251143","pooler_enabled":true,"type":"read_write"}}},"with_region_attribute":{"summary":"With region attribute","value":{"endpoint":{"branch_id":"br-floral-mountain-251143","region_id":"aws-us-east-2","type":"read_write"}}}},"schema":{"$ref":"#/components/schemas/EndpointCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"init","disabled":false,"host":"ep-shrill-thunder-454069.us-east-2.aws.neon.tech","id":"ep-shrill-thunder-454069","passwordless_access":true,"pending_state":"active","pooler_enabled":false,"pooler_mode":"transaction","project_id":"bitter-meadow-966132","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-12-03T15:37:07Z"},"operations":[{"action":"start_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:37:07Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"874f8bfe-f51d-4c61-85af-a29bea73e0e2","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:37:07Z"}]},"schema":{"$ref":"#/components/schemas/EndpointOperations"}}},"description":"Created a compute endpoint"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create compute endpoint","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/endpoints\");\nrequest.Content = new StringContent(\"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/endpoints' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/endpoints\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"region_id\":\"string\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0,\"type\":\"read_only\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"region_id\\\":\\\"string\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0,\\\"type\\\":\\\"read_only\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/endpoints/{endpoint_id}":{"delete":{"description":"Deletes the specified compute endpoint.\nA compute endpoint is a Neon compute instance.\nDeleting a compute endpoint drops existing network connections to the compute endpoint.\nThe deletion is completed when the last operation in the chain finishes successfully.\n\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"deleteProjectEndpoint","responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-raspy-hill-832856","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-steep-bush-777093.us-east-2.aws.neon.tech","id":"ep-steep-bush-777093","last_active":"2022-12-03T15:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-12-03T15:49:10Z"},"operations":[{"action":"suspend_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"fd11748e-3c68-458f-b9e3-66d409e3eef0","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"}]},"schema":{"$ref":"#/components/schemas/EndpointOperations"}}},"description":"Deleted the specified compute endpoint"},"204":{"description":"Returned if the endpoint doesn't exist or has already been deleted"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete compute endpoint","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/endpoints/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/endpoints/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Retrieves information about the specified compute endpoint.\nA compute endpoint is a Neon compute instance.\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"getProjectEndpoint","responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-aged-salad-637688","created_at":"2022-11-23T17:42:25Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-little-smoke-851426.us-east-2.aws.neon.tech","id":"ep-little-smoke-851426","last_active":"2022-11-23T17:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-11-30T18:25:21Z"}},"schema":{"$ref":"#/components/schemas/EndpointResponse"}}},"description":"Returned information about the specified endpoint"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve compute endpoint details","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/endpoints/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/endpoints/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The endpoint ID","in":"path","name":"endpoint_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the specified compute endpoint.\n\nAn `endpoint_id` has an `ep-` prefix. A `branch_id` has a `br-` prefix.\nFor more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n\nIf the returned list of operations is not empty, the compute endpoint is not ready to use.\nThe client must wait for the last operation to finish before using the compute endpoint.\nIf the compute endpoint was idle before the update, it becomes active for a short period of time,\nand the control plane suspends it again after the update.\n","operationId":"updateProjectEndpoint","requestBody":{"content":{"application/json":{"example":{"endpoint":{"suspend_timeout_seconds":300}},"schema":{"$ref":"#/components/schemas/EndpointUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-raspy-hill-832856","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-steep-bush-777093.us-east-2.aws.neon.tech","id":"ep-steep-bush-777093","last_active":"2022-12-03T15:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-12-03T15:49:10Z"},"operations":[{"action":"apply_config","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"3fc98ab8-f191-47b8-a427-5eb668ccc5b9","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"},{"action":"suspend_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"9ffda74b-a582-4cff-b0f0-aaa8d14b8e6a","project_id":"bitter-meadow-966132","status":"scheduling","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"}]},"schema":{"$ref":"#/components/schemas/EndpointOperations"}}},"description":"Updated the specified compute endpoint"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update compute endpoint","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/endpoints/string\");\nrequest.Content = new StringContent(\"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/endpoints/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/endpoints/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"endpoint\":{\"autoscaling_limit_max_cu\":0,\"autoscaling_limit_min_cu\":0,\"branch_id\":\"string\",\"disabled\":true,\"name\":\"string\",\"passwordless_access\":true,\"pooler_enabled\":true,\"pooler_mode\":\"transaction\",\"provisioner\":\"k8s-neonvm\",\"settings\":{\"pg_settings\":{\"additionalProp1\":\"string\"},\"pgbouncer_settings\":{\"additionalProp1\":\"string\"},\"preload_libraries\":{\"enabled_libraries\":[\"string\"],\"use_defaults\":true}},\"suspend_timeout_seconds\":0}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"endpoint\\\":{\\\"autoscaling_limit_max_cu\\\":0,\\\"autoscaling_limit_min_cu\\\":0,\\\"branch_id\\\":\\\"string\\\",\\\"disabled\\\":true,\\\"name\\\":\\\"string\\\",\\\"passwordless_access\\\":true,\\\"pooler_enabled\\\":true,\\\"pooler_mode\\\":\\\"transaction\\\",\\\"provisioner\\\":\\\"k8s-neonvm\\\",\\\"settings\\\":{\\\"pg_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"pgbouncer_settings\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"preload_libraries\\\":{\\\"enabled_libraries\\\":[\\\"string\\\"],\\\"use_defaults\\\":true}},\\\"suspend_timeout_seconds\\\":0}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/endpoints/{endpoint_id}/restart":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The endpoint ID","in":"path","name":"endpoint_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Restarts the specified compute endpoint by immediately suspending it and then starting it again.\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"restartProjectEndpoint","responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-raspy-hill-832856","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-steep-bush-777093.us-east-2.aws.neon.tech","id":"ep-steep-bush-777093","last_active":"2022-12-03T15:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-12-03T15:49:10Z"},"operations":[{"action":"suspend_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"e061087e-3c99-4856-b9c8-6b7751a253af","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"},{"action":"start_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"e061087e-3c99-4856-b9c8-6b7751a253af","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"}]},"schema":{"$ref":"#/components/schemas/EndpointOperations"}}},"description":"Restarted endpoint"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Restart compute endpoint","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/endpoints/string/restart\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/endpoints/string/restart'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string/restart\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/restart\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string/restart', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string/restart', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/restart\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string/restart\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/restart\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/endpoints/{endpoint_id}/start":{"post":{"description":"Starts a compute endpoint.\nThe compute endpoint is ready to use after the last operation in the chain finishes successfully.\n\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"startProjectEndpoint","parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The endpoint ID","in":"path","name":"endpoint_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-raspy-hill-832856","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-steep-bush-777093.us-east-2.aws.neon.tech","id":"ep-steep-bush-777093","last_active":"2022-12-03T15:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-12-03T15:49:10Z"},"operations":[{"action":"start_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"e061087e-3c99-4856-b9c8-6b7751a253af","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"}]},"schema":{"$ref":"#/components/schemas/EndpointOperations"}}},"description":"Started the specified compute endpoint"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Start compute endpoint","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/endpoints/string/start\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/endpoints/string/start'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string/start\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/start\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string/start', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string/start', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/start\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string/start\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/start\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/endpoints/{endpoint_id}/suspend":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The endpoint ID","in":"path","name":"endpoint_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Suspends the specified compute endpoint.\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n","operationId":"suspendProjectEndpoint","responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"autoscaling_limit_max_cu":1,"autoscaling_limit_min_cu":1,"branch_id":"br-raspy-hill-832856","created_at":"2022-12-03T15:37:07Z","creation_source":"console","current_state":"idle","disabled":false,"host":"ep-steep-bush-777093.us-east-2.aws.neon.tech","id":"ep-steep-bush-777093","last_active":"2022-12-03T15:00:00Z","passwordless_access":true,"pooler_enabled":false,"pooler_mode":"transaction","project_id":"shiny-wind-028834","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","settings":{"pg_settings":{}},"suspend_timeout_seconds":10800,"type":"read_write","updated_at":"2022-12-03T15:49:10Z"},"operations":[{"action":"suspend_compute","branch_id":"br-proud-paper-090813","created_at":"2022-12-03T15:51:06Z","endpoint_id":"ep-shrill-thunder-454069","failures_count":0,"id":"e061087e-3c99-4856-b9c8-6b7751a253af","project_id":"bitter-meadow-966132","status":"running","total_duration_ms":100,"updated_at":"2022-12-03T15:51:06Z"}]},"schema":{"$ref":"#/components/schemas/EndpointOperations"}}},"description":"Suspended the specified endpoint"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Suspend compute endpoint","tags":["Endpoint"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/endpoints/string/suspend\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/jwks":{"get":{"description":"Returns the JWKS URLs available for verifying JWTs used as the authentication mechanism for the specified project.\n","operationId":"getProjectJWKS","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJWKSResponse"}}},"description":"The JWKS URLs available for the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List JWKS URLs","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/jwks\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/jwks'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/jwks\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/jwks\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/jwks', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/jwks', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/jwks\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/jwks\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/jwks\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Adds a JWKS URL to the specified project for verifying JWTs used as the authentication mechanism.\n\nThe URL must be a valid HTTPS URL that returns a JSON Web Key Set.\n\nThe `provider_name` field allows you to specify which authentication provider you're using (e.g., Clerk, Auth0, AWS Cognito).\n\nThe `branch_id` scopes the JWKS URL to specific branches; if not specified, it applies to all branches.\n\nThe `role_names` scopes the URL to specific roles; if not specified, default roles are used (`authenticator`, `authenticated`, `anonymous`).\n\nThe `jwt_audience` specifies which `aud` values are accepted in JWTs.\n","operationId":"addProjectJWKS","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProjectJWKSRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWKSCreationOperation"}}},"description":"The JWKS URL was added to the project's authentication connections"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Add JWKS URL","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/jwks\");\nrequest.Content = new StringContent(\"{\\\"branch_id\\\":\\\"string\\\",\\\"jwks_url\\\":\\\"string\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"role_names\\\":[\\\"string\\\"],\\\"skip_role_creation\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/jwks' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branch_id\":\"string\",\"jwks_url\":\"string\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"role_names\":[\"string\"],\"skip_role_creation\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branch_id\":\"string\",\"jwks_url\":\"string\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"role_names\":[\"string\"],\"skip_role_creation\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/jwks\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/jwks\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"branch_id\\\":\\\"string\\\",\\\"jwks_url\\\":\\\"string\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"role_names\\\":[\\\"string\\\"],\\\"skip_role_creation\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/jwks', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branch_id\":\"string\",\"jwks_url\":\"string\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"role_names\":[\"string\"],\"skip_role_creation\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/jwks', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branch_id\\\":\\\"string\\\",\\\"jwks_url\\\":\\\"string\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"role_names\\\":[\\\"string\\\"],\\\"skip_role_creation\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/jwks\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branch_id\\\":\\\"string\\\",\\\"jwks_url\\\":\\\"string\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"role_names\\\":[\\\"string\\\"],\\\"skip_role_creation\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/jwks\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branch_id\":\"string\",\"jwks_url\":\"string\",\"jwt_audience\":\"string\",\"provider_name\":\"string\",\"role_names\":[\"string\"],\"skip_role_creation\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/jwks\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branch_id\\\":\\\"string\\\",\\\"jwks_url\\\":\\\"string\\\",\\\"jwt_audience\\\":\\\"string\\\",\\\"provider_name\\\":\\\"string\\\",\\\"role_names\\\":[\\\"string\\\"],\\\"skip_role_creation\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/jwks/{jwks_id}":{"delete":{"description":"Removes the specified JWKS URL from the project.\nJWTs signed by keys from the removed URL can no longer authenticate to the project's endpoints.\n","operationId":"deleteProjectJWKS","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWKS"}}},"description":"Deleted a JWKS URL from the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete JWKS URL","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/jwks/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/jwks/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/jwks/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/jwks/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/jwks/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/jwks/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/jwks/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/jwks/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/jwks/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The JWKS ID","in":"path","name":"jwks_id","required":true,"schema":{"type":"string"}}]},"/projects/{project_id}/members":{"get":{"description":"Lists organization members and their per-project roles for an org-owned project.\nReturns 404 when the project is not org-owned, per-project role management is disabled,\nor the caller has no access. Callers with VIEWER or EDITOR see members with\neffective project access. Callers with ADMIN also see unassigned org members.\n","operationId":"listProjectMembers","parameters":[{"$ref":"#/components/parameters/CursorParam"},{"description":"The maximum number of members to return in the response","in":"query","name":"limit","schema":{"maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMembers"}}},"description":"Returned the org members and their project roles"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List org members and their project roles","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/members?cursor=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/members/{member_id}/role":{"delete":{"description":"Idempotently removes the explicit project grant. The member's organization-role\ndefault project permission still applies. Self-DELETE requires\n`confirm_self_lockout=true` when effective manage access would be lost.\n","operationId":"removeProjectMemberRole","parameters":[{"in":"query","name":"confirm_self_lockout","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMemberRoleResponse"}}},"description":"Role removed, or no-op if no explicit row existed"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Remove an org member's role on a project","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_lockout=true\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"in":"path","name":"member_id","required":true,"schema":{"format":"uuid","type":"string"}}],"put":{"description":"Idempotently sets or updates the explicit project grant of the specified org member.\nSelf-demotion requires `confirm_self_demotion=true`.\n","operationId":"setProjectMemberRole","parameters":[{"in":"query","name":"confirm_self_demotion","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectMemberRoleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMemberRoleResponse"}}},"description":"Role set or updated"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Set an org member's role on a project","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true\");\nrequest.Content = new StringContent(\"{\\\"role\\\":\\\"admin\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"role\":\"admin\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"role\":\"admin\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"role\\\":\\\"admin\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"role\":\"admin\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"role\\\":\\\"admin\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"role\\\":\\\"admin\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"role\":\"admin\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/members/00000000-0000-0000-0000-000000000000/role?confirm_self_demotion=true\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"role\\\":\\\"admin\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/operations":{"get":{"description":"Retrieves a list of operations for the specified Neon project.\nThe number of operations returned can be large.\nTo paginate the response, issue an initial request with a `limit` value.\nThen, add the `cursor` value that was returned in the response to the next request.\nOperations older than 6 months may be deleted from our systems.\nIf you need more history than that, you should store your own history.\n","operationId":"listProjectOperations","parameters":[{"description":"Specify the cursor value from the previous response to get the next batch of operations","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Specify a value from 1 to 1000 to limit number of operations in the response","in":"query","name":"limit","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/ListOperations"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List operations","tags":["Operation"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/operations?cursor=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/operations/{operation_id}":{"get":{"description":"Retrieves details for the specified operation.\nAn operation is an action performed on a Neon project resource.\n","operationId":"getProjectOperation","responses":{"200":{"content":{"application/json":{"example":{"operation":{"action":"create_timeline","branch_id":"br-bitter-sound-247814","created_at":"2022-10-04T18:20:17Z","endpoint_id":"ep-dark-snowflake-942567","failures_count":0,"id":"a07f8772-1877-4da9-a939-3a3ae62d1d8d","project_id":"floral-king-961888","status":"finished","total_duration_ms":100,"updated_at":"2022-10-04T18:20:18Z"}},"schema":{"$ref":"#/components/schemas/OperationResponse"}}},"description":"Returned details for the specified operation"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve operation details","tags":["Operation"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/operations/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The operation ID","in":"path","name":"operation_id","required":true,"schema":{"format":"uuid","type":"string"}}]},"/projects/{project_id}/permissions":{"get":{"description":"Retrieves details about users who have access to the project, including the permission `id`, the granted-to email address, and the date project access was granted.","operationId":"listProjectPermissions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectPermissions"}}},"description":"Returned project access details"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List project access","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/permissions\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/permissions'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/permissions\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/permissions\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/permissions', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/permissions', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/permissions\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/permissions\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/permissions\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Grants project access to the account associated with the specified email address.\n","operationId":"grantPermissionToProject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantPermissionToProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectPermission"}}},"description":"Granted project access"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Grant project access","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/permissions\");\nrequest.Content = new StringContent(\"{\\\"email\\\":\\\"user@example.com\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/permissions' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"user@example.com\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"email\":\"user@example.com\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/permissions\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/permissions\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\":\\\"user@example.com\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/permissions', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"email\":\"user@example.com\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/permissions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"email\\\":\\\"user@example.com\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/permissions\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"user@example.com\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/permissions\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"email\":\"user@example.com\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/permissions\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"email\\\":\\\"user@example.com\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/permissions/{permission_id}":{"delete":{"description":"Revokes project access from the user associated with the specified permission `id`. You can retrieve a user's permission `id` by listing project access.","operationId":"revokePermissionFromProject","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectPermission"}}},"description":"Revoked project access"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Revoke project access","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/permissions/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/permissions/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/permissions/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/permissions/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/permissions/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/permissions/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/permissions/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/permissions/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/permissions/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"in":"path","name":"permission_id","required":true,"schema":{"type":"string"}}]},"/projects/{project_id}/recover":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Recovers a deleted project within the 7-day deletion recovery period.\nRestores branches, endpoints, settings, and connection strings.\nSome integrations require manual reconfiguration after recovery.\nTo list recoverable projects, use `GET /projects?recoverable=true`.\n","operationId":"recoverProject","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRecoverResponse"}}},"description":"Returned the recovered project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Recover a deleted project","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/recover\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/recover'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/recover\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/recover\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/recover', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/recover', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/recover\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://console.neon.tech/api/v2/projects/string/recover\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/recover\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/snapshots":{"get":{"description":"Lists the snapshots for the specified project.\nEach snapshot represents a point-in-time backup of the project data.\n","operationId":"listSnapshots","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"snapshots":{"items":{"$ref":"#/components/schemas/Snapshot"},"type":"array"}},"required":["snapshots"],"type":"object"}}},"description":"Projects snapshots"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List project snapshots","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/snapshots\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/snapshots'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/snapshots\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/snapshots\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/snapshots\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/snapshots\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/snapshots\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/snapshots/{snapshot_id}":{"delete":{"description":"Deletes the specified snapshot.\n","operationId":"deleteSnapshot","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsResponse"}}},"description":"OK"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete snapshot","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/snapshots/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/snapshots/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/snapshots/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/snapshots/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/snapshots/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/snapshots/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/snapshots/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The snapshot ID","in":"path","name":"snapshot_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"patch":{"description":"Updates the specified snapshot.\n","operationId":"updateSnapshot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"snapshot":{"$ref":"#/components/schemas/Snapshot"}},"required":["snapshot"],"type":"object"}}},"description":"Successfully updated the snapshot"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Update snapshot","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://console.neon.tech/api/v2/projects/string/snapshots/string\");\nrequest.Content = new StringContent(\"{\\\"snapshot\\\":{\\\"expires_at\\\":\\\"2030-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://console.neon.tech/api/v2/projects/string/snapshots/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"snapshot\":{\"expires_at\":\"2030-06-09T18:02:16Z\",\"name\":\"string\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"snapshot\":{\"expires_at\":\"2030-06-09T18:02:16Z\",\"name\":\"string\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://console.neon.tech/api/v2/projects/string/snapshots/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/snapshots/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"snapshot\\\":{\\\"expires_at\\\":\\\"2030-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"snapshot\":{\"expires_at\":\"2030-06-09T18:02:16Z\",\"name\":\"string\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"snapshot\\\":{\\\"expires_at\\\":\\\"2030-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/snapshots/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"snapshot\\\":{\\\"expires_at\\\":\\\"2030-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://console.neon.tech/api/v2/projects/string/snapshots/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"snapshot\":{\"expires_at\":\"2030-06-09T18:02:16Z\",\"name\":\"string\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/snapshots/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"snapshot\\\":{\\\"expires_at\\\":\\\"2030-06-09T18:02:16Z\\\",\\\"name\\\":\\\"string\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/snapshots/{snapshot_id}/restore":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The snapshot ID","in":"path","name":"snapshot_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Restores the specified snapshot to a new branch,\nand optionally finalizes the restore operation to replace the original branch.\n","operationId":"restoreSnapshot","parameters":[{"deprecated":true,"description":"Deprecated. Use the `name` field in the request body instead. Removal scheduled for November 29, 2025.\nA name for the newly restored branch. If omitted, a default name will be generated.\n","in":"query","name":"name","required":false,"schema":{"type":"string"},"x-sunset":"2025-11-29"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"finalize_restore":{"default":false,"description":"Set to `true` to finalize the restore operation immediately.\nThis will complete the restore and move any associated computes to the new branch,\nsimilar to the `finalizeRestoreBranch` operation.\nDefaults to `false` to allow previewing the restored snapshot data first.\n","type":"boolean"},"name":{"description":"A name for the newly restored branch. If not provided, the server generates a unique name for the branch automatically.\n","type":"string"},"target_branch_id":{"description":"ID of the branch to restore the snapshot into. Defaults to the snapshot's source branch (`snapshot.source_branch_id`); fails if that cannot be determined.\n","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"$ref":"#/components/responses/RestoredSnapshot"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Restore snapshot","tags":["Snapshot"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string\");\nrequest.Content = new StringContent(\"{\\\"finalize_restore\\\":false,\\\"name\\\":\\\"string\\\",\\\"target_branch_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"finalize_restore\":false,\"name\":\"string\",\"target_branch_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"finalize_restore\":false,\"name\":\"string\",\"target_branch_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"finalize_restore\\\":false,\\\"name\\\":\\\"string\\\",\\\"target_branch_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"finalize_restore\":false,\"name\":\"string\",\"target_branch_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"finalize_restore\\\":false,\\\"name\\\":\\\"string\\\",\\\"target_branch_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"finalize_restore\\\":false,\\\"name\\\":\\\"string\\\",\\\"target_branch_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"finalize_restore\":false,\"name\":\"string\",\"target_branch_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/snapshots/string/restore?name=string\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"finalize_restore\\\":false,\\\"name\\\":\\\"string\\\",\\\"target_branch_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-stability-level":"beta"}},"/projects/{project_id}/transfer_requests":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"post":{"description":"Creates a transfer request for the specified project. The request expires after a set period.\nTo accept the request, the recipient calls `PUT /projects/{project_id}/transfer_requests/{request_id}`\nor uses the Neon Console claim link.\nThe optional `ru` parameter redirects the recipient after acceptance.\n","operationId":"createProjectTransferRequest","requestBody":{"content":{"application/json":{"schema":{"properties":{"ttl_seconds":{"default":86400,"description":"Number of seconds the transfer request stays valid before it expires. Defaults to 86400 (24 hours).\n","format":"int64","type":"integer"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTransferRequestResponse"}}},"description":"Project transfer request created successfully"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Create a project transfer request","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/transfer_requests\");\nrequest.Content = new StringContent(\"{\\\"ttl_seconds\\\":86400}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/transfer_requests' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ttl_seconds\":86400}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"ttl_seconds\":86400}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/transfer_requests\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/transfer_requests\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"ttl_seconds\\\":86400}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/transfer_requests', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"ttl_seconds\":86400}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/transfer_requests', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"ttl_seconds\\\":86400}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/transfer_requests\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"ttl_seconds\\\":86400}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/transfer_requests\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"ttl_seconds\":86400}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/transfer_requests\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"ttl_seconds\\\":86400}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/transfer_requests/{request_id}":{"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The Neon project transfer request ID","in":"path","name":"request_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"put":{"description":"Accepts a transfer request for the specified project, transferring it to the specified organization\nor user. If org_id is not passed, the project will be transferred to the current user or organization account.\n","operationId":"acceptProjectTransferRequest","requestBody":{"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"The Neon organization ID to transfer the project to. If not provided, the project will be\ntransferred to the current user or organization account.\n","example":"org-cool-darkness-12345678","pattern":"^[a-z0-9-]{1,60}$","type":"string"}},"type":"object"}}}},"responses":{"204":{"description":"Project transfer request accepted successfully"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptProjectTransferRequestSatisfiesPlanError"}}},"description":"Account doesn't satisfy the plan requirements to own the project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Accept a project transfer request","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://console.neon.tech/api/v2/projects/string/transfer_requests/string\");\nrequest.Content = new StringContent(\"{\\\"org_id\\\":\\\"org-cool-darkness-12345678\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://console.neon.tech/api/v2/projects/string/transfer_requests/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"org_id\":\"org-cool-darkness-12345678\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"org_id\":\"org-cool-darkness-12345678\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://console.neon.tech/api/v2/projects/string/transfer_requests/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/transfer_requests/string\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"org_id\\\":\\\"org-cool-darkness-12345678\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/transfer_requests/string', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"org_id\":\"org-cool-darkness-12345678\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/transfer_requests/string', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"org_id\\\":\\\"org-cool-darkness-12345678\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/transfer_requests/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"org_id\\\":\\\"org-cool-darkness-12345678\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://console.neon.tech/api/v2/projects/string/transfer_requests/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"org_id\":\"org-cool-darkness-12345678\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/transfer_requests/string\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"org_id\\\":\\\"org-cool-darkness-12345678\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/projects/{project_id}/vpc_endpoints":{"get":{"description":"Lists VPC endpoint restrictions for the specified Neon project.\n","operationId":"listProjectVPCEndpoints","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPCEndpointsResponse"}}},"description":"Returned VPC endpoint restrictions for the specified project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List VPC endpoint restrictions","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/projects/string/vpc_endpoints'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/vpc_endpoints', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/vpc_endpoints', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}]},"/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}":{"delete":{"description":"Removes the specified VPC endpoint restriction from a Neon project.\n","operationId":"deleteProjectVPCEndpoint","responses":{"200":{"description":"Removed the VPC endpoint restriction from the specified Neon project"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Delete VPC endpoint restriction","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"parameters":[{"description":"The Neon project ID","in":"path","name":"project_id","required":true,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}},{"description":"The VPC endpoint ID","in":"path","name":"vpc_endpoint_id","required":true,"schema":{"type":"string"}}],"post":{"description":"Sets or updates a VPC endpoint restriction for a Neon project.\nWhen a VPC endpoint restriction is set, the project only accepts connections\nfrom the specified VPC.\nA VPC endpoint can be set as a restriction only after it is assigned to the\nparent organization of the Neon project.\n","operationId":"assignProjectVPCEndpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPCEndpointAssignment"}}},"required":true},"responses":{"200":{"description":"Configured the specified VPC endpoint as a restriction for the specified project."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Set VPC endpoint restriction","tags":["Project"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\");\nrequest.Content = new StringContent(\"{\\\"label\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"label\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"label\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"label\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"label\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"label\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"label\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"label\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/projects/string/vpc_endpoints/string\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"label\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/regions":{"get":{"description":"Lists supported Neon regions.\n\n**Note:** Not all regions are available to all organizations. Pass the `org_id`\nparameter to get an accurate list of regions available to your organization.\n","operationId":"getActiveRegions","parameters":[{"description":"Organization ID. When provided, returns only regions available to this organization.\nRecommended for accurate region availability.\n","in":"query","name":"org_id","required":false,"schema":{"pattern":"^[a-z0-9-]{1,60}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveRegionsResponse"}}},"description":"The list of active regions"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List supported regions","tags":["Region"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/regions?org_id=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/regions?org_id=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/regions?org_id=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/regions?org_id=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/regions?org_id=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/regions?org_id=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/regions?org_id=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/regions?org_id=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/regions?org_id=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/users/me":{"get":{"description":"Retrieves information about the currently authenticated Neon user,\nincluding account identifiers, plan details, and linked auth accounts.\n","operationId":"getCurrentUserInfo","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserInfoResponse"}}},"description":"Returned information about the current user\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Retrieve current user details","tags":["Users"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/users/me\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/users/me'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/users/me\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/users/me\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/users/me', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/users/me', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/users/me\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/users/me\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/users/me\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/users/me/organizations":{"get":{"description":"Retrieves the organizations that the currently authenticated user belongs to.\n\nWhen called with an organization- or project-scoped API key (which is not\ntied to a user), this returns the single organization that owns the key.\n","operationId":"getCurrentUserOrganizations","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationsResponse"}}},"description":"Returned information about the current user organizations\n"},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"List organizations for the current user","tags":["Users","Organizations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://console.neon.tech/api/v2/users/me/organizations\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://console.neon.tech/api/v2/users/me/organizations'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://console.neon.tech/api/v2/users/me/organizations\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/users/me/organizations\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/users/me/organizations', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/users/me/organizations', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/users/me/organizations\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://console.neon.tech/api/v2/users/me/organizations\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/users/me/organizations\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/users/me/projects/transfer":{"post":{"deprecated":true,"description":"Deprecated. Personal accounts have been migrated to organizations, so this operation no longer applies. Removal scheduled for July 1, 2026.\n","operationId":"transferProjectsFromUserToOrg","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferProjectsToOrganizationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResponse"}}},"description":"Projects successfully transferred from personal account to organization"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsUnsatisfiedResponse"}}},"description":"Transfer failed. The target organization has too many projects or an incompatible plan. Reduce projects or upgrade the target organization."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsWithIntegrationResponse"}}},"description":"Transfer failed. Projects with active integrations (for example, GitHub or Vercel) cannot be transferred."},"default":{"$ref":"#/components/responses/GeneralError"}},"summary":"Transfer projects from personal account to organization","tags":["Users"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://console.neon.tech/api/v2/users/me/projects/transfer\");\nrequest.Content = new StringContent(\"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://console.neon.tech/api/v2/users/me/projects/transfer' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://console.neon.tech/api/v2/users/me/projects/transfer\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://console.neon.tech/api/v2/users/me/projects/transfer\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://console.neon.tech/api/v2/users/me/projects/transfer', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://console.neon.tech/api/v2/users/me/projects/transfer', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://console.neon.tech/api/v2/users/me/projects/transfer\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://console.neon.tech/api/v2/users/me/projects/transfer\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"destination_org_id\":\"string\",\"project_ids\":[\"string\"]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://console.neon.tech/api/v2/users/me/projects/transfer\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"destination_org_id\\\":\\\"string\\\",\\\"project_ids\\\":[\\\"string\\\"]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-sunset":"2026-07-01"}}},"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"TokenCookieAuth":[]}],"servers":[{"url":"https://console.neon.tech/api/v2"}],"tags":[{"description":"These methods allow you to create and manage API keys for your Neon account. For related information, see [Manage API keys](https://neon.com/docs/manage/api-keys).","name":"API Key"},{"description":"These methods allow you to view operation details for your Neon project. For related information, see [Operations](https://neon.com/docs/manage/operations).","name":"Operation"},{"description":"These methods allow you to create and manage Neon projects. For related information, see [Manage projects](https://neon.com/docs/manage/projects).","name":"Project"},{"description":"These methods allow you to create and manage branches in your Neon project. For related information, see [Manage branches](https://neon.com/docs/manage/branches).","name":"Branch"},{"description":"These methods allow you to create and manage compute endpoints in your Neon project. For related information, see [Manage compute endpoints](https://neon.com/docs/manage/endpoints).","name":"Endpoint"},{"description":"These methods allow you to create and manage snapshots.","name":"Snapshot"},{"description":"These methods allow you to inspect Neon regions.","name":"Region"},{"description":"These methods allow you to manage your Neon user account.","name":"Users"},{"description":"These methods allow you to view consumption details for your Neon account.","name":"Consumption"},{"description":"These methods allow you to manage your Neon organizations.","name":"Organizations"},{"description":"These methods allow you to create and manage Neon Auth projects.","name":"Auth"},{"description":"These methods allow you to create and manage Neon Auth projects. Deprecated. See routes with the `Auth` tag instead.","name":"Auth (legacy)"},{"description":"These methods allow you to inspect branchable object storage state for Neon branches.","name":"Storage"},{"description":"These methods allow you to create and manage branchable object storage buckets and their objects.","name":"Buckets"},{"description":"These methods allow you to create and manage functions on your Neon branches.","name":"Functions"},{"description":"These methods allow you to inspect the AI Gateway endpoint for your Neon branches.","name":"AI Gateway"},{"description":"These methods allow you to query logs emitted by services running on your Neon branches.","name":"Logs"},{"description":"These methods allow you to issue and manage scoped credentials on your Neon branches.","name":"Credentials"}]}