Skip to main content
POST
/
organizations
/
{organization}
/
databases
/
{database}
/
branches
/
{branch}
/
bouncers
Create a bouncer
curl --request POST \
  --url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/branches/{branch}/bouncers \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "target": "<string>",
  "bouncer_size": "<string>",
  "replicas_per_cell": 123
}'
{
  "id": "<string>",
  "name": "<string>",
  "sku": {
    "name": "<string>",
    "display_name": "<string>",
    "cpu": "<string>",
    "ram": 123,
    "sort_order": 123
  },
  "target": "primary",
  "replicas_per_cell": 123,
  "created_at": "<string>",
  "updated_at": "<string>",
  "deleted_at": "<string>",
  "actor": {
    "id": "<string>",
    "display_name": "<string>",
    "avatar_url": "<string>"
  },
  "branch": {
    "id": "<string>",
    "name": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "deleted_at": "<string>"
  },
  "parameters": [
    {
      "id": "<string>",
      "namespace": "pgbouncer",
      "name": "<string>",
      "display_name": "<string>",
      "category": "<string>",
      "description": "<string>",
      "parameter_type": "array",
      "default_value": "<string>",
      "value": "<string>",
      "required": true,
      "created_at": "<string>",
      "updated_at": "<string>",
      "restart": true,
      "max": 123,
      "min": 123,
      "step": 123,
      "url": "<string>",
      "options": [
        "<string>"
      ],
      "actor": {
        "id": "<string>",
        "display_name": "<string>",
        "avatar_url": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

organization
string
required

The name of the organization that owns this resource

database
string
required

The name of the database that owns this resource

branch
string
required

The name of the branch that owns this resource

Body

application/json
name
string

The bouncer name

target
string

The type of server the bouncer targets

bouncer_size
string

The size SKU for the bouncer

replicas_per_cell
number

The number of replica servers per cell

Response

Returns the new bouncer

id
string
required

The ID of the bouncer

name
string
required

The name of the bouncer

sku
object
required
target
enum<string>
required

The instance type the bouncer targets

Available options:
primary,
replica,
replica_az_affinity
replicas_per_cell
number
required

The count of replicas in each cell

created_at
string
required

When the bouncer was created

updated_at
string
required

When the bouncer was updated

deleted_at
string
required

When the bouncer was deleted

actor
object
required
branch
object
required
parameters
object[]
required