Files
orangecat/docs/reference/api
CatoandClaude 6ce2f2d1fd fix(settings): Export my data holds what it promises, and settings copy says what the product does (#1703)
Measured on orangecat.ch (2026-11-12):
- "Export my data" promised "the data we store about you". GET
  /api/account/export returned ten tables (profile, Cat history, credits,
  preferences, sent messages) and nothing the person made: no pages,
  wallets, posts, follows, memberships, payments or notifications.
- "Delete all Cat conversations" sent people to "AI settings" for memories.
  Memories live on the Memory tab, and /settings/ai has no memory controls.
- The public contact email said "Defaults to your registration email". Since
  #1589 it is never pre-filled.
- Integrations told developers to verify webhooks with @orangecat/sdk, which
  is not published (npm answers 404).

Now:
- The export is gathered in src/domain/account/exportAccount.ts. It adds every
  page the person owns, found through ENTITY_REGISTRY by each type's owner
  column, so a new type is exported without touching it. Wallets are read
  through WALLET_CLIENT_COLUMNS, without the connection secret. It also adds
  posts (under the user id or an actor), follows both ways, group memberships,
  payment requests and orders where the person is a party, notifications and
  Cat interest topics. Embedding vectors stay out. A failed read still fails
  the whole export rather than handing over a partial file. The route is a
  thin wrapper.
- The export copy names what the file holds and what it leaves out.
- The memories sentence links to the Memory tab.
- The contact email help says it stays empty unless filled in and that the
  sign-in email is never shown. The guidance tip claiming a default is gone.
- Integrations states the signing scheme (X-OrangeCat-Signature, HMAC-SHA-256
  of `${t}.${raw body}`, five-minute tolerance), and the API conventions doc
  says the SDK is not published.

Claude-Session: https://claude.ai/code/session_019MDtmw3MnN44QwEv4M52CS

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 07:49:00 +01:00
..

created_date, last_modified_date, last_modified_summary
created_date last_modified_date last_modified_summary
2025-06-05 2025-06-05 Added documentation standards including creation and modification dates

�� API Documentation

REST API Reference for OrangeCat


📋 Overview

OrangeCat provides a comprehensive REST API for managing Bitcoin fundraising projects, user profiles, and authentication. All API endpoints follow RESTful conventions and return JSON responses.

Base URL: /api/
Authentication: JWT tokens via Supabase Auth
Rate Limiting: Applied per endpoint


🔐 Authentication

All protected endpoints require authentication via JWT tokens:

headers: {
  'Authorization': `Bearer ${token}`,
  'Content-Type': 'application/json'
}

📚 API Sections

📜 Public API (/api/v1/)

🤖 AI Chat

  • Chat API - AI assistant integration using Google Gemini

🎯 Quick Start

1. Authentication

// Login
POST /api/auth/login
{
  "email": "user@example.com",
  "password": "password"
}

2. Get Profile

// Get current user profile
GET /api/profile
Authorization: Bearer {token}

3. Create Campaign

// Create new project
POST /api/projects
Authorization: Bearer {token}
{
  "title": "My Campaign",
  "description": "Campaign description",
  "goal_amount": 1000000
}

📊 Response Format

Success Response

{
  "success": true,
  "data": { ... },
  "message": "Operation successful"
}

Error Response

{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE"
}

🔒 Security

  • Input Validation - All inputs validated and sanitized
  • Rate Limiting - Protection against abuse
  • CORS - Configured for secure cross-origin requests
  • HTTPS Only - All API calls must use HTTPS in production

📈 Rate Limits

Endpoint Type Limit Window
Authentication 5 requests 1 minute
Profile Updates 10 requests 1 minute
File Uploads 3 requests 1 minute
General API 100 requests 1 minute

🐛 Error Codes

Code Description
AUTH_REQUIRED Authentication required
INVALID_TOKEN Invalid or expired token
VALIDATION_ERROR Input validation failed
RATE_LIMIT_EXCEEDED Too many requests
RESOURCE_NOT_FOUND Resource not found
PERMISSION_DENIED Insufficient permissions