Read API · v1

Bring live Claire context into your agents and tools.

The Claire API exposes scoped, read-only organization data through versioned HTTP endpoints. Credentials select the organization automatically—never send an organization ID in an API query.

Quickstart

Authenticate with a bearer key

Owners and admins create credentials in Developers → Settings. Members may read API and MCP connection instructions but cannot issue credentials. Put the one-time secret in your runtime’s secret configuration as CLAIRE_API_KEY; never commit it, log it, place it in browser storage or add it to a URL.

Enable API or Both on the credential. In Context → Sources, explicitly allow agent access to the sources you want to share; a read permission alone does not expose a source. Prefer a native agent connection? Set up read-only MCP with the same credential system. MCP uses Streamable HTTP with a Bearer key, not browser OAuth.

export CLAIRE_API_URL="https://app.tryclaire.net/api/v1"
export CLAIRE_API_KEY="your-key-from-developers-settings"

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer ${CLAIRE_API_KEY}" \
  -H "Accept: application/json" \
  "${CLAIRE_API_URL}/context"

CLAIRE_API_URL above uses this page’s current origin, so the same instructions work against a local Claire instance without contacting production.

Reference

Endpoints

Endpoints require the named permission (either permission for People) plus matching source grants. Responses are JSON unless a conditional request returns 304 Not Modified.

  • GET/api/v1/context

    Organization identity, granted scopes, and connected-source availability.

    Organization context
  • GET/api/v1/sources

    Discover explicitly approved sources available to this key, with collection health and coverage.

    Organization context
  • GET/api/v1/search

    Search included, externally approved documents, conversations, people and metadata.

    Parameters: q, source, after, before, limit

    Organization context
  • GET/api/v1/people

    List source-only identities from approved Telegram or X activity; no Claire account profiles or team notes.

    Parameters: q, page

    Telegram or X mentions
  • GET/api/v1/people/{key}

    Read permitted stored activity for a platform person key returned by the directory.

    Telegram or X mentions
  • GET/api/v1/knowledge

    Search the canonical knowledge library without widening visibility or suppression rules.

    Parameters: q, kind, visibility, archived, page

    Knowledge
  • GET/api/v1/knowledge/{id}

    Read a bounded segment of one canonical source or note.

    Parameters: offset, limit

    Knowledge
  • GET/api/v1/assets

    List file and folder metadata. Private storage keys and signed URLs are never returned.

    Parameters: folderId, page

    Asset metadata
  • GET/api/v1/assets/{id}

    Read metadata for one file or folder.

    Asset metadata
  • GET/api/v1/telegram/chats

    List linked Telegram chats and persisted collection coverage.

    Parameters: page

    Telegram
  • GET/api/v1/telegram/chats/{id}/messages

    Read persisted messages without making Telegram provider calls.

    Parameters: q, before, limit

    Telegram
  • GET/api/v1/x/mentions

    Read persisted mentions without a paid fetch; marks the workspace watched for the existing collector cadence.

    Parameters: page

    X mentions
  • GET/api/v1/token

    Read persisted token index/fee data without provider calls; marks the workspace watched for the budgeted worker cadence.

    Token

Lists and documents

Pagination and continuation

List pages start at 1

Use page=1 for the first page. Knowledge and X mentions return up to 20 rows; assets and Telegram chats return up to 50. Numbered list responses include pagination.page, pageSize, total, totalPages and hasNextPage; assets also identify the current folder.

curl --get --fail-with-body --silent --show-error \
  -H "Authorization: Bearer ${CLAIRE_API_KEY}" \
  --data-urlencode "q=governance" \
  --data-urlencode "kind=note" \
  --data-urlencode "visibility=team" \
  --data-urlencode "archived=false" \
  --data-urlencode "page=1" \
  "${CLAIRE_API_URL}/knowledge"

Continue long knowledge content

GET /knowledge/[id] accepts a zero-based offset and a limit from 1 to 50,000 (default 20,000). Follow data.contentRange.nextOffset until it is null. Telegram message search uses a positive message ID in before and a limit from 1 to 100 (default 50); its pagination reports hasMore, nextBefore and whether search coverage was limited.

Response contract

Freshness, caching and failures

Freshness is explicit

Successful responses include meta.organizationId and meta.freshness. The freshness source is database, collector, provider or local_preview; status is current, stale, unavailable or synthetic. updatedAt can be null and note explains important gaps. Treat stale, unavailable and synthetic data as real states, not empty success. X mentions and token reads use persisted data; active clients mark those sources as watched for the background collector, but no API request forces a paid provider refresh.

{
  "data": [],
  "meta": {
    "organizationId": "org_example",
    "freshness": {
      "source": "collector",
      "updatedAt": null,
      "status": "unavailable",
      "note": "No X mention collection has completed."
    }
  }
}

ETags avoid unchanged payloads

Save the ETag header and send it back in If-None-Match. An unchanged authorized response returns 304 with no body. Authentication, live eligibility and quota checks still happen before that response. Authenticated data is private and varies by Authorization; do not put it in a shared cache.

# First request: save the ETag response header.
curl -i -H "Authorization: Bearer ${CLAIRE_API_KEY}" \
  "${CLAIRE_API_URL}/context"

# Later: unchanged data returns 304 with no response body.
curl -i -H "Authorization: Bearer ${CLAIRE_API_KEY}" \
  -H 'If-None-Match: "etag-from-the-first-response"' \
  "${CLAIRE_API_URL}/context"

Rate and error semantics

Shared limits are 120 requests per minute per key, 600 per organization, and 300 per IP address on early access; the top plan, which comes with a verified 25,000 $CLAIRE holding or the Pro plan, raises the first two to 360 and 1,800. Read RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset on responses; RateLimit-Limit is the limit that applies, and reset is the number of seconds until the current window ends. A 429 also supplies Retry-After; wait that long instead of retrying immediately.

HTTP/1.1 429 Too Many Requests
RateLimit-Limit: 120
RateLimit-Remaining: 0
RateLimit-Reset: 42
Retry-After: 42

Application errors use {"error":{"code":"…","message":"…"},"requestId":"…"}. Expect 400 for invalid input, 401 for a missing or unusable credential, 403 for a missing scope, 404 for an inaccessible resource, 405 for the wrong method, 413 for a request body, 429 for a limit, 503 when a required dependency is unavailable, and 504 for a processing timeout. Quote the matching X-Request-Id header when asking for help.

GET /api/v1/assets?page=0

HTTP/1.1 400 Bad Request
X-Request-Id: 7d0d4ec5-846c-4f3e-a62d-1433cfb4f851

{
  "error": {
    "code": "invalid_parameter",
    "message": "page must be between 1 and 10000."
  },
  "requestId": "7d0d4ec5-846c-4f3e-a62d-1433cfb4f851"
}

Least privilege

Scopes

A key’s scopes can be edited by an organization owner or admin in Developers → Settings, without changing the secret or expiry. Keys also stop authenticating when revoked, expired, or when their issuer is no longer an owner or admin of the organization.

context:read
Organization context. Read organization identity, connection availability, and granted permissions.
knowledge:read
Knowledge. Read the Knowledge library, including team notes and draft documentation.
assets:read
Asset metadata. Read asset and folder metadata; private file contents and storage keys are not included.
telegram:read
Telegram. Read linked chats and stored messages, which may disclose private member data to the agent provider.
x:read
X mentions. Read stored X mentions, which may disclose private member data to the agent provider.
token:read
Token. Read linked token metadata, persisted fee snapshots, holder summaries, and collection freshness.

Agent skill

Install the Claire skill

The skill teaches a compatible coding agent how to call this read API. It requires shell or HTTP access. Configure CLAIRE_API_URL=https://app.tryclaire.net/api/v1 and CLAIRE_API_KEY as a secret in the agent runtime; the skill file contains no credential and makes no MCP claim.

Claude Code

mkdir -p .claude/skills/claire
curl --fail-with-body --silent --show-error \
  "https://app.tryclaire.net/developers/skill.md" \
  -o .claude/skills/claire/SKILL.md
# Invoke with /claire

Codex

mkdir -p .agents/skills/claire
curl --fail-with-body --silent --show-error \
  "https://app.tryclaire.net/developers/skill.md" \
  -o .agents/skills/claire/SKILL.md
# Invoke with $claire