Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.promptingcompany.com/llms.txt

Use this file to discover all available pages before exploring further.

API overview

The Prompting Company API lets you manage your content programmatically through the same /api/v1 endpoints the dashboard uses, with the same ApiResult envelope and organization-scoped data model. Use the API when you need to sync site pages from a CMS, automate content operations, or build server-to-server workflows around your TPC workspace.

Base URL

https://app.promptingco.com
Local development uses:
http://localhost:3000
Every public endpoint lives under /api/v1.

Authentication at a glance

MethodUse it whenHow you send it
Session cookieYou are making first-party dashboard calls from the browser.The dashboard sends the better-auth.session_token cookie.
OAuth bearerYou are using the CLI or another OAuth client flow.Send Authorization: Bearer <token>.
API keyYou are building server-to-server integrations.Send x-api-key: <key>.
For integrations, create an organization API key from your dashboard settings and grant only the scopes your workflow needs.

Scope catalog

ScopeAllows
content:readRead site pages, markdown content, and llms.txt files
content:writeCreate, update, and delete site pages and content
prompts:readRead prompts, topics, and prompt analysis results
prompts:writeCreate, update, archive prompts
simulations:readRead agent-simulation tasks, runs, environments, and analytics
simulations:writeCreate and trigger simulation runs
logs:readRead AI-traffic logs and request-level audit events
analytics:readRead analytics aggregates, including rankings, mentions, sources, and SOV
products:readRead product metadata and competitor data
products:writeUpdate product settings and competitor lists
This table is intentionally copied from apps/client/src/lib/api/scopes.ts. When that catalog changes, update this page in the same PR so the docs and dashboard stay aligned.

Where to go next

Quickstart

Create a scoped key, make your first request, and parse the response envelope.

Authentication

Choose between session cookies, OAuth bearer tokens, and API keys.

Reference

Explore endpoint schemas generated from the live OpenAPI document.