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

# API reference

> Every endpoint an API key can call, grouped by resource.

Each endpoint page shows the **scope** it requires, whether it needs an
[`Idempotency-Key`](/concepts/idempotency), its request and response schemas, and the errors it can return. Use the
playground on each page to send a real request with your key.

All endpoints are served from `https://api.pineyard.ai` and authenticated with `Authorization: Bearer pk_live_…`.

## Public API (v1)

`/v1` is the stable integration surface: manage campaigns, push leads into a running API campaign, and collect
one immutable result per lead. Keys issued without scopes can call every `/v1` endpoint. Scoped keys need the scope
shown on each page.

## Workspace API

The other groups are the endpoints the Pineyard dashboard itself uses. They need a [scoped API key](/concepts/scopes).
Request bodies are exactly what the dashboard sends.

Some groups depend on features that are enabled per workspace or plan, such as chatbots, speech analysis,
commerce analytics, workflows and business intelligence. Pages in those groups say so. When a feature is off, the
endpoint is refused (see [Errors](/concepts/errors)).

## Agents

Agent responses never contain prompt text for API keys on `/v1/agents`, `POST /agents`, `PATCH /agents/{id}` and
`POST /agents/{id}/duplicate`: `prompt` is an empty string and `studioConfig` is `null`. On `GET /agents` and
`GET /agents/{id}`, workspaces that have prompt visibility enabled receive the prompt. When prompt visibility is off,
`PATCH /agents/{id}` ignores `prompt` and `studioConfig` in the request body.

Voice IDs for agents come from `GET /voices`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.