# API backend hosting

Source: https://www.fortrabbit.com/use-cases/api-backend
Created: 2026-07-20
Reviewed: 2026-07-20

> Host a PHP API backend on fortrabbit — Laravel, Symfony or Tempest answering JSON to mobile apps, SPAs and other services. Deploy with git push, run queue workers and cron jobs beside the web layer.


A PHP service that answers JSON, consumed by clients it doesn't control and can't deploy. No templates, no session cookies — only routes that take a request and return data. Deploys go by git push: the build runs Composer in a separate deploy container, and only a finished package syncs into the web space. Migrations and console commands run over SSH.

## Work that isn't a response

Sending mail, generating exports, and calling third parties that time out have no business inside a request. The jobs component runs workers and cron jobs in a container isolated from the web layer, sharing the code base, database, and env vars — a webhook handler that writes a row and returns immediately survives a spike that a synchronous one won't. Jobs scale by memory and job count, separately from PHP.

Persistent connections aren't supported, so APIs that need to push do it by polling or by calling webhooks back out.

## FAQ

### Can one API serve a website, a mobile app and a SPA at once?

**Yes** — That is the usual arrangement. The backend exposes one set of endpoints and stays unaware of who calls them. Clients release on their own schedule — an app store review does not require a deployment here, and a deployment here does not wait for one.

### Are queue workers and scheduled jobs supported?

**Yes** — The jobs component runs worker and cron jobs in a separate runtime container, with access to the same file system, database, and env vars as the web layer. Laravel's `database` queue driver works with the MySQL component out of the box, and `php artisan schedule:run` fires from a cron job every minute. Each deployment restarts running workers, so they always execute the latest code.

### Does the platform support WebSockets for real-time endpoints?

**No** — Persistent connections are not supported on the platform. APIs that need push semantics can poll, send webhooks out to the client, or delegate that one channel to an external service dedicated to it.

### How is API versioning handled?

**By routing** — Route prefixes and header negotiation are application concerns. For a hard break, run each major version as its own environment — every environment maps to its own Git branch and books its own components, so v1 stays frozen while v2 settles.

### What does an API backend cost to run?

**Per component** — An environment books exactly the components it needs — PHP, MySQL, jobs — and billing is pro-rated, post-paid, on a daily cycle. A small API with a database and one worker starts small and grows one component at a time; there is no jump to a bundled tier. New apps start as a free trial: seven days, no credit card.

---

- [Jobs and workers](/features/jobs)
- [Staging environments](/features/staging-environments)
- [Agent ready](/platform/ai-ready)
