Subscriber API
REST endpoints for subscriber operations.
Subscriber API
All subscriber endpoints require a valid JWT with role: "subscriber" in the
Authorization: Bearer <token> header.
Subscriptions
Register a subscription
After creating the on-chain subscription PDA, register it in the database so the Keeper can track it:
List my subscriptions
Get subscription details
List subscription transactions
Response format
All API responses follow a consistent envelope:
Error responses:
Error codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid authentication |
FORBIDDEN | 403 | Insufficient permissions for this endpoint |
NOT_FOUND | 404 | Resource does not exist |
VALIDATION_ERROR | 400 | Request body failed validation |
CONFLICT | 409 | Resource already exists |
INTERNAL_ERROR | 500 | Server error |