Skip to content

Platform API

Getting Started ​

Make your first authenticated request against the Platform API in a few minutes.

Prerequisites ​

PAPI has no self-service signup yet. To integrate you need an API key and secret, provisioned by a platform operator using the internal papi:create-key script. The secret is shown once at creation time and can never be retrieved again. See API Keys & Scopes for how provisioning and rotation work.

Base URL ​

PAPI is served on its own listener, separate from the platform's main application, configured via the PAPI_HOST / PAPI_PORT environment variables in each deployment. Ask your platform contact for the base URL of the environment you're integrating against.

Your first request ​

Every PAPI request must carry four headers computed from an HMAC-SHA256 signature. The full scheme is described in Authentication. The easiest way to see it work end-to-end is against POST /v1/healthcheck, which has no side effects beyond the usual per-request bookkeeping (nonce consumption, updating the key's last-used timestamp) and simply echoes back what it received:

http
POST /v1/healthcheck
x-api-key: <your api key>
x-timestamp: <unix ms>
x-nonce: <unique per request>
x-signature: <hex hmac-sha256>
Content-Type: application/json

{}

A successful call returns:

json
{
  "status": "ok",
  "serverTimestamp": 1760000000000,
  "requestTimestamp": "1760000000000",
  "nonce": "client-nonce"
}

Worked example (Node.js) ​

ts
import { createHash, createHmac, randomUUID } from 'node:crypto';

const apiKey = process.env.PAPI_API_KEY!;
const secret = process.env.PAPI_SECRET!;
const baseUrl = process.env.PAPI_BASE_URL!;

const method = 'POST';
const path = '/v1/healthcheck';
const body = '{}';

const timestamp = Date.now().toString();
const nonce = randomUUID();
const bodySha256 = createHash('sha256').update(body).digest('hex');

const canonical = [timestamp, nonce, method.toUpperCase(), path, bodySha256].join('\n');
const signature = createHmac('sha256', secret).update(canonical).digest('hex');

const response = await fetch(`${baseUrl}${path}`, {
  method,
  headers: {
    'content-type': 'application/json',
    'x-api-key': apiKey,
    'x-timestamp': timestamp,
    'x-nonce': nonce,
    'x-signature': signature,
  },
  body,
});

console.log(await response.json());

See Authentication for the full canonical string rules (query strings, empty bodies, method casing).

Next steps ​