https://plainrouter.com/api/v1. The signed OpenAPI contract describes the same operations used by generated SDKs and command-line clients.
For one fetchable comparison of REST, SDK, CLI, MCP, and management credentials,
see Authentication and clients.
Choose an interface
The signed REST contract, TypeScript SDK, Python SDK, Go SDK, and CLI are published at version
0.5.0. See Client releases for the CLI’s command boundary.
Authenticate
Every request needs the per-Signal tracker secret issued during tracker provisioning:Submit an event
Send a stableevent_id so retries are idempotent. Money values use decimal strings to preserve their exact representation.
202. A retry with the same event ID returns HTTP 200 with duplicate: true.
POST /events request must include consent_basis. Use consent only with granted downstream advertising state. legitimate_interest is restricted to allowlisted lifecycle events and does not create an attributed advertising join.
Verify Signal ingestion
The verification operation proves that the authenticated Signal can write to the event ledger without sending identity or destination data:202; a repeat returns 200 with duplicate: true. The request has no body. See Verify Signal ingestion for the onboarding workflow and MCP alternative.
Available operations
SDKs and CLI clients derive their method and command names from these semantic operation IDs:
Resource IDs remain scoped to the authenticated Signal tracker. A client cannot use its secret to read another tracker’s events or destinations.
Use the signed OpenAPI contract
Download or import the canonical contract from:3.1.0, publishes API version 0.5.0, and includes x-signed: true. PlainRouter serves the reviewed bytes with an ETag so automated tooling can detect a new contract without downloading an unchanged document.
Generate clients only from a signed document. Pin the generated SDK or CLI version in production and review contract changes before updating it.
Client releases
The TypeScript package@plainrouter/sdk@0.5.0, Python package plainrouter==0.5.0, and Go module github.com/plainrouter/sdk-go@v0.5.0 are generated from the signed ten-operation contract. All three expose ingestion verification and the required event consent fields.
The CLI @plainrouter/cli@0.5.0 uses the current TypeScript SDK and can send the consent-aware event shape. Install it with npm install --global @plainrouter/cli@0.5.0 or brew install plainrouter/tap/plainrouter. It exposes nine terminal commands but does not add a command for verifySignalIngestion; use an SDK, direct REST, or MCP for that operation.
Handle errors
Validation responses include a message and field-level errors. Treat
401 as a stopped credential and avoid retrying it indefinitely.