# Fly in Public API, Telegram bot, and MCP

Fly in Public lets builders keep a public flight alive by posting proofs of work. These docs are optimized for AI agents and command-line clients.

## Quick start

1. For AI assistants, start with the skill guide: https://flyinpublic.com/docs/skills.md.
2. For Telegram, send `/start` to the hosted bot or connect from profile settings.
3. For scripts and custom clients, open https://flyinpublic.com/settings/profile and create an API token. Copy it immediately; it is only shown once.

## Authentication

All `/api/v1/*` endpoints accept either a logged-in session cookie or a bearer token, except token management endpoints, which are session-only.

```http
Authorization: Bearer fip_...
```

Tokens belong to one user account. Revoke tokens from profile settings.

## HTTP API

Base URL: `https://flyinpublic.com/api/v1`

Responses are JSON.

## Versioning

| Field | Value |
| --- | --- |
| API version | `v1` |
| Docs version | `2026-05-14` |
| Base path | `/api/v1` |
| Stability | Additive fields may be added to `v1`; breaking response or behavior changes require a new versioned path such as `/api/v2`. |

### v1 changelog

| Date | Change |
| --- | --- |
| `2026-05-14` | Hosted OAuth MCP added at /mcp, advanced bearer-token MCP retained at /api/mcp, Telegram bot-first linking added with /telegram/connect, and the in-repo Fly in Public skill plus /docs/skills introduced. |

## Endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/v1/me` | Viewer profile, project, and Telegram link state. |
| GET | `/api/v1/bird/state` | Live flight state: altitude, status, crash deadline. |
| GET | `/api/v1/proofs` | Your proofs, most recent first. |
| POST | `/api/v1/proofs` | Create a proof. Body: `{ url, message?, proofType?, publishedAt? }`. |
| GET | `/api/v1/leaderboard/me` | Your rank and a page of entries. |
| GET | `/api/v1/tokens` | List API tokens with prefix, last-used time, and recent daily usage. Session-only. |
| POST | `/api/v1/tokens` | Create or revoke a token with `_intent=create&name=...` or `_intent=revoke&id=...`. Session-only. |
| POST | `/api/v1/telegram/link` | Generate a Telegram link code. Session-only. |
| POST | `/api/v1/telegram/unlink` | Disconnect Telegram. Session-only. |

### Examples

```bash
curl -H "Authorization: Bearer $FIP_TOKEN" \
  https://flyinpublic.com/api/v1/bird/state

curl -X POST \
  -H "Authorization: Bearer $FIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/post","message":"Shipped today!"}' \
  https://flyinpublic.com/api/v1/proofs
```

## Telegram bot

Telegram bot: https://t.me/flyinpublic_bot

User setup:

1. Open the bot in Telegram and send `/start`.
2. Tap the signed confirmation link the bot sends back.
3. Sign in to Fly in Public if needed, then confirm the chat connection.
4. Return to Telegram and run `/status` or `/proof <url>`.

Settings compatibility: open profile settings, click "Connect Telegram", and send the 6-character code to the bot. Links and codes expire after 15 minutes.

Commands:

- `/start`: get a web confirmation link for this chat.
- `/start <code>`: link this chat with a settings-generated code.
- `/whoami`: linked account name, handle, email, and profile.
- `/status`: altitude, crash deadline, recent streak.
- `/proof <url> [message]`: post a new proof.
- `/leaderboard`: top flights and your rank.
- `/notifications crash on|off`: toggle 6h, 2h, and 30m crash warnings.
- `/notifications likes|comments on|off`: toggle interaction alerts.
- `/unlink`: disconnect this chat.
- `/help`: command list.

## MCP

Skill-first setup: https://flyinpublic.com/docs/skills.md

Hosted MCP endpoint: `https://flyinpublic.com/mcp`

Use OAuth sign-in when your MCP client connects. Advanced bearer-token MCP remains available at `https://flyinpublic.com/api/mcp`.

## LLM docs

- Markdown API docs: https://flyinpublic.com/docs/api.md
- Markdown skill docs: https://flyinpublic.com/docs/skills.md
- Markdown MCP docs: https://flyinpublic.com/docs/mcp.md
- LLM index: https://flyinpublic.com/llms.txt
- Combined docs: https://flyinpublic.com/llms-full.txt
