Skip to main content

Welcome to FeedbackAI API

The FeedbackAI API provides comprehensive programmatic access to all platform features including user management, question sets, test assignments, AI evaluations, and interview sessions.

Base URL

https://your-domain.com/api
For local development:
http://localhost:3000/api

Key Features

User Management

Create and manage users with role-based permissions (Admin, Interviewer, Candidate)

Question Sets

Create and manage mixed question types including coding and short answer questions

Test Assignments

Assign tests to candidates and track progress and results

AI Evaluation

Leverage OpenAI for intelligent code evaluation and feedback generation

Authentication

The FeedbackAI API uses Clerk for authentication. Most endpoints require authentication via session tokens.

Getting Started

  1. Sign Up: Create an account through the web interface
  2. Get Session Token: Authenticate via Clerk to receive a session token
  3. Include Token: Include the token in the Authorization header
fetch('/api/users', {
  headers: {
    'Authorization': `Bearer ${sessionToken}`,
    'Content-Type': 'application/json'
  }
})

Role-Based Access

API endpoints enforce role-based permissions:
RolePermissions
AdminFull access to all endpoints
InterviewerQuestion management, test assignment, result viewing
CandidateLimited to assigned tests and personal results

Rate Limiting

API requests are rate-limited to ensure fair usage:
  • Free Tier: 1000 requests/hour
  • Pro Tier: 10000 requests/hour
  • Enterprise: Custom limits

Error Handling

All API responses follow a consistent error format:
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request parameters",
    "details": {
      "field": "email",
      "issue": "Must be a valid email address"
    }
  }
}

Common Error Codes

  • UNAUTHORIZED (401): Invalid or missing authentication
  • FORBIDDEN (403): Insufficient permissions
  • NOT_FOUND (404): Resource not found
  • VALIDATION_ERROR (400): Invalid request data
  • RATE_LIMITED (429): Too many requests

Response Format

Successful API responses follow this structure:
{
  "success": true,
  "data": {
    // Response data here
  },
  "meta": {
    "page": 1,
    "limit": 10,
    "total": 100
  }
}