> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bludia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bludia at a glance

> A single-page fact sheet about Bludia for quick answers: what it is, base URL, headers, endpoints, key types, auth flow, token lifetimes, permissions, row policies, functions, field types, limits, and error codes.

This page collects the key facts about Bludia in one place. Each section links to the full documentation.

## What Bludia is

* Bludia is an **AI app builder** in **beta**: describe an app in plain language and Bludia builds it, then hosts and runs it.
* Every app gets a ready team **dashboard**, a **REST API**, **end-user authentication**, **role-based permissions**, **row-level security**, **functions** (automations in plain steps), **email messaging**, **files**, **reports**, **dashboards**, **PDF generation**, and **scheduled functions**.
* Bludia doesn't design public websites or mobile app screens. Any client that can make HTTPS requests can connect to it: React, Next.js, Vue, Flutter, iOS, Android, servers.
* Data is stored in **PostgreSQL**. Each **project** is isolated.
* Projects can be created from scratch, from templates, or generated by AI from a description.

## API essentials

| Fact | Value |
| :- | :- |
| Base URL | `https://YOUR_API_HOST/ext/api/v1` (shown in each collection's API Endpoints panel) |
| Format | JSON |
| API key header | `X-BLUDIA-API-KEY` (required on every request) |
| User token header | `Authorization: Bearer <access_token>` (required with `end_users` keys on data routes) |
| Key format | `bludia_<environment>_<6 chars>_<40 chars>`, shown once |
| Key auth types | `platform` (server-only, full access) and `end_users` (users + permissions) |
| Key environments | `production` (default), `staging`, `development` |
| Rate limit | Per key, default 1,000 requests/minute (10 to 100,000); auth routes 10/minute per IP |
| CORS | Browser `Origin` must be in the key's allowed origins, else `403 CORS blocked` |

## Endpoints

| Method | Path | Purpose |
| :- | :- | :- |
| GET | `/collections/{slug}/records` | List records (`page`, `limit` ≤ 100, `sort`, `order`, `filters[...]`, `conditions`, `with`) |
| GET | `/collections/{slug}/{id}` | Get a record |
| POST | `/collections/{slug}` | Create a record (201) |
| PUT | `/collections/{slug}/{id}` | Partial update; `version` or `If-Match` → 409 on conflict |
| DELETE | `/collections/{slug}/{id}` | Soft delete (to trash) |
| POST | `/auth/{guard}/register` | Sign up → session |
| POST | `/auth/{guard}/login` | `{login, password}` → session |
| POST | `/auth/{guard}/refresh` | `{refresh_token}` → new session (rotates) |
| POST | `/auth/{guard}/password/forgot` / `password/reset` | Password reset |
| POST | `/auth/{guard}/email/verify` / `email/resend` | Email verification |
| GET | `/auth/{guard}/me` | Current user |
| POST | `/auth/{guard}/logout` / `logout-all` | End sessions |

List response: `{ "data": [...], "meta": { "page", "limit", "total", "pages", "trashed" }, "totals": ... }`. Single: `{ "data": {...} }`.

## Authentication facts

| Fact | Value |
| :- | :- |
| Users are | Records in your own collection (for example `users`) |
| Guard | Connects login to a collection + login field; adds a hashed `password` field |
| Login body | `{ "login": "<login field value>", "password": "..." }` |
| Session | `access_token` (JWT HS256), `refresh_token` (80 chars), `token_type: Bearer`, `expires_in`, `record_id` |
| Access token lifetime | 900 s (15 min) default, `jwt_ttl` |
| Refresh token lifetime | 1,209,600 s (14 days) default, `refresh_ttl` |
| Password minimum | 8 characters |
| Default role | `user`, auto-assigned on registration |
| Blocked statuses | `inactive`, `banned`, `suspended` |
| Social login | Not available yet |

## Authorization facts

| Fact | Value |
| :- | :- |
| Collection permissions | `can_read`, `can_create`, `can_update`, `can_delete`, `can_export`, `can_import`, `can_execute_actions`, `can_manage_schema` |
| Method → permission | GET → read, POST → create, PUT/PATCH → update, DELETE → delete |
| Row policy types | `owner`, `field_equals`, `relation` |
| Row policy effects | `allow`, `deny` (deny wins) |
| Default with no allow policy | User sees only records they created |
| Applies to | `end_users` keys only; `platform` keys bypass |

## Data facts

| Fact | Value |
| :- | :- |
| Field types | text, long\_text, text\_editor, number, password, relation, file, date, time, datetime, select, multi\_select, boolean, qr\_code, icon |
| System fields | `id`, `slug`, `created_at`, `updated_at`, `published_at` |
| Relation types | `one_to_one`, `one_to_many`, `many_to_many` |
| Relation read format | `{ "id": 25, "label": "..." }` |
| Deletes | Soft delete (trash), restorable |
| Validation failure | `422` |
| Imports | CSV per collection (≤ 50 MB), SQL dump (≤ 2 GB) |
| Exports | Records per collection; full PostgreSQL export |

## Functions (automations) facts

| Fact | Value |
| :- | :- |
| Written as | Plain steps (JSON), built in the dashboard; no code |
| Triggers | A button on a record, a record event (`create`, `update`, `delete`), or a schedule (cron, interval, or a set time) |
| Steps | `get_record`, `query`, `create`, `update`, `delete`, `guard`, `compute`, `set`, `generate_pdf` |
| Transactions | Each run is one transaction: if a step fails, every change is undone |
| Record events | Run inside the write's transaction; a failing `guard` rejects the write with `422` |
| Scheduled runs | Optionally once for each matching record (default up to 100, max 1,000) |
| Testing | Dry runs show every step and save nothing |
| Versions | Every saved change is a new, immutable version |

## Other features

| Feature | Key facts |
| :- | :- |
| Messaging | Email over SMTP; templates with `{{variables}}`; SMS/WhatsApp/Telegram/push coming |
| Files | ≤ 100 MB default; public or private; signed URLs (1 h default) |
| Reports | Group by fields/date buckets; `count`, `count_distinct`, `sum`, `avg`, `min`, `max` |
| Dashboards | Widgets: KPI, charts (line, area, bar, combo, pie, scatter, funnel, gauge, heatmap), table, map, lists, progress, countdown, text, image, embed, filter |
| PDF templates | HTML/CSS with `{{record.field}}`, `{{#each}}`, `{{#if}}` |
| Scheduled functions | once / every / cron with timezone; optional run per matching record; no overlap; missed runs run once |

## Status codes

`200` OK · `201` created · `401` missing/invalid key or token · `403` forbidden (revoked/expired key, CORS, permission) · `404` not found or not visible · `409` duplicate account or version conflict · `422` validation · `429` rate limit · `500` server error (quote `request_id`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.