# Public API (/api.md)

The public API is available at `https://api.trylle.com`. It covers accounts, repositories, pull requests, issues, CI, billing, automations, bots, SSH keys, GPG keys, and profile operations.

## Prefer the CLI for interactive work

The official CLI handles authentication, repository inference, request formatting, pagination, and stable terminal output:

```bash
try repo view OWNER/REPOSITORY
try pr list -R OWNER/REPOSITORY
try ci list -R OWNER/REPOSITORY
```

Use the raw API when building an integration or when no first-class CLI command covers the operation.

## Call an endpoint through the CLI

```bash
try api /v1/viewer
try api /v1/example -q owner=OWNER -q repo=REPOSITORY
try api /v1/example -X post --input request.json
try api /v1/example -X post --input -
```

Use `-f KEY=VALUE` for string fields and `-F KEY=JSON` for typed JSON values. Prefer `--input` for complex request bodies.

## Reference files

* Browse the generated [OpenAPI 3 reference](/api/openapi.md), grouped by product area.
* Download the normalized [OpenAPI document](/openapi.json).
* Read [API authentication](/api/authentication.md) before calling the API outside the CLI.

> **Warning: Public contract**
>
> The generated page follows the shipped platform schema. Some operations are primarily used by Trylle's own web application and may change faster than first-class CLI commands. Validate the exact endpoint before building a durable integration.