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

# API Reference

> Every endpoint of the PeridotID API

The PeridotID API is versioned under `/v1` and grouped by concern:

* **Auth** — Google login, OAuth callback, token refresh, logout
* **Identity** — the stable per-user identity and its login credentials
* **Profile** — public profile data
* **Wallet** — the wallet associated with the PID
* **OpenAPI** — the machine-readable specification

## Base URL

All endpoints are prefixed with `/v1`.

| Environment | Base URL |
| - | - |
| Production | `https://api.peridot.id/v1` (canonical; `https://api.pid.peridotvault.com/v1` still serves — dual-serve) |
| Local dev | `http://localhost:3301/v1` |

## Authentication

Authentication is **cookie-based**. After Google sign-in the API sets two `HttpOnly` cookies:

* `pid_access` — short-lived JWT access token (15 min), sent on every request.
* `pid_refresh` — long-lived rotating refresh token (30 days), only sent to `/v1/auth`.

Browsers handle these automatically; non-browser clients must send
`Cookie: pid_access=<token>` on each request and call `/v1/auth/refresh` before the
access token expires.

Browse the endpoints in the sidebar, or read the raw
[OpenAPI 3.0 specification](https://api.peridot.id/v1/openapi.yaml) (also served at
`GET /v1/openapi.yaml` on either API host; a copy ships with these docs as `openapi.yaml`).


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