---
title: "Create a new connection pool for service"
method: POST
path: "/project/{project}/service/{service_name}/connection_pool"
tags: ["Service:_PostgreSQL"]
---

# Create a new connection pool for service

`POST /project/{project}/service/{service_name}/connection_pool`

## Path parameters

- `project` string, required
- `service_name` string, required

## Request body

- ServicePGBouncerCreateRequestBody — ServicePGBouncerCreateRequestBody
  - `database` string, required — Service database name
  - `pool_mode` 'session' | 'transaction' | 'statement' — PGBouncer pool mode
  - `pool_name` string, required — Connection pool name
  - `pool_size` integer — Size of PGBouncer's PostgreSQL side connection pool
  - `username` string — Service username

## Response `200`

Response

- ServicePGBouncerCreateResponse — ServicePGBouncerCreateResponse
  - `errors` object[] — List of errors occurred during request processing
    - `message` string, required — Printable error message
    - `more_info` string — URL to the documentation of the error
    - `status` integer, required — HTTP error status code
  - `message` string — Printable result of the request

---

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