---
title: Busy API · Developers
description: The Busy Hub API: sign in, create bots, send messages and stream replies.
canonical: https://busybot.dev/developers
---

# Busy API for developers

Drive your own Busy hub over HTTP. The full reference is the [OpenAPI spec](https://busybot.dev/openapi.json).

## 1. Point at your hub

Every Busy install is its own hub, deployed to your Vercel account. Its API lives on the hub's domain.

```
HUB=https://your-hub.vercel.app
```

## 2. Sign in

The hub has one account. Sign in with its user and password; the response sets the busy_session cookie, valid for 30 days. Send it on every other call.

```
curl -c busy.txt -X POST "$HUB/api/auth/login" \
  -H "content-type: application/json" \
  -d '{"user":"you","password":"..."}'
```

## 3. List your bots

Each bot has a slug. A new bot answers once its status is ready.

```
curl -b busy.txt "$HUB/api/bots"
```

## 4. Send a message

The id is an idempotency key: retry with the same id and the turn never runs twice.

```
curl -b busy.txt -X POST "$HUB/api/bots/<slug>/messages" \
  -H "content-type: application/json" \
  -d "{\"id\":\"$(uuidgen)\",\"text\":\"Summarize today's inbox\"}"
```

## 5. Follow the reply

Server-sent events: a session event, then every fact and progress event of the conversation. Reconnect with ?after=<last event id>.

```
curl -N -b busy.txt "$HUB/api/bots/<slug>/events"
```

## Errors

Errors come back as JSON with a stable code, a message, whether a retry can help and the action that fixes them.

```
{
  "code": "unauthorized",
  "error": "unauthorized",
  "message": "Sign in first: POST /api/auth/login with {user, password}, ...",
  "action": "sign-in",
  "retryable": false,
  "docs": "https://busybot.dev/developers"
}
```

## Test and extend

Test against a hub you can throw away: run apps/hub locally from the repo, or create a test bot, so you never touch the bots you rely on. Bots are eve agents in templates/bot: change their tools, skills and instructions in your fork.

## Resources

- [OpenAPI spec (Busy Hub API)](https://busybot.dev/openapi.json)
- [llms.txt](https://busybot.dev/llms.txt)
- [busy-setup skill](https://github.com/MatiSolina/busy/blob/main/skills/busy-setup/SKILL.md)
- [Source code](https://github.com/MatiSolina/busy)
