Skip to main content

Welcome to TalentG API

The TalentG API provides comprehensive access to all platform features including lead management, assessments, user administration, payments, and analytics. Built with Next.js API routes and Supabase as the backend, our API follows RESTful conventions and provides secure, scalable access to your talent management needs.

API Base URL

https://talentg.vercel.app/api

Authentication

All API endpoints require authentication using Supabase JWT tokens obtained through user login.
Authorization: Bearer <supabase_jwt_token>
Content-Type: application/json

Getting Started

  1. Authenticate your users through the TalentG login system
  2. Obtain JWT tokens from Supabase authentication
  3. Include tokens in all API requests using the Authorization header
  4. Handle token refresh automatically using Supabase client libraries

API Categories

Response Format

All API responses follow a consistent format:
{
  "success": true,
  "data": {
    // Response data
  },
  "meta": {
    // Pagination/metadata when applicable
  }
}
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {
      // Additional error context
    }
  }
}

Rate Limiting

API requests are rate limited to ensure fair usage:
  • Authenticated users: 1000 requests per hour
  • Unauthenticated requests: 100 requests per hour
  • Bulk operations: 10 requests per minute
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

SDK Examples

const apiRequest = async (endpoint, options = {}) => {
  const token = await getSupabaseToken();

  const response = await fetch(`/api${endpoint}`, {
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json',
      ...options.headers
    },
    ...options
  });

  return response.json();
};