---
name: pijon-notifications
description: Integrate Pijon notifications into a project or configure a local coding agent to notify an approved recipient on requested events. Use for Pijon sending, image uploads, retry handling, and integration diagnosis; account setup and subscription approval use the Pijon app.
metadata:
  version: "1.0.0"
---

# Pijon notifications

Support the user's requested notification workflow using the existing project or agent environment. Official discovery: https://pijon.fyi/llms.txt. API: https://api.pijon.fyi/api/v1. Technical content is English; respond to the user in their preferred language.

## Choose the requested workflow

- **Project integration:** inspect the project, find the requested event boundary, and implement a small server-side sender using its existing HTTP stack. Keep sending failure from turning an already successful business operation into a failure unless the user asks for that coupling. Do not invent new product events or replace the application's architecture.
- **Agent notifications:** inspect the agent's supported skill location and explicit hook capabilities. Install this complete folder in that agent's documented skill location, respecting repository instructions. Configure only the events the user requested. If no automatic hook exists, make an explicitly invoked notification workflow and explain that automatic triggers are not installed. Do not claim a background monitor, scheduler, or hook exists merely because this skill was installed.

## Establish prerequisites

Read [Quickstart](references/quickstart.md) and [Authentication](references/authentication.md). Check for configured values without printing their secrets: `PIJON_API_KEY`, `PIJON_APPLICATION_ID`, `PIJON_RECIPIENT_ID`, and optional `PIJON_API_BASE_URL` (default above). Use `PIJON_IDEMPOTENCY_KEY` for each logical send; persist the same value and payload for its retries.

Ask once for missing non-secret configuration or direct the user to account setup. Never ask them to paste a key/password into chat. Have the user store the application key in the relevant secret environment. Application creation/key issuance, recipient discovery, and History/Inbox require account authentication; a script key cannot perform them. Recipients must approve the application and categories, including self-notifications. Use [Recipients](references/recipients.md).

Both `test` and `live` keys can send real messages and consume usage. There is no public sandbox or dry-run endpoint. Account/client availability and production-device delivery remain release prerequisites, not assumptions. Stop only the dependent live step when these are missing; continue authorized local implementation and mocked verification.

## Implement and verify

Read [Sending](references/sending.md) for payloads/images and [Reliability](references/reliability.md) before adding retries. The bundled [OpenAPI](references/openapi.json) covers only `POST /notifications` and `POST /attachments`. Adapt [Examples](references/examples.md), or use `scripts/send.mjs` with Node.js 22+ for a bounded, secret-free sender. Other bundled scripts are single-request examples.

For one logical event, freeze the payload and identity before the first request. Retry only transient errors within a bounded attempt/time budget, preserve identity, and honor Retry-After. Do not blindly retry auth/validation/conflict errors or re-upload on every send retry. Do not put keys in frontend bundles, prompts, logs, or committed files. Use [Troubleshooting](references/troubleshooting.md) for rejected/ambiguous outcomes.

Use local mocked HTTP tests first. Send a real notification only within the user's authorized scope, to the approved recipient, with the agreed test content. An integration request does not authorize contacting additional recipients or enabling ongoing notifications beyond the requested events. Existing authorization is sufficient; do not add repeated confirmation gates.

Record the notification ID and replay flag. `202` proves durable API acceptance; `200` with `replayed: true` recovers an existing send. Have the account holder inspect History/Inbox when needed. Only report device receipt/display/read when that evidence exists. Report an ambiguous transport result as unknown and retain its key.

Finish with changed files, configuration variable names (no values), tests run, integration/hook state, and the highest verified delivery layer plus any remaining prerequisite. Do not claim end-to-end success from mock tests or API acceptance alone.

## Version and offline use

This package is version 1.0.0 for API v1. `manifest.json` contains hashes of bundled references and scripts. References/examples are generated from the same published documentation. Prefer official current documents when online; if they conflict with the bundle, inspect current official behavior before making a live request. Offline work may use the bundle for implementation/tests but cannot establish current service availability.
