API Overview
Introduction to the Semaphor API
Introduction
The Semaphor API provides programmatic access to Semaphor's embedded analytics platform. With our RESTful API, you can manage dashboards, generate authentication tokens, and integrate Semaphor analytics into your applications.
Base URL
All API requests should be made to:
Authentication
Most API endpoints require authentication using your dashboard credentials. You'll need:
- Dashboard ID: A unique identifier for your dashboard
- Dashboard Secret: A secure key for authenticating API requests
Security
Never expose your dashboard secret in client-side code. Always use server-side authentication for production applications.
Rate Limits
The Semaphor API implements rate limiting to ensure fair usage:
- Token Generation: 100 requests per minute per dashboard
- Dashboard Operations: 1000 requests per minute per dashboard
- General API: 5000 requests per minute per account
Rate limit headers are included in all responses:
Response Format
All API responses are returned in JSON format with the following structure:
Error responses follow this format:
HTTP Status Codes
The API uses standard HTTP status codes:
200
- Success201
- Created400
- Bad Request401
- Unauthorized403
- Forbidden404
- Not Found429
- Too Many Requests500
- Internal Server Error
SDKs and Libraries
While you can use any HTTP client to interact with the Semaphor API, we provide official SDKs for popular languages:
- JavaScript/TypeScript: semaphor npm package
- Python: Coming soon
- Go: Coming soon
Getting Started
- Get your credentials from the Semaphor Console
- Generate an authentication token using the Token API
- Start building with our Dashboard API
For detailed information about specific endpoints, see the sections below.