powered by

Core concepts

Three things to understand before you build anything: entities are your data model, APIs are generated automatically from that model, and everything else connects to those APIs.

Anythink runs on a simple principle that once it clicks, makes everything else obvious: you design your data, and the entire backend generates itself from it.


Entities — your data model

An entity is a table in your database. You create and define entities in the dashboard under Settings → Data Model. Each entity has:

  • A name (e.g. products, orders, blog_posts)
  • A set of fields — each field has a name and a type

Field types

Type Use for
varchar Short text — names, titles, slugs, status values
text Long text — descriptions, body content, notes
int / bigint Whole numbers — quantities, counts, IDs
float Decimal numbers — prices, coordinates
bool True / false flags
date Calendar dates
timestamp Date + time
json Arbitrary structured data
geo Geographic coordinates (latitude / longitude)
file An uploaded file — image, document, video
varchar[] Multi-select list of string values
Foreign key A link to a record in another entity

Example: a product catalogue

text
products entity
  name          varchar      required
  description   text
  price         float        required
  in_stock      bool         default true
  hero_image    file
  category      → categories (FK)

As soon as you save this, Anythink creates the table and generates the API.


APIs — generated automatically

Every entity gets a full REST API the moment it is saved. You do not write any code, define any routes, or configure any server. The API is just there.

Standard endpoints for every entity

http
GET    /org/{orgId}/entities/products/items
GET    /org/{orgId}/entities/products/items/{id}
POST   /org/{orgId}/entities/products/items
PUT    /org/{orgId}/entities/products/items/{id}
DELETE /org/{orgId}/entities/products/items/{id}

Filtering and querying

The list endpoint supports filtering, sorting, and pagination out of the box:

http
GET /org/{orgId}/entities/products/items?limit=20&page=1
GET /org/{orgId}/entities/products/items?filter[in_stock]=true

Live API documentation

Anythink generates interactive API documentation for your project automatically. Find the link in your project dashboard. Every field, every endpoint, with example requests and responses — always up to date.

Understanding my APIs

Authentication and API keys

Every API call requires authentication. There are two ways to authenticate:

  • JWT — users log in and receive a token. Pass it as Authorization: Bearer <token>. The request is made as that user, and role and row-level security rules apply.
  • API key (ak_...) — a long-lived key for server-to-server calls or workflows. Generate one in your dashboard.
javascript
// Authenticated API call
const res = await fetch(
  'https://api.my.anythink.cloud/org/{orgId}/entities/products/items',
  {
    headers: { 'Authorization': 'Bearer ' + token }
  }
);
Authentication

Relationships between entities

Link entities together with foreign key fields. An order links to a customer. A product links to a category. A comment links to a post.

When you define a foreign key field on an entity, you pass the related record's ID when creating or updating. The API returns the linked record's ID, and you can filter by it.

json
POST /org/{orgId}/entities/orders/items
{
  "customer": 42,
  "product": 7,
  "quantity": 2,
  "status": "pending"
}
Connecting things with relationships

The design loop

Most Anythink projects follow the same iterative pattern:

  1. Add a field or entity in the dashboard
  2. Test the API immediately in the live docs or with curl
  3. Build UI against the new endpoint
  4. Repeat

There is no deploy step, no schema migration command, no server restart. Changes to your data model take effect immediately.