API overview
Pi Durable Platform's HTTP surfaces (the management API, the OAuth endpoints and the probes), their conventions, and the reference generated from the OpenAPI document.
Pi Durable Platform serves everything from one origin, its APP_URL:
- The management API under
/v1, plus/auth/*and the probes/healthzand/readyz: everything the web app does, and the agent routes apps use. It's described by an OpenAPI 3 document that covers every route; a test in the product's repository fails if a served route is missing from it. The reference is generated from that document. - The OAuth endpoints under
/oauth/and/.well-known/: the authorization server apps use with OAuth Connect. They speak OAuth, not the/v1envelope, so they aren't in the OpenAPI document. See OAuth endpoints.
The agent gateway (port 8099, AGENTS_GATEWAY_ADDR) is a separate listener for agent runtimes only, and isn't an API for apps.
OAuth endpoints
Build apps
Conventions
- Authentication: a browser session (cookie) reaches every operation its person may use. Bearer credentials (service account keys
pdp_sa_…, personal API keyspdp_…, OAuth Connect tokenspdpat_…) reach the agent routes and a few readings; see which routes take which credentials. - Browser writes need
X-CSRF-Token(fromGET /v1/me) and a same-originOrigin. - Responses are
{"data": …}; errors are{"error": {"code", "message"}}. Every response carriesX-Request-ID. - Edits use revisions:
ETagon reads,If-MatchonPATCHand settingsPUTs (428if missing,412if stale). - Lists of users, teams, service accounts and audit entries page with
cursorandlimit, and search withq. - Not allowed reads as not found for agents, threads and teams the caller may not see.
- Rate limit:
REQUESTS_PER_MINUTEper person or service account,429 rate_limitedwithRetry-After.
The API may change between releases before 1.0. Each release's notes list changes.
The reference
The sidebar's Management API groups operations by area: health, sign-in, me, teams, admin, API keys, service accounts, agents (with threads and templates), models and usage, MCP servers, and OAuth consent and connected apps. Each page shows the operation's parameters, bodies, responses and example requests against https://agents.example.com. There's no "try it" button: the docs never call an install.
The reference is generated from openapi/pi-durable-platform.yaml, a copy of the product's api/openapi.yaml at v0.1.0.