ctxstore.ai Facts API

The Facts API from ctxstore.ai — 3 operation(s) for facts.

GitHub OpenAPI

Operations 4

POST /api/v1/facts Store a fact #
POST /api/v1/facts/search Search facts #
GET /api/v1/facts/{fact_id} Get a fact by exact key #
DELETE /api/v1/facts/{fact_id} Delete a fact #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ctxstore-ai:ctxstore-ai-facts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ctxstore-ai-facts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ctxstore Ai Facts API
  version: 1.0.0
  contact:
    name: ctxstore.ai
    url: https://ctxstore.ai
  description: 'Operations tagged Facts across 2 of this provider''s published API definitions: ctxstore-ai-openapi.json, ctxstore-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ctxstore.ai
  description: Production
security:
- BearerAuth: []
tags:
- name: Facts
paths:
  /api/v1/facts:
    post:
      operationId: store_fact
      summary: Store a fact
      description: Store a persistent memory fact. Facts are semantically indexed and retrievable across any session or platform.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - text
              - category
              properties:
                text:
                  type: string
                  description: The fact to store
                  example: User prefers dark mode
                category:
                  type: string
                  enum:
                  - preference
                  - decision
                  - identity
                  - technical
                  - relationship
                  description: Fact category for filtering
                is_permanent:
                  type: boolean
                  default: true
                  description: Whether the fact persists indefinitely
      responses:
        '201':
          description: Fact stored successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  fact_id:
                    type: string
                  category:
                    type: string
                  is_permanent:
                    type: boolean
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
      tags:
      - Facts
    servers:
    - url: https://ctxstore.ai
      description: Production
  /api/v1/facts/search:
    post:
      operationId: search_facts
      summary: Search facts
      description: Semantically search stored facts. Returns the most relevant facts for the query.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - query
              properties:
                query:
                  type: string
                  description: Search query
                  example: user preferences
                top_k:
                  type: integer
                  default: 10
                  maximum: 100
                  description: Number of results to return
                category:
                  type: string
                  enum:
                  - preference
                  - decision
                  - identity
                  - technical
                  - relationship
                  description: Filter by category
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Fact'
                  count:
                    type: integer
        '401':
          description: Unauthorized
      tags:
      - Facts
    servers:
    - url: https://ctxstore.ai
      description: Production
  /api/v1/facts/{fact_id}:
    get:
      operationId: get_fact_by_key
      summary: Get a fact by exact key
      description: Deterministic exact-key read (inter-agent handoff + claim-mutex readback). The path segment is the URL-encoded fact KEY (colons/slashes encoded), not the UUID. Returns the current (non-deprecated) fact, or 404 if no live fact exists for the key. Tenant-scoped.
      parameters:
      - name: fact_id
        in: path
        required: true
        description: URL-encoded fact key, e.g. claim%3Aintechcloud%3Aticket-1
        schema:
          type: string
      responses:
        '200':
          description: The current fact for this key
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    type: string
                  text:
                    type: string
                  category:
                    type: string
                  is_permanent:
                    type: boolean
                  id:
                    type: string
        '404':
          description: No live fact for this key
        '401':
          description: Unauthorized
      tags:
      - Facts
    delete:
      operationId: delete_fact
      summary: Delete a fact
      parameters:
      - name: fact_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Fact deleted
        '404':
          description: Fact not found
      tags:
      - Facts
    servers:
    - url: https://ctxstore.ai
      description: Production
components:
  schemas:
    Fact:
      type: object
      properties:
        text:
          type: string
          description: The fact content
        score:
          type: number
          description: Semantic similarity score (0-1)
        category:
          type: string
          enum:
          - preference
          - decision
          - identity
          - technical
          - relationship
        is_permanent:
          type: boolean
        fact_id:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key from ctxstore.ai dashboard. Format: Bearer emk_...'
x-refined-from:
- ctxstore-ai-openapi.json
- ctxstore-ai-openapi.yml