Skip to main content
COMPASS API

Welcome to COMPASS API

COMPASS is a comprehensive transportation management system that provides powerful APIs for managing users, departments, email analytics, customer support tickets, permissions, and audio transcription services.

Getting Started

This documentation provides complete reference information for all COMPASS API endpoints, including detailed request/response examples, authentication requirements, and best practices for integration.

Quick Start

  1. Authentication: All API calls require a valid JWT token
  2. Base URL: http://localhost:2000
  3. Content Type: application/json for most endpoints
  4. Rate Limiting: Check specific endpoints for any rate limits

API Overview

Core Services

Authentication Flow

Key Features

Secure Authentication

  • OAuth 2.0 integration with Google and Microsoft
  • JWT-based session management
  • Role-based access control
  • Admin-only endpoints protection

Comprehensive User Management

  • User profile management
  • Department assignment and role management
  • Permission-based access control
  • Account linking and matching

Department Organization

  • Hierarchical department structure
  • User assignment and manager roles
  • Department-based permissions
  • Organizational analytics

Advanced Email Analytics

  • Real-time email monitoring
  • Performance metrics and SLA tracking
  • Agent productivity analytics
  • Client domain insights
  • Hourly and trend analysis

Customer Support Integration

  • HubSpot ticket management
  • Advanced filtering and search
  • Multi-format export capabilities
  • Real-time ticket processing

Audio Transcription

  • Automated speech-to-text conversion
  • Multi-language support
  • Confidence scoring and segmentation
  • Transcription management

Making Your First API Call

1. Authenticate

2. Use Your Token

Response Format

All API responses follow a consistent format:

Success Response

Error Response

HTTP Status Codes

SDK and Libraries

While we don’t provide official SDKs yet, our RESTful API is designed to work seamlessly with any HTTP client library:
  • JavaScript/Node.js: fetch, axios
  • Python: requests
  • Java: OkHttp, Retrofit
  • C#: HttpClient
  • Ruby: Net::HTTP

Rate Limiting

API calls are subject to rate limiting to ensure fair usage:
  • Standard endpoints: 1000 requests per hour
  • Authentication endpoints: 100 requests per hour
  • Export endpoints: 50 requests per hour
Rate limit headers are included in all responses:

Best Practices

Security

  • Always use HTTPS in production
  • Store JWT tokens securely
  • Implement token refresh logic
  • Validate all input data

Performance

  • Use appropriate pagination
  • Cache static data when possible
  • Implement retry logic for failed requests
  • Monitor API usage and optimize

Error Handling

  • Always check HTTP status codes
  • Handle rate limit responses gracefully
  • Implement exponential backoff for retries
  • Log errors for debugging

Support

  • Documentation: This comprehensive guide
  • Status Page: Check system status
  • Support Email: support@example.com
  • GitHub: Report issues and contribute

What’s Next?

  1. Explore Authentication: Learn about our OAuth integration
  2. Browse APIs: Discover all available endpoints
  3. Try Examples: Use our code samples to get started
  4. Build Integration: Start building with COMPASS API
Ready to dive in? Check out our Authentication Guide to get started with secure API access.