Skip to content

API Envelope & Errors

All API responses follow a consistent envelope format. Understanding it once applies to every endpoint.

http://<your-server>:7200/api/v1

All endpoint paths in this documentation are relative to this base. Example: POST /noteshttp://<your-server>:7200/api/v1/notes.

  • Requests: application/json (except file uploads, which use multipart/form-data)
  • Responses: application/json always
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Meeting notes",
"content": "Discussion points...",
"created_at": "2026-02-16T10:30:00Z"
}
}
{
"data": [
{ "id": "...", "title": "Note 1" },
{ "id": "...", "title": "Note 2" }
],
"meta": {
"total": 87,
"limit": 20,
"offset": 0
},
"tier": "free"
}

Appears as a string ("free" or "pro") in the response root. Indicates the user’s current tier.

The Free tier has no storage limits — unlimited records in all domains. The difference between Free and Pro is features, not quantity:

FeatureFreePro
Unlimited CRUD (all domains)YesYes
Full-text searchYesYes
Semantic search (vector)NoYes
Sync connectors (Google, Apple…)NoYes
Digest EngineNoYes
Photo AI indexingNoYes
BYOK AI (your own API keys)YesYes

When a Free user attempts a Pro feature, the endpoint returns 403 FEATURE_NOT_AVAILABLE.

All errors use this structure:

{
"error": {
"code": "VALIDATION_ERROR",
"message": "The 'title' field is required",
"details": {
"field": "title",
"constraint": "required"
}
}
}
HTTPCodeWhen
400VALIDATION_ERRORInvalid or missing fields in body
400INVALID_QUERYInvalid query parameters (sort, filter, fields)
400USER_CONTEXT_REQUIREDMulti-user: system token without user context headers
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENAdmin endpoint accessed by non-admin user
403FEATURE_NOT_AVAILABLEFeature requires Pro tier
403INSUFFICIENT_SCOPEAPI key lacks required scope
404NOT_FOUNDResource does not exist
409CONFLICTUniqueness conflict
409FILE_EXISTSDuplicate filename in same folder
422UNPROCESSABLEValid JSON but semantically incorrect
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORUnexpected server error
503SERVICE_UNAVAILABLEDependent component unavailable
HeaderRequiredDescription
AuthorizationYesBearer token (API key, JWT, or system token)
Content-TypeYes (POST/PATCH)application/json or multipart/form-data
X-Claw-User-IdNoUUID. Only with scope:system API keys for user impersonation
X-Claw-SourceNoIdentifies the sync connector (e.g., google-calendar). Auto-sets the source field
X-Request-IdNoUUID for tracing. Auto-generated if not sent
HeaderDescription
X-Request-IdRequest UUID (echo or auto-generated)
X-Claw-TierCurrent tier: free or pro
X-Claw-VersionCore version (e.g., 0.16.0)

The API uses URL prefix versioning (/api/v1). When breaking changes are introduced, /api/v2 will be created and the previous version maintained for at least 6 months with a Deprecation header.