PierNode
Getting Started

Authentication

How requests to the PierNode API are authenticated.

The PierNode API authenticates every request with an API key, sent as a bearer token:

Authorization: Bearer pn_your_api_key

A request with no key, a malformed key, or an unknown key is rejected with 401 Unauthorized. The response is identical in all three cases.

Getting a key

Generate your key from the API key section of the dashboard. Each account has one key.

The plaintext key is shown once, at the moment it is created. PierNode stores only a hash of it, so it cannot be shown again or recovered by support. Copy it somewhere safe before leaving the page. Afterwards the dashboard shows only a masked form, such as pn_••••••••••••a1b2.

Rotating a key

If a key is exposed, generate a new one from the dashboard. Rotation takes effect immediately: the previous key stops authenticating as soon as the new one is issued, with no grace period. Update your applications before rotating, or expect requests to fail until you do.

Keeping the key secret

An API key acts on behalf of your account and can spend its balance. Treat it like a password:

  • Send it only from your server, never from browser or mobile client code.
  • Keep it in an environment variable or a secret manager, not in source control.
  • Rotate it if you suspect it has leaked.

Verifying your key

GET /api/v1/me returns the account the key belongs to and its current balance. Use it to confirm your credentials are wired up correctly.

curl https://your-piernode-host/api/v1/me \
  -H "Authorization: Bearer $PIERNODE_API_KEY"
{
	"id": "the-account-id",
	"balance": "0.000000",
	"currency": "USD"
}

This is currently the only endpoint that accepts an API key. The generation endpoints do not exist yet.

On this page