Skip to main content

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 via https://your-domain.com/api and return JSON responses.

Base URL

All API requests should be made to:
For production deployments, replace 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:
For validation errors (Zod schema validation):

HTTP Status Codes

The API uses standard HTTP status codes:

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:
Response:

Interactive API Documentation

OpenSight provides an interactive Swagger UI for exploring and testing API endpoints:
This interface allows you to test endpoints directly from your browser with full request/response examples.

Next Steps

Authentication

Learn how to authenticate your API requests

API Endpoints

Explore available API endpoints