API Reference

The RecurrBase API is fully documented using OpenAPI 3.0. All endpoints, request/response schemas, and error codes are specified.


OpenAPI Specification

The complete OpenAPI spec is available at:

/docs/openapi.yaml

Version: 1.0.0
Base URL: https://api.recurrbase.xyz


Interactive Documentation

View and test the API interactively using Swagger UI:

https://recurrbase.xyz/api

Or use any OpenAPI-compatible tool like:


API Endpoints

Authentication

  • POST /auth/nonce - Get login nonce
  • POST /auth/verify - Verify signature and get JWT

Subscriptions

  • GET /subscriptions/status - Get subscription status
  • POST /subscriptions/renew - Manually renew subscription
  • POST /subscriptions/cancel - Cancel subscription

Webhooks

  • GET /webhooks - List webhook configurations
  • POST /webhooks - Create or update webhook
  • POST /webhooks/test - Send test webhook

API Keys

  • GET /api-keys/list - List all API keys
  • POST /api-keys/create - Create new API key
  • POST /api-keys/revoke - Revoke API key

Health

  • GET /health - Health check (public)

Authentication

Most endpoints require authentication using a JWT token obtained from /auth/verify.

Include the token in the Authorization header:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

For server-side integrations, use API keys instead:

Authorization: Bearer rbk_live_1234567890abcdef...

JWT tokens expire after 24 hours. API keys do not expire but can be revoked.


Error Responses

All endpoints return standard error responses:

{
  "error": "Error message",
  "details": { /* optional additional details */ }
}

Common HTTP status codes:

  • 200 - Success
  • 400 - Bad Request (invalid input)
  • 401 - Unauthorized (missing/invalid token)
  • 404 - Not Found
  • 500 - Internal Server Error

SDK Generation

Generate client SDKs for your preferred language using the OpenAPI spec:

TypeScript/JavaScript

openapi-generator-cli generate \
  -i docs/openapi.yaml \
  -g typescript-fetch \
  -o generated/recurrbase

Python

openapi-generator-cli generate \
  -i docs/openapi.yaml \
  -g python \
  -o generated/recurrbase-python

Go

openapi-generator-cli generate \
  -i docs/openapi.yaml \
  -g go \
  -o generated/recurrbase-go

Other Languages

The OpenAPI spec supports generation for:


Request/Response Examples

All endpoints include detailed examples in the OpenAPI spec. See the spec file or interactive docs for:

  • Request body examples
  • Response examples (success and error cases)
  • Schema definitions
  • Authentication requirements

Rate Limits

Currently, no rate limits are enforced. This may change in the future.

Rate limits will be announced before implementation. Monitor the API status page for updates.


Support

For API questions or issues:

  • Check the FAQ
  • Review endpoint-specific documentation
  • Open an issue on GitHub