watchup-react
v1.0.0
Published
Watchup SDK for React and Next.js
Maintainers
Readme
Watchup SDK Routes
This document outlines the routes used by the @watchup/react SDK and other active routes available on the Watchup backend.
Base Configuration
- Base URL:
https://watchup-server.vercel.app - Headers Required for SDK Requests:
X-Watchup-Project: Your Project IDX-Watchup-Key: Your API Key
Active Routes
System / Authentication
| Method | Endpoint | Description |
| :--- | :--- | :--- |
| POST | /system/sdk/auth | Authenticates the SDK client. Checks subscription status and returns user/project details. |
| GET | /system/api-key | Retrieves the API key for the current user (requires session). |
| POST | /system/api-key | Creates or regenerates an API key for the current user (requires session). |
V1 API (Monitors & Events)
| Method | Endpoint | Description |
| :--- | :--- | :--- |
| POST | /v1/capture | Captures runtime errors, promise rejections, and React render errors from the SDK. (Assumed endpoint for event ingestion) |
| POST | /v1/monitors | Creates a new uptime monitor. |
| GET | /v1/monitors | Lists all uptime monitors for the project. |
| DELETE | /v1/monitors/<monitor_id> | Deletes a specific uptime monitor. |
SDK Internal Behavior
The @watchup/react SDK automatically handles the following interactions:
- Initialization: Calls
POST /system/sdk/authon mount to verify credentials. - Error Capture: Calls
POST /v1/capturewith error details when an exception occurs.
Note: All SDK requests fail silently if the backend is unreachable to prevent impacting the host application.
