# API reference

Every operation, available as a REST endpoint and as an MCP tool with the same name, inputs and rules.

Each operation below is one REST endpoint and one MCP tool. The classification follows Meta Muse: **Read** changes nothing, **Write** changes data, and **Sensitive write** changes what visitors see or is hard to undo, so it needs `confirm: true` after the person agrees.

## Account and discovery

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [get_account](https://covo.lanaai.io/docs/reference/get_account) | `GET /api/v1/me` | Read | any |
| [list_workspaces](https://covo.lanaai.io/docs/reference/list_workspaces) | `GET /api/v1/workspaces` | Read | any |
| [list_agents](https://covo.lanaai.io/docs/reference/list_agents) | `GET /api/v1/agents` | Read | any |
| [get_agent](https://covo.lanaai.io/docs/reference/get_agent) | `GET /api/v1/agents/{agent_id}` | Read | `agents:read` |
| [get_configuration_schema](https://covo.lanaai.io/docs/reference/get_configuration_schema) | `GET /api/v1/schema/configuration` | Read | any |

## Inspect an agent

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [get_agent_configuration](https://covo.lanaai.io/docs/reference/get_agent_configuration) | `GET /api/v1/agents/{agent_id}/configuration` | Read | `agents:read` |
| [list_knowledge_sources](https://covo.lanaai.io/docs/reference/list_knowledge_sources) | `GET /api/v1/agents/{agent_id}/knowledge/sources` | Read | `agents:read` |
| [list_agent_tools](https://covo.lanaai.io/docs/reference/list_agent_tools) | `GET /api/v1/agents/{agent_id}/tools` | Read | `agents:read` |
| [get_agent_activity](https://covo.lanaai.io/docs/reference/get_agent_activity) | `GET /api/v1/agents/{agent_id}/activity` | Read | `agents:read` |

## Change an agent

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [preview_agent_changes](https://covo.lanaai.io/docs/reference/preview_agent_changes) | `POST /api/v1/agents/{agent_id}/configuration/preview` | Read | `agents:read` |
| [update_agent_configuration](https://covo.lanaai.io/docs/reference/update_agent_configuration) | `PATCH /api/v1/agents/{agent_id}/configuration` | Sensitive write | `agents:write` |
| [import_knowledge_from_url](https://covo.lanaai.io/docs/reference/import_knowledge_from_url) | `POST /api/v1/agents/{agent_id}/knowledge/sources` | Write | `agents:write` |

## Drafts

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [create_draft](https://covo.lanaai.io/docs/reference/create_draft) | `POST /api/v1/agents/{agent_id}/drafts` | Write | `agents:write` |
| [list_drafts](https://covo.lanaai.io/docs/reference/list_drafts) | `GET /api/v1/agents/{agent_id}/drafts` | Read | `agents:read` |
| [get_draft](https://covo.lanaai.io/docs/reference/get_draft) | `GET /api/v1/agents/{agent_id}/drafts/{draft_id}` | Read | `agents:read` |
| [update_draft](https://covo.lanaai.io/docs/reference/update_draft) | `PATCH /api/v1/agents/{agent_id}/drafts/{draft_id}` | Write | `agents:write` |
| [apply_draft](https://covo.lanaai.io/docs/reference/apply_draft) | `POST /api/v1/agents/{agent_id}/drafts/{draft_id}/apply` | Sensitive write | `agents:write` |
| [discard_draft](https://covo.lanaai.io/docs/reference/discard_draft) | `POST /api/v1/agents/{agent_id}/drafts/{draft_id}/discard` | Write | `agents:write` |

## Versions and rollback

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [list_versions](https://covo.lanaai.io/docs/reference/list_versions) | `GET /api/v1/agents/{agent_id}/versions` | Read | `agents:read` |
| [create_version](https://covo.lanaai.io/docs/reference/create_version) | `POST /api/v1/agents/{agent_id}/versions` | Write | `agents:write` |
| [get_version](https://covo.lanaai.io/docs/reference/get_version) | `GET /api/v1/agents/{agent_id}/versions/{version}` | Read | `agents:read` |
| [diff_versions](https://covo.lanaai.io/docs/reference/diff_versions) | `GET /api/v1/agents/{agent_id}/diff` | Read | `agents:read` |
| [restore_version](https://covo.lanaai.io/docs/reference/restore_version) | `POST /api/v1/agents/{agent_id}/versions/{version}/restore` | Sensitive write | `agents:publish` |

## Validate and test

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [validate_agent](https://covo.lanaai.io/docs/reference/validate_agent) | `POST /api/v1/agents/{agent_id}/validate` | Read | `agents:read` |
| [run_agent_test](https://covo.lanaai.io/docs/reference/run_agent_test) | `POST /api/v1/agents/{agent_id}/tests` | Write | `agents:test` |
| [list_test_runs](https://covo.lanaai.io/docs/reference/list_test_runs) | `GET /api/v1/agents/{agent_id}/tests` | Read | `agents:read` |
| [get_test_run](https://covo.lanaai.io/docs/reference/get_test_run) | `GET /api/v1/agents/{agent_id}/tests/{test_run_id}` | Read | `agents:read` |
| [diagnose_agent](https://covo.lanaai.io/docs/reference/diagnose_agent) | `GET /api/v1/agents/{agent_id}/diagnostics` | Read | `agents:read` |

## Deployment

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [get_deployment_status](https://covo.lanaai.io/docs/reference/get_deployment_status) | `GET /api/v1/agents/{agent_id}/deployment` | Read | `agents:read` |
| [publish_agent](https://covo.lanaai.io/docs/reference/publish_agent) | `POST /api/v1/agents/{agent_id}/publish` | Sensitive write | `agents:publish` |
| [unpublish_agent](https://covo.lanaai.io/docs/reference/unpublish_agent) | `POST /api/v1/agents/{agent_id}/unpublish` | Sensitive write | `agents:publish` |

## Short links

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [list_short_links](https://covo.lanaai.io/docs/reference/list_short_links) | `GET /api/v1/agents/{agent_id}/short-links` | Read | `agents:read` |
| [create_short_link](https://covo.lanaai.io/docs/reference/create_short_link) | `POST /api/v1/agents/{agent_id}/short-links` | Write | `agents:write` |
| [update_short_link](https://covo.lanaai.io/docs/reference/update_short_link) | `PATCH /api/v1/agents/{agent_id}/short-links/{short_link_id}` | Sensitive write | `agents:write` |
| [delete_short_link](https://covo.lanaai.io/docs/reference/delete_short_link) | `POST /api/v1/agents/{agent_id}/short-links/{short_link_id}/delete` | Sensitive write | `agents:write` |

## Conversations

| Operation | REST | Classification | Scope |
| --- | --- | --- | --- |
| [list_conversations](https://covo.lanaai.io/docs/reference/list_conversations) | `GET /api/v1/agents/{agent_id}/conversations` | Read | `conversations:read` |
| [get_conversation](https://covo.lanaai.io/docs/reference/get_conversation) | `GET /api/v1/agents/{agent_id}/conversations/{conversation_id}` | Read | `conversations:read` |

## Machine-readable

- OpenAPI 3.1: [/api/v1/openapi.json](https://covo.lanaai.io/api/v1/openapi.json)
- MCP server: `https://covo.lanaai.io/mcp` (its `tools/list` carries the same schemas and annotations)
- Everything as one text file for agents: [/llms-full.txt](https://covo.lanaai.io/llms-full.txt)
