API Endpoints

Reference for all API endpoints available in your generated DevOur bundle. These endpoints are ready to use in your application.

Authentication

All endpoints except /health and /webhook/stripe require a valid Firebase authentication token in the Authorization header.

Authorization: Bearer <firebase-token>

Users

GET /api/users

Get the current authenticated user's profile.

GET /api/users/all

Get all users (admin only).

GET /api/users/registered

Check if the authenticated user is registered in the database.

POST /api/users/create

Create a new user record after Firebase authentication.

POST /api/users/validate

Validate a Firebase authentication token.

POST /api/users/{id}

Update a user's profile by ID.

POST /api/users/portal

Initialize a Stripe customer portal session. Returns a URL to redirect the user to manage their subscription, update payment methods, or view billing history.

Products

GET /api/products/all

List all active subscription products with their pricing and features.

GET /api/products/{id}

Get details for a specific product.

POST /api/products/payment-link

Create a Stripe payment link for a subscription. Used to initiate the checkout flow.

Mail

POST /api/mail/send-password-reset

Send a password reset email to the user.

POST /api/mail/send-email-verification

Send an email verification message to the user.

Webhooks

POST /webhook/stripe

Receives Stripe webhook events for subscription management. Configure this endpoint in your Stripe dashboard. See Webhooks for setup instructions.

Utility

GET /health

Health check endpoint. Returns OK if the server is running. No authentication required.

POST /api/contact

Contact form endpoint for user inquiries.