BetterRewardsDocs
Open app
Browse guides

The protocol

Signed, versioned HTTP between an instance and the network.

1 min read · For companies

Every machine-to-machine request between an instance and the network carries the instance id, a Unix timestamp, an idempotency key and an Ed25519 signature over:

METHOD\npath?query\ntimestamp\nidempotency-key\nsha256(body)

Requests older or newer than five minutes are rejected, and each idempotency key is accepted once. Messages are strict: unknown fields are rejected.

EndpointDirectionPurpose
POST /v1/oauth/tokenInstance → NetworkExchange a PKCE OAuth code for an instance registration
POST /v1/instances/registerInstance → NetworkRegister with a one-time code; signed by the new key
POST /v1/instances/keysInstance → NetworkRotate the instance key
DELETE /v1/instances/selfInstance → NetworkDisconnect
PUT /v1/listingsInstance → NetworkReplace the instance's listings
PUT /v1/partner-indexInstance → NetworkOptional zero-PII HMAC email hashes for matching existing partners
GET /v1/applications?cursor=Instance → NetworkPull new applications
POST /v1/applications/:id/decisionInstance → NetworkApprove or reject
POST /v1/reportsInstance → NetworkDaily counts
GET /api/network/v1/partners/:profileId/summaryNetwork → InstanceLive earnings and link summary for one already-linked partner (signed by the network)
POST /api/network/ssoBrowser form POSTOne-click partner sign-in via a single-use network-signed assertion (owners and admins are blocked)
GET /.well-known/betterrewards-network.jsonInstance → NetworkThe network's public key for verifying signatures and assertions

Types and the client live in packages/protocol of the betterrewards repository.