Skip to main content

API Architecture

The SkyTeam ROBLOX API is built with Express.js and provides RESTful endpoints for managing airlines, flights, users, and miles. All routes are protected with API key authentication except for the /health endpoint.

Base URL

http://localhost:4000
In production, this will be your deployed API server URL.

Technology Stack

  • Framework: Express.js with TypeScript
  • Database: PostgreSQL with Drizzle ORM
  • Security: Helmet.js for HTTP headers, CORS enabled
  • Authentication: API key-based authentication via x-api-key header

Request Format

All requests should include:
x-api-key
string
required
Your airline’s API key for authentication. Required for all endpoints except /health.
Content-Type
string
default:"application/json"
Set to application/json for POST requests with body data.

Example Request

curl -X GET https://api.skyteam.dev/airline \
  -H "x-api-key: your_api_key_here"

Response Format

All API responses return JSON data with appropriate HTTP status codes.

Success Response

{
  "ok": true,
  "data": { ... }
}

Error Response

{
  "error": "Error message description"
}

HTTP Status Codes

200
OK
Request succeeded
400
Bad Request
Invalid request parameters or insufficient miles
401
Unauthorized
Missing or invalid API key
404
Not Found
Resource not found (flight, user, product, etc.)
500
Internal Server Error
Server error occurred

Rate Limiting

Currently, there are no rate limits enforced. However, please be considerate with your API usage.

Error Handling

The API includes global error handling middleware that catches unhandled errors and returns a 500 status code with a generic error message:
{
  "error": "Internal Server Error"
}
Detailed error messages are logged server-side for debugging.

Build docs developers (and LLMs) love