Introduction
The OpenSight API is a RESTful API that allows you to programmatically access and manage your brand monitoring, competitor analysis, and content generation workflows. All API endpoints are accessed viahttps://your-domain.com/api and return JSON responses.
Base URL
All API requests should be made to:localhost:3000 with your deployed API domain.
API Structure
The API is organized into the following resource groups:- Authentication (
/api/auth) - User registration, login, OAuth flows - Users (
/api/users) - User profile management - Brands (
/api/brands) - Brand configuration and settings - Prompts (
/api/brands/:brandId/prompts) - AI prompt templates - Competitors (
/api/brands/:brandId/competitors) - Competitor tracking - Content (
/api/content) - Content generation and management - Notifications (
/api/notifications) - Alert preferences - API Keys (
/api/api-keys) - API key management - Webhooks (
/api/webhooks) - Webhook configuration
Request Format
Headers
All API requests should include the following headers:Body
Request bodies should be sent as JSON:Response Format
All responses are returned in JSON format with appropriate HTTP status codes.Success Response
Error Response
Error responses follow a consistent format:HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
200 | OK - Request succeeded |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request parameters or validation error |
401 | Unauthorized - Missing or invalid authentication token |
403 | Forbidden - Insufficient permissions or plan limit reached |
404 | Not Found - Resource not found |
409 | Conflict - Resource already exists (e.g., duplicate email) |
500 | Internal Server Error - Server error |
503 | Service Unavailable - Service not configured |
Common Error Scenarios
All error messages are returned in a consistent
{"error": "message"} format for easy parsing and handling.Authentication Errors
Resource Errors
Validation Errors
Rate Limiting
API requests are subject to rate limiting based on your plan tier. Rate limit information is included in response headers:Health Check
You can check the API status using the health endpoint:Interactive API Documentation
OpenSight provides an interactive Swagger UI for exploring and testing API endpoints:Next Steps
Authentication
Learn how to authenticate your API requests
API Endpoints
Explore available API endpoints