Reference
API and management MCP
Create assistants and manage their content from your backend, your CI or your editor.
Authentication
Create an API key in the portal under Settings → API keys (Starter and up) and send it as a Bearer token. Keys belong to your organization, so keep them on your server. Get an API key.
Each key has an access level. Full keys read and write. Read-only keys can only send GET requests (anything else returns 403), and in the management MCP they only see the read tools. Give an agent that just analyses conversations or content a read-only key.
https://almanzor.cloud/api/v1Authorization: Bearer $ALMANZOR_API_KEYRate limit: 60 requests per minute per key. Over the limit you get a 429 with Retry-After.
Endpoints
/agentsList assistants/agentsCreate an assistant/agents/{id}Get an assistant/agents/{id}Update an assistant/agents/{id}Delete an assistant/agents/{id}/documentsList knowledge documents/agents/{id}/documentsUpload a document (multipart: file, mode)/agents/{id}/documents/{docId}Set how often a site imported by URL refreshes itself: { refresh: off | weekly | daily }/agents/{id}/documents/{docId}Delete a document/agents/{id}/conversationsFull widget conversations, newest first (from, to, q, csat, tests, limit, cursor). Test-mode chats have test: true; tests=hide leaves them out. Pro/agents/{id}/conversations/{conversationId}Delete a conversation and its messages, e.g. when a visitor asks to erase their data. Pro/agents/{id}/ingest-urlImport a public site (up to 60 pages, page URLs kept). replace: true swaps out earlier imports of the same URL; refresh: off, weekly or daily sets its automatic refresh{id} is the assistant UUID, returned when you create or list assistants. The MCP tools also accept the slug.
Examples
Create an assistant, import your docs site (for example from CI after each docs deploy), or upload a file.
curl -s -X POST "https://almanzor.cloud/api/v1/agents" \
-H "Authorization: Bearer $ALMANZOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "acme-docs",
"name": "Acme docs",
"instructions": "You answer questions about the Acme API using only its docs.",
"status": "active"
}'Errors
Errors return JSON: { "error": "…" }.
400- Invalid payload or validation error
401- Missing or invalid API key
402- Your plan has no API access (Starter and up) or a quota is exceeded
403- Read-only API key used for a request that changes data
404- Not found
409- Assistant slug already in use
429- Rate limit exceeded (see the Retry-After header)
500- Internal error
Management MCP for your team
The same operations as the API, from Cursor, Claude Code, Codex or VS Code. It uses your API key, so it's for your team. For your users' coding agents, use the public docs MCP.
https://almanzor.cloud/api/mcpclaude mcp add --transport http almanzor https://almanzor.cloud/api/mcp \
--header "Authorization: Bearer sk_live_..."list_agents- List the organization's assistants
get_agent- Get an assistant with its instructions and config
create_agent- Create an assistant
update_agent- Update an assistant
delete_agent- Delete an assistant
list_documents- List an assistant's knowledge
delete_document- Delete a document
ingest_url- Import a public site into an assistant's knowledge (replace: true to re-import, refresh to keep it up to date)
search_docs- Search an assistant's knowledge, with page URLs
list_conversations- Read an assistant's widget conversations, to review them and improve its instructions (Pro)
delete_conversation- Delete a conversation and its messages, e.g. for a privacy request (Pro)
Can't find something? Ask the assistant in the corner: it answers from these docs and links the page.