Skip to main content
The IP allowlist controls which client networks can connect to a database through PgBouncer on port 6432. It does not affect dashboard or API access.
  • An empty allowlist accepts connections from any IP address.
  • As soon as the list has one or more entries, only matching networks can connect.
  • Removing the last entry opens the database to any IP again.
Selected-database keys can use these routes for databases they are assigned to; full-account keys for any database you own. API access requires a Pro or Business plan.

List entries

GET /api/v1/databases/{id}/network/allowlist
200 OK

Add an entry

POST /api/v1/databases/{id}/network/allowlist The prefix is required; a bare IP address is rejected. DBHost stores the CIDR as you send it, after trimming whitespace.
201 Created
Adding a CIDR that is already on the list returns 200 OK with the message Allowlist entry already exists. and the existing entry. The existing label is not changed. The new list is applied before the request returns. If DBHost cannot apply it, the request fails and the entry is not saved.

Remove an entry

DELETE /api/v1/databases/{id}/network/allowlist/{entryId} entryId is the id from the list or add response. On success the route returns 204 No Content with an empty body.

Errors

During maintenance the body is {"error":"MAINTENANCE","message":"..."} instead of the standard error envelope. The dashboard manages the same list in the Allowed IPs section on the Access tab; see Databases. The CLI equivalents are dbhost network list|add|remove.