PijonDocumentationOpen app โ†—
Pijon / GuidesRead Markdown

Authentication and configuration

Use an application-scoped bearer key from trusted server-side code, a CI secret store, or your local agent environment.

Endpoints and credentials

API base: https://api.pijon.fyi/api/v1. Send Authorization: Bearer <key> and Accept: application/json. JSON requests also need Content-Type: application/json. Image uploads use multipart and must let the HTTP client set the boundary.

Create the key inside the application's details in the account app. The secret is displayed only once. Its permissions must include notifications:send and the exact application:<ULID> scope; a generic * key cannot substitute for that application scope.

OperationSending keyAccount authentication
Send notification / upload imageSupported for its applicationAlso supported by the app
Create applications / issue or rotate keysNot supportedRequired
List approved recipientsNot supportedRequired
Read History, Inbox, or usageNot supportedRequired
Approve a subscriptionNot supportedThe recipient must approve

Do not copy a login session or ask a user for their password to automate account setup. Use the app for these prerequisites.

Environment variables

VariableMeaning
PIJON_API_BASE_URLFull base including /api/v1; official default is above.
PIJON_API_KEYSecret issued for the application.
PIJON_APPLICATION_IDApplication ULID matching that key.
PIJON_RECIPIENT_IDApproved receiving user's ULID.
PIJON_IDEMPOTENCY_KEYStable value for one logical event; reuse for its retries.

test and live are key labels. They do not select an isolated sandbox or disable delivery/accounting. There is no public dry-run endpoint. Local mock tests do not establish that credentials or delivery work in production.

Storage and rotation

Keep keys out of browser bundles, screenshots, logs, prompts, repository history, and public configuration. Read them at runtime. A frontend should call your own authenticated backend, which sends to Pijon. Keep local secret files ignored and deploy with your host's secret manager.

Rotation immediately revokes the old key. Update the configured secret after rotating in the app, then verify one authorized test send. Diagnose 401 as missing/invalid/revoked credentials and 403 as scope, account, application, or subscription rejection. See errors.