Skip to Content
FAQ

Frequently Asked Questions

Common questions about using Foir.

General

What is Foir?

Foir is a backend platform for building applications. It gives you a database with a typed GraphQL API, authentication for your end users, file and media storage, transactional email, background jobs, and search — as one platform, with each project’s data isolated in the database by default. Rather than assembling and securing those services yourself, you configure them in one place.

Who is Foir for?

Development teams and studios building one or more applications who would otherwise wire together a database, an auth provider, object storage, email, and a job queue — and take on securing and maintaining that stack. Foir is a particularly good fit when you run several apps at once: each is its own isolated project under one account. You get:

  • A database with a typed GraphQL API and versioned, publishable content
  • Authentication for your end users, including hosted sign-in on custom domains
  • Database-enforced data isolation between projects
  • File and media storage with on-the-fly image transforms
  • Transactional email and durable background jobs
  • Full-text and semantic search, personalization, and localization
  • Config-as-code, a CLI, and an Editor SDK to extend the console

Is Foir a headless CMS?

Foir includes everything a headless CMS does — content modeling, versioning, publishing, localization, personalization — but it’s a full application backend, not just a content layer. Alongside content it gives you authentication for your end users, file and media storage, email, background jobs, and database-enforced access control. So it replaces the stack you’d otherwise assemble from a database service, an auth provider, and object storage — not only a CMS.

Content & Data

What’s the difference between models with and without versioning?

All data in Foir uses the same models and records system. Each model has a kind — record-bearing (its own records) or inline (an embeddable schema with no records of its own) — and a set of capabilities you choose to enable: versioning, publishing, and variants. A “page” model might have all capabilities enabled, while a “booking” model might have none. Both use the same API.

Can I create custom content schemas?

Yes. Models are fully customizable. Define your own fields using built-in field types (text, prose, integer, decimal, boolean, date, image, reference, and more) or create reusable inline schemas that can be embedded as field types in other models.

How does versioning work?

For models with versioning enabled, every change creates a new version. You can review version history, compare changes, and publish specific versions. Variants each have independent version histories. How far back that history reaches depends on your plan — see how long history is kept.

Does Foir support rich text content?

Yes — the field type is prose. It supports formatted content with headings, lists and links, and it is fully translatable across locales. It can also hold your own models placed inline among the paragraphs, where the field’s config.allowedTypes admits them; without that list it is text only.

API

What API does Foir use?

Foir uses GraphQL for all data operations. The public API endpoint is https://api.foir.dev/graphql. This provides type safety, flexible queries, and excellent developer tooling.

What are the different kinds of API key?

KindPrefixUse Case
Publishablefoir_pub_Frontend, client-side code. A visitor does only what the key gives; a signed-in user’s role adds the rest
Serverfoir_srv_The server that renders your app’s pages. Gives a visitor what a publishable key gives. Never a browser
Adminfoir_adm_A machine of your own (integration sync, CI seeds, config push, back-office tooling), never your app. Holds the permissions you give it, and expires

API keys are scoped: you control which operations each key can access. Your app’s own logic needs no key of its own, because it runs as an operation with the grants it declares; see App architecture. Every key belongs to one project, so a deploy that serves several projects holds one key per project. See API Keys and Authentication for details.

Can I use Foir with any frontend framework?

Yes. Foir is headless, so it works with any technology that can make HTTP requests — React, Next.js, Vue, Svelte, mobile apps, or server-side applications. The GraphQL API returns structured JSON that you render however you want.

Is there a rate limit?

Yes. The ceiling comes from your workspace’s plan, not from the key: 10,000 requests per hour on Free and Entry, rising with the plan. Each key gets that ceiling rather than sharing one. It is not configurable per key. Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response. See Errors & Rate Limits for details.

Localization

How many languages can I support?

There’s no hard limit on locales. Configure as many BCP-47 language codes as your project needs (e.g., en-US, fr-FR, de-DE, ja-JP).

What happens when a translation is missing?

Foir works down an ordered list for that field and serves the first entry that holds a value: the locale you asked for, the fallback locale you configured on it, the closest matches among your other locales in the same language, your project’s default locale, and last the value the content was authored in. Because it runs per field, a partly translated record can come back with some fields in one language and some in another. An ordinary read doesn’t say which is which, and you can ask for a report that does. See Localization for details.

Personalization

How do variants work?

Variants let you serve different content to different audiences. Create variants targeted to specific devices, markets, or user segments. When content is resolved, Foir evaluates targeting rules and returns the best-matching variant.

What are segments?

Segments are named groups of users defined by rules. Users automatically enter or leave segments as their attributes change. Use segments to target content variants and understand your audience.

Can I run A/B tests?

Foir doesn’t include a built-in experiment framework with traffic splitting and goal tracking. You can serve different variants to different segments or contexts, but measuring results and choosing a winner is handled by your own analytics. See Analytics and Reporting for where each analytics need is met.

Analytics & Reporting

Does Foir do analytics?

Not as a product, and the honest answer depends on which analytics you mean. For pageviews and funnels, bring your own tool such as PostHog or Plausible and put it in your storefront; Foir never sees your traffic. For reporting over the data Foir holds, export it with foir export postgres and query a database you own. For pushing changes into another system, use lifecycle hooks. See Analytics and Reporting for the full breakdown.

Automation

Does Foir support webhooks?

Yes. Configure lifecycle hooks to trigger operations when records are created, updated, deleted, published, or unpublished — each delivered to an HTTP endpoint you control. See Webhooks for the delivery contract, authentication, and retry behavior.

What are operations?

Operations are registered HTTP endpoints that Foir can call on demand or in response to lifecycle events. They receive a standardized payload with the record data and context. Execute them via the console, CLI, API, or have them triggered automatically by hooks.

Can I schedule recurring tasks?

Yes. Schedules let you run operations on a cron schedule — for example, syncing data every hour or generating reports daily.

Are lifecycle hooks reliable?

Async hooks are processed by a durable job queue with automatic retries. If a target endpoint is temporarily down, the job will retry. Hook execution errors are logged but don’t fail the parent operation — your data is always saved even if a hook fails.

Config System

What is the config system?

The config system lets you define your project’s models, operations, hooks, schedules, segments, and editor placements as code in a foir.config.ts file. Push changes to the platform with foir push.

When should I use config-as-code vs the console?

Use the config system when you want version-controlled, reproducible project setup — especially for operations, hooks, and editor placements. Use the console for day-to-day content management and one-off model changes.

Editor SDK

What is the Editor SDK?

The Editor SDK lets you build custom editor UIs that run as iframes inside the Foir console. Use it to create specialized editing experiences — visual editors, integration dashboards, translation panels, and more.

What frameworks does the Editor SDK support?

The client SDK is a React library (@foir/sdk). The server SDK works with any Node.js framework (Hono, Express, etc.) or edge runtime (Cloudflare Workers, Deno).

Media

What file types can I upload?

Foir supports images (JPEG, PNG, WebP, AVIF, GIF, SVG), videos (MP4, WebM, QuickTime), audio (MP3, WAV, OGG), documents (PDF, JSON, CSV), and fonts (WOFF, WOFF2). See Media & Files for the full list.

Can I transform images on the fly?

Yes. The platform emits image URLs with an opaque ?t= token that encodes the size preset and any per-usage crop and focal point. Set the focal point and per-usage crop in the editor; the platform mints the URL automatically. See Image Transformations for the URL format.

How does semantic search work?

Foir generates vector embeddings for your content using AI models. When you search, queries are matched by meaning rather than exact keywords. Searching for “winter clothing” finds results about “cold weather apparel” even without those exact words.

Do I need to set up anything for AI features?

Enable embeddings per model in the console, then use the per-model search<Model>s query (or the generic searchRecords) to find content by meaning. See AI & Search for details.

Collaboration

Can my team comment on content?

Yes. The Notes & Comments system lets team members attach notes to any record, reply in threads, @mention colleagues, and resolve discussions.

How do notifications work?

Every user has a personal notification inbox. You’re notified when background jobs complete, when you’re @mentioned in notes, when someone replies to your notes, and for system events.

Infrastructure

How is data isolated between projects?

Isolation is enforced in the database, not just by the API. Every project’s records sit behind Postgres Row-Level Security, so a request can only ever reach the project it’s authorized for — a missing filter in application code can’t cross that boundary. Every API key is scoped to a single project. See Authorization & Access for the full model.

Support

How do I get help?

  • Check this documentation
  • Contact support through the console
Last updated on