Skip to main content

Prerequisites

Before using the REST API, ensure you have:
  • A PG:AI account with API access enabled
  • An API key generated from Settings

Generating an API Key

1

Navigate to API Keys

Navigate to Settings → API Keys in PG:AI.
2

Generate a new key

Click Generate New Key.
3

Name and scope the key

Give the key a name (e.g. “CRM Sync”, “Data Warehouse”, “Internal Dashboard”). Set permission scope if applicable (read-only, read-write, or specific entity access).
4

Copy and store the key

Copy the key immediately - it won’t be shown again.
Store your API key securely. Do not commit it to source control or share it in plaintext.

Authentication

All API requests require an API key passed in the request header:
Authorization: Bearer YOUR_API_KEY
Or as a query parameter (not recommended for production):
GET /api/v1/companies?api_key=YOUR_API_KEY

Base URL

https://api.getpg.ai/v1
All endpoints are relative to this base URL.

Exploring the API

Swagger UI

The interactive API explorer is available at:
https://www.app.getpg.ai/api-docs
Swagger UI lets you:
  • Browse all available endpoints
  • See request/response schemas
  • Test endpoints with your API key directly in the browser
  • View example payloads

OpenAPI Specification

Download the full OpenAPI 3.0 spec:
  • JSON: https://api.getpg.ai/v1/openapi.json
  • YAML: https://api.getpg.ai/v1/openapi.yaml
Import into Postman, Insomnia, or any OpenAPI-compatible tool to auto-generate client code.

Quick Test

Verify your API key works with a simple request:
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.getpg.ai/v1/companies?limit=5
You should receive a JSON response with up to 5 company records from your workspace.

Rate Limits

API requests are rate-limited per key:
TierRequests/MinuteRequests/Day
Standard6010,000
Professional12050,000
EnterpriseCustomCustom
Rate limit headers are included in every response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1707600000
If you exceed the limit, you’ll receive a 429 Too Many Requests response. Back off and retry after the reset time.