API Documentation
Comprehensive API documentation for Zapier integration and third-party developers
Overview
The Rewiser API provides endpoints for managing financial transactions and folders through Zapier integrations. This documentation covers all API endpoints used in the Zapier integration with comprehensive examples and schemas.
Base URL: https://api.rewiser.io/functions/v1
Authentication
All API endpoints require authentication using API keys generated in the Rewiser application.
API Key Authentication
Authorization: Bearer {api_key}Example:
Authorization: Bearer rwsk_live_YOUR_API_KEY_HEREGetting API Keys
- Log in to your Rewiser account at app.rewiser.io
- Navigate to Settings > API Keys
- Generate a new API key for Zapier integration
- Copy the generated key (format:
rwsk_live_...)
Rate Limits & Protection Systems
🛡️ Multi-Layer Protection
Our API implements several protection mechanisms to prevent automation loops and ensure data integrity:
1. Rate Limiting
Our API implements comprehensive rate limiting to ensure fair usage and prevent abuse. Rate limits vary by endpoint type and are designed to balance performance with protection against automation loops.
When rate limited, you'll receive a 429 status code with appropriate retry information. We recommend implementing exponential backoff in your integration to handle rate limits gracefully.
2. Duplicate Detection System
Advanced duplicate protection prevents accidental data duplication and automation loops:
Database-Level Duplicate Detection
- Exact Match Prevention: Blocks identical transactions within a configured time window
- Multi-field Comparison: Analyzes multiple transaction fields to identify duplicates
- Smart Recurring Support: Allows legitimate recurring payments while preventing duplicates
Request-Level Protection
- Request Fingerprinting: Prevents identical requests from being processed multiple times
- Batch Duplicate Detection: Removes duplicates within the same request
- Memory Cache: Tracks recent requests to prevent re-submission
3. Intelligent Time Controls
Our API uses intelligent time-based controls to optimize performance and prevent abuse. These controls automatically adjust based on usage patterns and endpoint types, ensuring efficient operation while maintaining data integrity.
Time windows are dynamically configured to balance between preventing automation loops and allowing legitimate recurring transactions. The system is designed to be flexible enough to handle various use cases while maintaining robust protection.
4. Response Headers
API responses include standard HTTP headers for monitoring and debugging. Rate limit information is provided when applicable to help you manage your API usage effectively.
Endpoints
1. Authentication Verification
Endpoint: POST /verify-auth
Verifies the validity of an API key and returns user information.
Request
POST /verify-auth
Authorization: Bearer {api_key}
Content-Type: application/jsonResponse
{
"success": true,
"user": {
"id": "user_uuid_here",
"email": "user@example.com",
"full_name": "John Doe"
}
}Error Responses
{
"success": false,
"error": "Unauthorized - Invalid or expired key"
}Status Codes:
200- Success401- Invalid or expired API key
2. Get Recent Transactions (Zapier Trigger)
Endpoint: GET /get-recent-transactions
Retrieves recent transactions optimized for Zapier triggers with automatic polling protection.
Authentication
Supports both authentication methods:
- Header:
Authorization: Bearer {api_key}(recommended for Zapier) - Query Parameter:
?api_key={api_key}(alternative method)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
folder_mode | string | No | "all" | Filter mode: "all" or "single" |
type | string | No | null | Transaction type: "Expense", "Income", or null for all |
folder_id | string | No | null | Specific folder ID (required if folder_mode="single") |
format | string | No | "standard" | Response format: "standard" or "zapier" |
Request Examples
Get all recent transactions (Header auth):
GET /get-recent-transactions?format=zapier
Authorization: Bearer YOUR_API_KEYGet expenses from all folders (Query auth):
GET /get-recent-transactions?api_key=YOUR_API_KEY&type=ExpenseGet transactions from specific folder:
GET /get-recent-transactions?folder_mode=single&folder_id=YOUR_FOLDER_ID&format=zapier
Authorization: Bearer YOUR_API_KEYResponse (Standard Format)
{
"success": true,
"count": 3,
"timestamp": "2025-06-12T10:30:00.000Z",
"data": [
{
"id": "transaction_uuid_here",
"name": "Notion Subscription",
"amount": 19.99,
"type": "Expense",
"created_at": "2025-06-11T19:44:44.109694+00:00",
"folder_id": "folder_uuid_here",
"is_paid": false,
"planned_date": "2025-06-15T22:44:00.000Z",
"note": "Monthly subscription"
}
]
}Response (Zapier Format)
Add ?format=zapier for Zapier-optimized response:
[
{
"id": "transaction_uuid_here",
"transaction_id": "transaction_uuid_here",
"name": "Notion Subscription",
"amount": 19.99,
"type": "Expense",
"created_at": "2025-06-11T19:44:44.109694+00:00",
"folder_id": "folder_uuid_here",
"is_paid": false,
"planned_date": "2025-06-15T22:44:00.000Z",
"note": "Monthly subscription",
"transaction_name": "Notion Subscription",
"amount_formatted": "19.99",
"status": "pending",
"has_planned_date": true,
"_sync_timestamp": "2025-06-12T10:30:00.000Z",
"_zapier_dedup_key": "transaction_uuid_here"
}
]3. Create Multiple Transactions
Endpoint: POST /create_multiple_transactions
Creates multiple transactions in a single request with AI-powered data normalization and advanced duplicate protection.
Authentication
Header only: Authorization: Bearer {api_key}
Request Body
{
"transactions": [
{
"folder_id": "YOUR_FOLDER_ID",
"type": "Expense",
"name": "Notion",
"amount": 19.99,
"planned_date": "2025-06-16T00:00:00Z",
"is_paid": true,
"note": "June subscription"
}
]
}Required Fields (for each transaction)
folder_id(string): UUID of the target folder (get from /get-folders endpoint)type(string): "Expense" or "Income" (supports variations like "expense", "spending", "income", "earning")name(string): Transaction descriptionamount(number/string): Transaction amount (positive, supports currency symbols)planned_date(string): ISO 8601 date string or various formats (YYYY-MM-DD, DD/MM/YYYY, etc.)
Optional Fields
is_paid(boolean/string): Payment status ("true", "false", "paid", "pending")paid_date(string): Payment date (auto-filled with planned_date if is_paid=true)note(string): Additional notesrepeat_type(string): "monthly", "weekly", "yearly", "daily", or null
Response with Protection Details
{
"success": true,
"request_id": "req_uuid_here",
"inserted_count": 3,
"failed_count": 1,
"duplicate_count": 2,
"skipped_count": 1,
"total_processed": 7,
"timestamp": "2025-06-12T10:30:00.000Z",
"inserted": [
{
"id": "tx_uuid_1",
"name": "Office Supplies",
"amount": 29.99,
"type": "Expense",
"planned_date": "2025-06-16T10:00:00Z"
}
],
"duplicates": [
{
"index": 2,
"message": "Duplicate transaction detected (within last 24 hours)",
"duplicate_id": "existing_tx_uuid",
"transaction": {
"name": "Netflix Subscription",
"amount": 15.99,
"type": "Expense",
"planned_date": "2025-06-15T00:00:00Z"
}
}
],
"skipped": [
{
"index": 4,
"reason": "Duplicate within the same batch",
"transaction": {
"name": "Duplicate Entry",
"amount": 10.00,
"type": "Expense"
}
}
],
"rate_limit_info": {
"remaining_requests": 17,
"reset_time": "2025-06-12T10:35:00.000Z"
}
}Limits & Protection
- Batch Limit: Maximum batch size per request (prevents system overload)
- Rate Limit: Enforced per endpoint to prevent automation loops
- Request Fingerprinting: Cooldown period for identical requests
- Duplicate Detection: Time-based window for identical transactions
- AI Fallback: Automatic data correction for invalid inputs
- Data Normalization: Supports various input formats for amounts, dates, and types
4. Get Folders
Endpoint: GET /get-folders
Retrieves accessible folders for the authenticated user in Zapier dropdown format.
Request
GET /get-folders
Authorization: Bearer {api_key}Response
[
{
"key": "folder_uuid_1",
"label": "Personal Finance"
},
{
"key": "folder_uuid_2",
"label": "Business Expenses"
}
]Data Normalization & AI Support
The API includes intelligent data normalization for handling inconsistent input formats with built-in protection against automation errors:
Type Normalization
"expense","expenses","spending"→"Expense""income","incomes","earnings"→"Income"
Amount Normalization
- Removes currency symbols:
"$29.99"→29.99 - Handles different decimal separators:
"29,99"→29.99 - Converts negative to positive values
Date Normalization
- Various formats supported:
"2025-06-15","2025/06/15","2025.06.15" - Automatically converts to ISO 8601 format
- Adds timezone if missing
AI Fallback with Protection
If automatic normalization fails, the system uses AI-powered data correction to:
- Analyze the problematic data while preserving original context
- Attempt intelligent correction following strict validation rules
- Maintain duplicate protection even for AI-corrected data
- Return normalized data or clear error messages with suggestions
- Log AI corrections for monitoring and debugging
The AI system is configured for consistent, reliable corrections while maintaining all security protections.
Error Handling
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request (invalid data) |
| 401 | Unauthorized (invalid API key) |
| 403 | Forbidden (access denied to resource) |
| 409 | Conflict (duplicate request detected) |
| 429 | Rate Limited (too many requests) |
| 500 | Internal Server Error |
Error Response Format
{
"error": "Error description",
"attempted_ai_fix": true,
"details": "Additional error details"
}Rate Limit Error (429)
{
"error": "Rate limit exceeded. Please wait before making more requests.",
"retry_after": 300,
"rate_limit_info": {
"remaining_requests": 0,
"reset_time": "2025-06-12T10:35:00.000Z"
}
}Duplicate Request Error (409)
{
"error": "Duplicate request detected",
"message": "The same request was sent recently. Please wait before retrying.",
"last_request_id": "req_uuid_here",
"wait_seconds": 45
}Testing & Support
Test Account
A dedicated test account with full API access is provided to Zapier's review team during the integration approval process. Test credentials are shared privately during submission.
Example Integration Flows
Zapier Trigger: New Transaction (Optimized)
GET /get-recent-transactions?api_key=&format=zapierThis automatically fetches only the last 1 hour of transactions to prevent duplicate triggers.
Zapier Action: Create Transaction
POST /create_multiple_transactions
Authorization: Bearer
Content-Type: application/json
{
"transactions": [
{
"folder_id": "",
"type": "",
"name": "",
"amount": "",
"planned_date": "",
"is_paid": ""
}
]
}Zapier Action: Bulk Create (Protected)
POST /create_multiple_transactions
Authorization: Bearer
Content-Type: application/json
{
"transactions": []
}Includes automatic duplicate detection and rate limiting to prevent automation loops.
Best Practices for Zapier Integrations
- Use the trigger efficiently: 15-30 minute intervals are sufficient due to 1-hour time window
- Single vs Multiple transactions: Use array format even for single transactions
- Check for duplicates in response: Monitor
duplicate_countin operations - Handle flexible data formats: API normalizes amounts, dates, and types automatically
- Set reasonable timeouts: AI processing may take 3-5 seconds for complex corrections
- Use both auth methods: Header for triggers, query parameter as fallback
Changelog
Version 1.2 (Current - August 2025)
- 🌐 Domain Migration: API migrated from Supabase infrastructure to dedicated api.rewiser.io domain
- 🚀 Improved Performance: Enhanced reliability and faster response times with new infrastructure
- 📚 Updated Documentation: All endpoint examples updated to reflect new domain structure
- 🔄 Seamless Transition: Maintained full backward compatibility during migration
Version 1.1 (June 2025)
- 🔒 Enhanced Protection: Advanced duplicate detection with 24-hour time windows
- 🚦 Rate Limiting: 20 requests per 5 minutes for create_multiple_transactions
- 🔄 Trigger Optimization: 1-hour time window for get-recent-transactions endpoint
- 🤖 Improved AI: Better error recovery with GPT-4o integration
- 📊 Enhanced Monitoring: Detailed response headers and request tracking
- ⚡ Zapier Format: Dedicated response format for optimal Zapier integration
- 📝 Unified Endpoint: Single create_multiple_transactions endpoint for all operations
- 🔐 Flexible Auth: Support for both header and query parameter authentication
Version 1.0 (January 2025)
- Initial API release
- Basic CRUD operations for transactions
- Folder management
- AI-powered data normalization
- Zapier-optimized responses
Last Updated: August 13, 2025
API Version: 1.2 (Domain Migration)
Contact: hello@rewiser.io
Documentation: Real-time protection against automation loops and duplicate submissions