API Reference
API Overview

API Overview

The MyNATCA platform provides a comprehensive REST API ecosystem consisting of three main APIs that work together to power member management, Discord integration, and data synchronization across the entire platform.

API Ecosystem

🎯 MyNATCA API

The core platform API that powers the member portal, authentication, and user management systems.

Key Features:

  • Member Portal Integration - Account registration and profile management
  • Auth0 Authentication - Secure OAuth 2.0 / OpenID Connect authentication
  • Swagger Documentation - Interactive API testing and documentation
  • Member Data Management - Complete member information and organizational data

Base URL: https://my.natca.org/api 📖 View MyNATCA API Documentation →

🤖 Discord Bot API

Powers the MyNATCA Discord integration with member verification and role management.

Key Features:

  • Member Verification System - Automated Discord account verification
  • Role Management - Automatic role assignment based on member data
  • Webhook Integration - Real-time updates for member data changes
  • Administrative Tools - Manual verification and member management

Base URL: https://discord.mynatca.org/api 📖 View Discord Bot API Documentation →

🔄 Platform API

Handles data synchronization, administrative functions, and integration services.

Key Features:

  • Interactive Swagger Documentation - OpenAPI 3.0 with "Try it out" functionality
  • Data Synchronization - MySQL to Supabase real-time sync
  • Health Monitoring - System health and performance tracking
  • Administrative Functions - Platform management and statistics
  • Integration Services - Cross-platform data access and management

Base URL: https://platform.natca.org/api Swagger UI: https://platform.natca.org/api-docs (Development: http://localhost:1300/api-docs) 📖 View Platform API Documentation →

Common Authentication Patterns

All MyNATCA APIs use consistent authentication patterns:

Authorization Headers

# Service-to-service authentication
Authorization: Bearer <service_token>
 
# User authentication (Auth0 JWT)
Authorization: Bearer <auth0_jwt_token>
 
# Webhook authentication
X-Webhook-Secret: <webhook_secret>

Rate Limiting

All APIs implement rate limiting with consistent headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1640995200

Error Handling

All APIs use a consistent error response format:

{
  "success": false,
  "error": "ERROR_CODE",
  "message": "Human-readable error message",
  "details": {
    "field": "specific field that caused the error",
    "additional_info": "relevant context"
  },
  "timestamp": "2023-01-01T12:00:00.000Z",
  "request_id": "req_550e8400-e29b-41d4"
}

Development Resources

API Documentation

Interactive Testing

SDKs and Libraries

  • JavaScript/Node.js SDK - Available for all three APIs
  • Python SDK - Platform and MyNATCA API support
  • Webhook Libraries - Event handling and signature verification

Architecture Integration

The three APIs work together to provide a complete platform:

Member Portal (MyNATCA API)

Auth0 Authentication

Discord Verification (Discord Bot API)

Data Synchronization (Platform API)

Real-time Updates (Webhooks)

Data Flow

  1. Member Registration - Users register through MyNATCA API
  2. Authentication - Auth0 provides secure authentication tokens
  3. Discord Verification - Discord Bot API handles member verification
  4. Role Assignment - Automatic Discord role assignment based on member data
  5. Data Sync - Platform API keeps all systems synchronized
  6. Real-time Updates - Webhooks provide immediate updates across systems

Getting Started

For Developers

  1. Choose your API based on your integration needs
  2. Review the specific documentation for your chosen API
  3. Set up authentication using the appropriate method
  4. Test in development using the provided endpoints
  5. Implement error handling using the standard error format

For Administrators

  1. Monitor API health using the health endpoints
  2. Review API usage through administrative dashboards
  3. Manage rate limits and access controls
  4. Configure webhooks for real-time integrations

The MyNATCA API ecosystem is designed for reliability, security, and ease of integration. Each API serves a specific purpose while maintaining consistency across the entire platform.