# API reference

> Every endpoint of the Rytiv REST API, generated from the control plane's routes and the contract's schemas.

Everything Rytiv does goes through one HTTP API at `https://api.rytiv.app/v1`. The CLI, the console and the MCP server use the same routes you can call yourself. This reference lists 183 endpoints, generated from the control plane's route registrations and the contract's schemas: every path, every field, every bound and every error code is what the code enforces.

Start with [REST API basics](https://docs.rytiv.com/reference/api-basics.md) for authentication, the error format and how to act for a managed organization. Each family page below lists its endpoints with an example request and the shape of the answer.

## Families

- [Apps](https://docs.rytiv.com/reference/api/apps.md): Create, list, label and delete apps; attach databases, buckets and volumes; link apps to each other.
- [Deploys and releases](https://docs.rytiv.com/reference/api/deploys.md): Detect a project, build it, deploy an image, follow a deploy, list releases and roll back; previews and Git-connected deploys.
- [Machines](https://docs.rytiv.com/reference/api/machines.md): The virtual machines behind an app: create, read, start, stop, suspend, destroy, migrate; logs, snapshots, files and shell sessions.
- [Computers](https://docs.rytiv.com/reference/api/computers.md): Watch or take over a computer's desktop, and see who had control.
- [Sandboxes](https://docs.rytiv.com/reference/api/sandboxes.md): Short-lived machines with a deadline: create from a template, run commands, read and write files, extend, end.
- [Postgres](https://docs.rytiv.com/reference/api/postgres.md): Databases Rytiv runs for you: create, branch, fork, restore, expire, fetch a copy's connection URL, delete.
- [Volumes](https://docs.rytiv.com/reference/api/volumes.md): Persistent disks: create, list, resize, attach to an app, detach, delete.
- [Buckets](https://docs.rytiv.com/reference/api/buckets.md): S3-compatible object storage: create buckets, presign object URLs, list and delete objects, set CORS, attach to apps.
- [Secrets](https://docs.rytiv.com/reference/api/secrets.md): Encrypted environment variables of an app: set, list names, remove, and choose which ones a build may see.
- [Tokens and keys](https://docs.rytiv.com/reference/api/tokens.md): API keys with scopes and expiry, agent tokens with a class, the audit of agent actions, SSH keys and the device login.
- [Organization](https://docs.rytiv.com/reference/api/organization.md): Your organization, its wake page and signed-access keys, organizations you manage for others, and deleting your own.
- [Billing and usage](https://docs.rytiv.com/reference/api/billing.md): Prepaid credit in euro: balance, ledger, top-ups, auto-recharge, the payment portal, the billing preview and metered usage.
- [Custom domains](https://docs.rytiv.com/reference/api/domains.md): Your own domains on an app: add, check, redirect, remove; prove a whole zone once.
- [Cron and jobs](https://docs.rytiv.com/reference/api/cron-and-jobs.md): Schedules that call a path of an app or run a command on a machine of their own, their run history, and one-off jobs.
- [Protection and network](https://docs.rytiv.com/reference/api/protection-and-network.md): Who may open an app (password, signed links), what its machines may reach, and public UDP endpoints.
- [Mail](https://docs.rytiv.com/reference/api/mail.md): Send mail from your own domains, read the delivery log, receive inbound mail, and manage suppressions.
- [Webhooks](https://docs.rytiv.com/reference/api/webhooks.md): Be called when something happens in your organization, and read the deliveries.
- [MCP](https://docs.rytiv.com/reference/api/mcp.md): The MCP server your coding agent talks to: one endpoint, JSON-RPC over HTTP, the same key as every other route.
- [OAuth and device login](https://docs.rytiv.com/reference/api/oauth.md): How a hosted MCP client connects without a pasted key, and how the CLI signs in with a code.
