> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpg.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> Integrate PG:AI intelligence into your applications and workflows via the REST API

The PG:AI API gives you programmatic access to account intelligence, territory data, contacts, content, and AI-powered insights. Use it to pull intelligence into your own tools, automate workflows, or build custom integrations.

## Base URL

```
https://api.getpg.ai/public-api/v1
```

## Quick Start

<Steps>
  <Step title="Get your API key">
    Generate an API key in **Settings > API Keys** within your PG:AI workspace.
  </Step>

  <Step title="Make your first request">
    ```bash theme={null}
    curl -X POST "https://api.getpg.ai/public-api/v1/accounts" \
      -H "x-api-key: your_api_key" \
      -H "Content-Type: application/json" \
      -d '{}'
    ```
  </Step>

  <Step title="Explore the endpoints">
    Browse the [API Reference](/api-reference) for interactive endpoint documentation, or read the guides below.
  </Step>
</Steps>

## Endpoint Reference

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api/authentication">
    API key setup, permissions, and error handling
  </Card>

  <Card title="Companies" icon="building" href="/api/companies">
    Company data, profiles, contacts, and tech stacks
  </Card>

  <Card title="Contacts" icon="user" href="/api/contacts">
    List and retrieve contacts with full profile data
  </Card>

  <Card title="Territories" icon="map" href="/api/territories">
    Territory management and company lists
  </Card>

  <Card title="Search" icon="magnifying-glass" href="/api/search">
    Unified semantic search across companies, contacts, and content
  </Card>

  <Card title="Organization" icon="gear" href="/api/organization">
    Organization settings and credit usage
  </Card>
</CardGroup>

## Available Endpoints

Endpoints marked `[BETA]` are stable for production use but may have minor changes before general availability. Endpoints marked `[ALPHA]` are early access and subject to change.

| Method  | Endpoint                                        | Maturity | Description                          |
| ------- | ----------------------------------------------- | -------- | ------------------------------------ |
| `POST`  | `/v1/accounts`                                  | GA       | Search for accounts                  |
| `POST`  | `/v1/companies`                                 | BETA     | Add a company (async enrichment)     |
| `GET`   | `/v1/companies/{company_id}`                    | GA       | Get company by ID                    |
| `GET`   | `/v1/companies/{company_id}/profile`            | GA       | Get customizable company profile     |
| `POST`  | `/v1/companies/{company_id}/contacts`           | GA       | Search company contacts              |
| `POST`  | `/v1/companies/{company_id}/contacts/search`    | GA       | Search contacts for a company        |
| `GET`   | `/v1/companies/{company_id}/graph`              | BETA     | Get company relevance graph          |
| `GET`   | `/v1/companies/{company_id}/relevance`          | BETA     | Get company relevance signals        |
| `GET`   | `/v1/companies/{company_id}/search`             | ALPHA    | Search documents about a company     |
| `GET`   | `/v1/companies/{company_id}/jobs`               | GA       | List job postings for a company      |
| `GET`   | `/v1/companies/{company_id}/alerts`             | GA       | List alerts for a company            |
| `GET`   | `/v1/companies/{company_id}/canvas`             | GA       | List canvases for a company          |
| `GET`   | `/v1/companies/{company_id}/events`             | BETA     | List monitoring events for a company |
| `GET`   | `/v1/companies/{company_id}/agent/sessions`     | BETA     | List agent sessions for a company    |
| `GET`   | `/v1/contacts`                                  | BETA     | List contacts                        |
| `POST`  | `/v1/contacts/search`                           | BETA     | Search contacts (workspace)          |
| `POST`  | `/v1/contacts/{contact_id}/enrich/contact_info` | BETA     | Enrich contact with phone/email      |
| `GET`   | `/v1/territories`                               | BETA     | List territories                     |
| `GET`   | `/v1/territories/{territory_id}`                | BETA     | Get territory by ID                  |
| `GET`   | `/v1/territories/{territory_id}/companies`      | BETA     | List territory companies             |
| `GET`   | `/v1/search`                                    | BETA     | Unified semantic search              |
| `GET`   | `/v1/agent/sessions`                            | BETA     | List workspace agent sessions        |
| `GET`   | `/v1/canvas`                                    | BETA     | List canvases (workspace)            |
| `GET`   | `/v1/canvas/templates`                          | GA       | List canvas templates                |
| `GET`   | `/v1/alerts`                                    | GA       | List alerts (workspace)              |
| `PATCH` | `/v1/alerts/{alert_id}`                         | GA       | Update alert status                  |
| `GET`   | `/v1/events`                                    | BETA     | List monitoring events (workspace)   |
| `GET`   | `/v1/jobs`                                      | GA       | List job postings (workspace)        |
| `GET`   | `/v1/filters`                                   | BETA     | Get filter metadata                  |
| `GET`   | `/v1/operations/{public_operation_id}`          | BETA     | Poll async operation status          |
| `GET`   | `/v1/organization/credits`                      | GA       | Get organization credits             |

## Rate Limits

API requests are rate-limited based on your plan. When you hit the limit, the API returns `429 Too Many Requests`. See the [Authentication](/api/authentication) page for details on rate limit headers.

## Interactive API Reference

The **API Reference** in the top navigation provides an interactive playground powered by our live OpenAPI specification. You can test endpoints directly from the docs with your API key.
