API overview
Harmony's HTTP API is the source of truth. The dashboard, the CLI, and the MCP server are all just clients. If you can curl, you can drive Harmony.
Base URL
https://platform.groupany.ai
For a self-hosted Harmony, substitute your own host. Health check at /api/health.
Authentication
Two mechanisms, both live:
| Caller | Mechanism | Carries | Status |
|---|---|---|---|
| Browser session | next-auth.session-token cookie | Issued by /api/auth/* after sign-in | live |
| Programmatic (CLI / MCP / agent / A2A) | Authorization: Bearer hk_… | A single workspace (grants admin) | live |
Every /api/* request resolves a (user, workspace, role) from whichever credential is present: a valid Authorization: Bearer hk_… authenticates as that key's workspace, otherwise the browser session cookie is used. Mint keys from the dashboard (Workspace → API keys); the secret is shown once.
See Authentication for details.
Status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
204 | Success, no body (deletes) |
400 | Validation failed — body includes details |
401 | Not authenticated |
403 | Authenticated but lacking the required role |
404 | Resource not found, or hidden because you lack access |
409 | Conflict (e.g. slug already taken) |
429 | Rate limited |
Errors
{
"error": "validation_failed",
"details": {
"formErrors": [],
"fieldErrors": { "slug": ["lowercase, digits, hyphens"] }
}
}
The error code is stable; the details shape varies per error. The CLI translates these into human messages.
Idempotency
Creation of versioned resources — skills, agents, tools (including their versions POST routes) — accepts an Idempotency-Key header (UUID v4 recommended). A repeat with the same key, path, and body returns the original response without re-executing; reusing a key with a different path or body is rejected with idempotency_key_in_use. Other mutating endpoints (e.g. POST /api/workspaces, session start) don't honor the header yet.
Pagination
Planned — list endpoints currently return a bare array, with no cursor or page-size controls. Cursor-based pagination ({ "<resource>": [...], "next": "<cursor>" } with ?cursor= / ?limit=) is intended but not yet implemented.
Versioning
The API is versioned: live endpoints sit under /api/v1/* today. Future breaking changes will land under /api/v2/*, with /api/v1/* staying supported for at least 12 months. (A few top-level utility routes — /api/me, /api/health, /api/auth/* — sit outside the versioned namespace.)