Skip to main content

Welcome to Timbrix API

The Timbrix API is a REST API built with NestJS using Feature-Based Clean Architecture and CQRS pattern. It provides endpoints for managing organizations, members, webhooks, OAuth applications, and API keys.

OpenAPI Specification

View the complete OpenAPI 3.0 specification

Base URL

All API endpoints are served from:
http://localhost:3001/api
In production, replace with your production API URL.

Authentication

The API supports two authentication methods:

1. Bearer Token (Supabase Auth)

Used for management endpoints. Include the Supabase access token in the Authorization header:
Authorization: Bearer <supabase_access_token>

2. API Key

Used for programmatic access. Include your API key in the X-API-Key header:
X-API-Key: sk_...

Architecture

The API follows:
  • Feature-Based Clean Architecture: Organized by features (organizations, oauth, webhooks, users)
  • CQRS Pattern: Separates read (queries) and write (commands) operations
  • Domain Events: Decoupled side effects using event handlers
  • Row-Level Security: Organization-based multitenancy with PostgreSQL RLS

Rate Limiting

API requests are rate-limited to prevent abuse. Contact support if you need higher limits.

Error Responses

The API returns standard HTTP status codes:
StatusDescription
200Success
201Created
400Bad Request - Invalid input
401Unauthorized - Missing or invalid auth
403Forbidden - No permission
404Not Found
409Conflict - Resource already exists
500Internal Server Error
Error responses include a message with details:
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}

Next Steps

Organizations

Manage organizations and their settings

Members

Invite and manage organization members

Webhooks

Configure webhooks for event notifications

OAuth

Generate OAuth tokens for API access