Quickstart

Quickstart setup

Install the SDK, authenticate, and make your first request to the Pierflow API in under five minutes.

Install the SDK#

Pierflow ships an official Node SDK. A Python SDK is on the way; in the meantime, every endpoint is callable directly over HTTPS.

terminal
bash
npm install @pierflow/node

Authenticate#

Set your sandbox secret key as PIERFLOW_KEY in your environment. The SDK reads it automatically.

server.ts
ts
import Pierflow from '@pierflow/node';

const pf = new Pierflow({
  apiKey: process.env.PIERFLOW_KEY,
  environment: 'sandbox', // or 'production'
});

Make your first call#

List the plans available in the sandbox. The response includes a value_score on every plan — the platform's AI ranking signal.

list-plans.ts
ts
const plans = await pf.plans.list({ budget_ngn: 120000 });

console.log(plans[0]);
// {
//   plan_id: 'pf_plan_01HX...',
//   name: 'Silver Plan',
//   value_score: 88,
//   ...
// }

Prefer curl?

Every endpoint is plain JSON over HTTPS:
bash
bash
curl https://sandbox.api.pierflow.com/v1/plans?budget_ngn=120000 \
  -H "Authorization: Bearer $PIERFLOW_KEY"