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

# REST API backend

> Scaffold a JSON API in Mythex and publish it via Dockerfile to Fly when needed.

# REST API backend

Ask Mythex for an API when you need server routes, webhooks, or a separate backend.

## Starter prompt

```text theme={null}
Create a small REST API with [FRAMEWORK] and these routes:
GET /health, GET /items, POST /items.
Use clear JSON errors. Add a Dockerfile so we can publish.
Keep secrets in env vars.
```

## Publish path

Container backends publish via **Dockerfile → Fly** (Mythex handles deploy from Publish). See [How the tech is chosen](/features/templates) and [API backends](/guides/api-backends).

## Related

* [Multi-service apps](/features/multi-service)
* [Handle webhooks](/recipes/webhooks)
* [Environment variables and secrets](/features/env-and-secrets)
