---
title: API for PostgreSQL Database – Universal API
date: 2025-12-11T09:41:24Z
modified: 2026-01-28T05:21:10Z
permalink: "https://ezintegrations.ai/docs/use-api-for-postgresql-database/"
type: docs
status: publish
excerpt: ""
wpid: 3979
doc_category:
  - Universal API for Database
author: Automation Hub
---

The Universal API for PostgreSQL provides a single, unified interface to interact with PostgreSQL database instances. Using this API, developers can securely authenticate and execute SQL queries, including SELECT, INSERT, UPDATE, and DELETE, without managing database-specific connections. Leveraging OAuth 2.0 authentication, it simplifies data analytics, reporting, and schema operations while maintaining full control over your PostgreSQL database workflows.

---

## POST Token

**Endpoint:** `{{base_url}}/token`

This endpoint is used to retrieve an authentication token from the API. The token serves as an authorization mechanism to access and interact with all API endpoints.

### Body (form-data)

- **username:** {{Username}}
- **password:** {{Password}}

---

## POST – API for PostgreSQL

**Endpoint:**

{{base_url}}/universalAPI?db_name=PostgreSQL&db_version=All
The Universal API for PostgreSQL offers a streamlined interface for securely managing PostgreSQL databases. With this API, developers can authenticate via OAuth 2.0 and execute SQL queries, including SELECT, INSERT, UPDATE, and DELETE, without handling database-specific connection details. It simplifies database operations, accelerates data analytics, and allows seamless integration into applications while maintaining full control over PostgreSQL workflows.

### Authorization

OAuth 2.0

### Query Parameters

- **db\_name:** PostgreSQL
- **db\_version:** All

### Body (raw JSON)

{
  "username":"{{username}}",
  "password":"{{password}}",
  "query":"{{SELECT/INSERT QUERY}}",
  "schema_name":"{{schema_name}}",
  "hostname":"{{host_name}}",
  "portnumber":{{port_number}}
}

## Topics

**Docs Categories:** [Universal API for Database](https://ezintegrations.ai/wp-content/uploads/wp-mfa-exports/taxonomy/doc_category/universal-api-for-database.md)