Skip to main content
The InsForge REST API provides direct HTTP access to all InsForge services. Use this when you need to integrate with languages or platforms without an official SDK.

Base URL

https://your-app.insforge.app

Authentication

All API requests require authentication via the Authorization header:

Bearer Token

Authorization: Bearer your-jwt-token-or-anon-key

Quick Start

# Register a new user
curl -X POST https://your-app.insforge.app/api/auth/users \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "securepassword123"}'

# Sign in and get token
curl -X POST https://your-app.insforge.app/api/auth/sessions \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "securepassword123"}'

# Use the token for authenticated requests
curl https://your-app.insforge.app/api/database/records/posts \
  -H "Authorization: Bearer your-jwt-token"

Response Format

Success Response

Data is returned directly in the response body:
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "email": "[email protected]",
  "createdAt": "2024-01-15T10:30:00Z"
}

Error Response

{
  "error": "ERROR_CODE",
  "message": "Human-readable error message",
  "statusCode": 400,
  "nextActions": "Suggested action to resolve the error"
}

Common HTTP Status Codes

StatusDescription
200Success
201Created
204No Content (for DELETE)
400Bad Request - Invalid input
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient permissions
404Not Found
409Conflict - Resource already exists
500Internal Server Error

Features

  • Database - PostgREST-style CRUD operations
  • Authentication - Email/password and OAuth authentication
  • Storage - File upload, download, and management
  • Functions - Invoke serverless edge functions
  • AI - Chat completions and image generation
  • Realtime - Channel management and message history (WebSocket for real-time)

API Reference