Welcome to the Midday API
Midday provides two API options to integrate with your platform:- REST API - Standard HTTP endpoints for external integrations
- tRPC API - Type-safe RPC for TypeScript applications
Base URLs
API Architecture
REST API
The REST API follows OpenAPI 3.1.0 specification and is available athttps://api.midday.ai. All REST endpoints use standard HTTP methods:
GET- Retrieve resourcesPOST- Create new resourcesPUT- Update existing resourcesDELETE- Remove resourcesPATCH- Partially update resources
View the interactive API reference at https://api.midday.ai powered by Scalar.
tRPC API
The tRPC API provides end-to-end type safety for TypeScript applications. It’s available athttps://api.midday.ai/trpc and uses JSON-RPC protocol.
Request Format
REST API
All REST requests must include:Content-Type: application/jsonheader for POST/PUT/PATCH requestsAuthorization: Bearer <token>header for authentication
tRPC API
TRPC requests use JSON-RPC format. When using the tRPC client, this is handled automatically.Response Format
All API responses use JSON format.Success Response
Error Response
Available Resources
The Midday API provides access to the following resources:Transactions
Manage financial transactions and categorization
Invoices
Create, update, and manage invoices
Customers
Manage customer information
Documents
Upload and manage documents
Bank Accounts
Access bank account information
Time Tracking
Track time entries and projects
Reports
Generate financial reports and insights
Teams
Manage team settings and members
CORS Support
The API supports Cross-Origin Resource Sharing (CORS) for allowed origins. Allowed origins are configured via theALLOWED_API_ORIGINS environment variable.
Supported headers:
AuthorizationContent-TypeUser-Agentx-request-idx-user-localex-user-timezonex-user-country
Health Checks
The API provides health check endpoints for monitoring:API Versioning
Current version: 0.0.1Next Steps
Authentication
Learn how to authenticate your API requests
Rate Limits
Understand rate limiting policies