Skip to main content

Overview

Every Gainable app includes automatically generated API endpoints. These APIs power your app’s functionality and can be used by external integrations.
You don’t need to know about APIs to use Gainable. This reference is for users who want to understand how their apps work internally or integrate with external systems.

API structure

For each data model you create, Gainable generates RESTful endpoints:

Example

If you create a Deal model, you get:

Response format

All API responses follow this structure:

Success response

List response

Error response

Common operations

Create an item

Update an item

Delete an item

Filtering

Most list endpoints support query parameters for filtering:

Real-time events

When data changes, the server broadcasts events via WebSocket:

Example events

Authentication

API requests require authentication. Your app handles this automatically through session cookies when accessed through the browser. For external integrations, reach out via the live chat in the builder or email support@gainable.dev for API key access.

Rate limits

APIs have reasonable rate limits to ensure stability:
  • Standard: 100 requests per minute
  • Bulk operations: 10 requests per minute
If you hit a rate limit, you’ll receive a 429 response.

Data types

Automatic fields

Every item includes:

Reference fields

When models reference each other, the API returns IDs:
Use the project ID to fetch the related project.

Best practices

The app’s UI is the easiest way to interact with your data. Use APIs only when you need external integration.
Check for success: false responses and handle them appropriately.
Instead of polling, listen for WebSocket events to get instant updates.

Learn more

Data models

Understanding your data structure

Real-time updates

How real-time sync works