# API backend hosting

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

> 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.


**The clients ship on their own schedule. The backend can't wait for them.**

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 the finished package is synced in. 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.

## Old versions don't leave on request

A mobile app in the wild pins the contract for as long as people postpone updates, and no deployment on this side changes that. Route prefixes and header negotiation cover the small breaks. For a hard one, a major version runs as its own environment: each environment tracks its own Git branch and books its own components, so v1 sits frozen on a small PHP plan while v2 settles beside it.

The same mechanism does duty before the break. A staging environment runs the next contract against a copy of the data, on a test domain with HTTPS from the first deploy — client developers integrate against a real URL instead of a mock.

## Why fortrabbit?

Deploys, SSH, cron jobs, and queue workers are the product here, not add-ons sold on top of it — a managed PHP platform still run by the people who built it. Push to deploy, keep the slow work in the jobs component, and scale PHP and workers apart. The API stays quick while the front ends multiply across app stores, CDNs, and hosts nobody here has to manage.

## 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](/workflows/agentic-engineering)
