ReClaw API docs for backup automation and agent integrations.

Predictable URLs for API docs, OpenAPI, auth, JSON errors, streaming progress, MCP, and webhook status.

OpenAPI

The public ReClaw Backup API contract is published at /openapi.json. Agents should use it as the source of truth for request bodies, response schemas, auth headers, error shapes, and SSE progress events.

Authentication

API callers use scoped ReClaw API keys with Authorization: Bearer <key> or x-api-key: <key>. Browser sessions are for the dashboard.

  • backups:read for account state, backup records, and SSE status events.
  • backups:write for bootstrap, upload creation, finalization, rotation, reset, and deletion.
  • backups:restore for encrypted archive downloads.

Endpoints

MethodPathPurpose
GET/api/backup-accountRead encrypted backup account state.
PATCH/api/backup-accountReserved cadence update endpoint.
POST/api/backup-account/bootstrapInitialize client-wrapped vault material.
POST/api/backup-account/rotateRotate wrapped vault material.
POST/api/backup-account/resetReset backup account state.
GET/api/backupsList visible backups.
POST/api/backupsCreate encrypted archive upload slot.
POST/api/backups/uploadUpload encrypted archive bytes.
GET/api/backups/{id}Read backup detail.
DELETE/api/backups/{id}Delete a backup.
POST/api/backups/{id}/finalizeFinalize encrypted backup metadata.
GET/api/backups/{id}/contentDownload encrypted archive bytes.
GET/api/backups/{id}/eventsStream backup status progress events over Server-Sent Events.

Streaming

For progress-aware backup workflows, subscribe to the SSE endpoint after creating a backup record.

curl -N \
  -H "Accept: text/event-stream" \
  -H "Authorization: Bearer $RECLAW_TOKEN" \
  https://reclaw.io/api/backups/<backup-id>/events

JSON Errors

ReClaw returns JSON errors with a machine-readable code and a resolution hint. Agents do not need to parse HTML error pages.

{
  "error": "Authentication is required.",
  "code": "authentication_required",
  "message": "Authentication is required.",
  "resolution": "Send a browser session or ReClaw API key with Authorization: Bearer <key> or x-api-key."
}

MCP

The read-only ReClaw MCP server is available at /mcp with Streamable HTTP transport. It exposes discovery tools for docs, pricing, CLI install commands, and developer guidance.

Webhooks

Outbound webhooks are not emitted yet. Use SSE for in-flight progress and the backup API for durable state. See /webhooks for the current event-delivery contract.