Developer mode
The /v1/dev surface — mint and manage dev API keys, download a tenant-aware typed SDK, generate custom-object types, and read your tier and usage.
Developer mode is the set of endpoints under /v1/dev that support building and running an integration against your workspace: scoped API keys with per-key usage, a downloadable typed SDK, custom-object type generation, and your tier/usage numbers in one place. It's the backend behind the in-app developer portal and the pact-dev local workflow.
Access
The /v1/dev routes require a valid tenant API key and are gated to owner / admin roles — you don't want a viewer minting or revoking keys. Every route derives tenant_id from the auth context; nothing accepts a tenant id from the request body.
API keys with per-key usage
The developer portal manages keys with a label and an optional scope_pattern on top of the base key model, and renders usage per key:
| Method & path | What it does |
|---|---|
GET /v1/dev/keys | List the caller's keys (metadata only) |
POST /v1/dev/keys | Mint a key — secret returned once |
GET /v1/dev/keys/{key_id} | Single-key detail |
PATCH /v1/dev/keys/{key_id} | Rename / relabel / re-scope |
POST /v1/dev/keys/{key_id}/rotate | Rotate the secret |
DELETE /v1/dev/keys/{key_id} | Revoke |
GET /v1/dev/keys/{key_id}/usage | Trailing-30-day usage histogram |
Keys can be minted for a live or test environment. Lifecycle (create / rotate / revoke) and the audit trail are shared with the core /v1/api-keys surface, so the two views stay consistent — see Get an API key.
Typed SDK download
Developer mode is where the TypeScript SDK comes from:
GET /v1/dev/openapi/typed.ts— a tenant-awarecreatePactClient(...)wrapper (~12 KB), served as a downloadable.tswith ano-storecache header.GET /v1/dev/custom-objects/types—pact-types.d.ts, the module-augmentation file for your custom fields.
Custom-object types are a baseline until custom fields ship
GET /v1/dev/custom-objects/types probes for a per-tenant custom_fields schema. Until that persistence lands for your workspace it returns an empty augmentation that still type-checks — the route body is the only thing that changes when real custom fields arrive, so your codegen wiring never has to.
Tier and usage
Read your plan and consumption from the same place you manage keys:
GET /v1/dev/tiers— the public tier catalogue (same shape as/v1/api-tiers/tiers).GET /v1/dev/usage— your current usage, aliased for dev workflows from/v1/api-tiers/usage.
Pair these with the rate limits headers on live responses to build a self-serve "how close am I to my budget" view.
Local environments registry
Developer mode also tracks where you're running Pact locally, so the dashboard can show active environments — that's covered in Developer mode (workspace).