Animam.ai Corpus API

Knowledge base CRUD.

Operations 7

GET /tenants/{slug}/corpus List corpus entries #
POST /tenants/{slug}/corpus Create or upsert a corpus entry #
POST /tenants/{slug}/corpus/bulk Bulk upsert corpus entries #
POST /tenants/{slug}/corpus/sync Import corpus entry from URL #
GET /tenants/{slug}/corpus/{id} Get a single corpus entry #
PUT /tenants/{slug}/corpus/{id} Update a corpus entry #
DELETE /tenants/{slug}/corpus/{id} Delete a corpus entry #

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/animam-ai:animam-ai-corpus-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

animam-ai-corpus-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Animam Ai Corpus API
  version: 2.1.0
  contact:
    name: Animam
    url: https://animam.ai
  license:
    name: Proprietary
  description: 'Operations tagged corpus across 2 of this provider''s published API definitions: animam-ai-openapi.json, animam-ai-original.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.animam.ai
  description: Production
tags:
- name: corpus
  description: Knowledge base CRUD.
paths:
  /tenants/{slug}/corpus:
    get:
      tags:
      - corpus
      summary: List corpus entries
      description: Paginated list of knowledge base entries for the tenant. Optionally filter by segment.
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:read
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      - schema:
          type: string
          description: Filter to a specific segment by slug.
        required: false
        description: Filter to a specific segment by slug.
        name: segmentSlug
        in: query
      - schema:
          type: integer
          minimum: 1
          example: 1
        required: false
        name: page
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          example: 50
        required: false
        name: limit
        in: query
      responses:
        '200':
          description: Paginated corpus list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCorpusResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getTenantsBySlugCorpus
      x-operation-id-source: derived
    post:
      tags:
      - corpus
      summary: Create or upsert a corpus entry
      description: Creates a new entry. If `externalId` is provided, performs an idempotent upsert (designed for CMS sync flows like the WordPress plugin).
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:write
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCorpusBody'
      responses:
        '200':
          description: Existing entry updated (upsert path).
          content:
            application/json:
              schema:
                type: object
                properties:
                  corpus:
                    $ref: '#/components/schemas/CorpusEntry'
                  created:
                    type: boolean
                    enum:
                    - false
                required:
                - corpus
                - created
        '201':
          description: Entry created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  corpus:
                    $ref: '#/components/schemas/CorpusEntry'
                  created:
                    type: boolean
                required:
                - corpus
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Corpus limit reached for the current plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postTenantsBySlugCorpus
      x-operation-id-source: derived
    servers:
    - url: https://api.animam.ai
      description: Production
  /tenants/{slug}/corpus/bulk:
    post:
      tags:
      - corpus
      summary: Bulk upsert corpus entries
      description: Up to 50 entries per call. Each entry must include `externalId` for idempotent upsert. Used by the WordPress plugin full-resync flow.
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:write
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkCorpusBody'
      responses:
        '200':
          description: Bulk operation summary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                  updated:
                    type: integer
                  skipped:
                    type: integer
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        externalId:
                          type: string
                        reason:
                          type: string
                      required:
                      - externalId
                      - reason
                required:
                - created
                - updated
                - skipped
                - errors
      operationId: postTenantsBySlugCorpusBulk
      x-operation-id-source: derived
    servers:
    - url: https://api.animam.ai
      description: Production
  /tenants/{slug}/corpus/sync:
    post:
      tags:
      - corpus
      summary: Import corpus entry from URL
      description: Fetches and converts a remote URL (HTML / MD / PDF) into a corpus entry.
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:write
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SyncCorpusBody'
      responses:
        '201':
          description: Entry imported.
          content:
            application/json:
              schema:
                type: object
                properties:
                  corpus:
                    $ref: '#/components/schemas/CorpusEntry'
                required:
                - corpus
      operationId: postTenantsBySlugCorpusSync
      x-operation-id-source: derived
    servers:
    - url: https://api.animam.ai
      description: Production
  /tenants/{slug}/corpus/{id}:
    get:
      tags:
      - corpus
      summary: Get a single corpus entry
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:read
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      - schema:
          type: string
          format: uuid
          description: Corpus entry UUID.
        required: true
        description: Corpus entry UUID.
        name: id
        in: path
      responses:
        '200':
          description: Corpus entry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  corpus:
                    $ref: '#/components/schemas/CorpusEntry'
                required:
                - corpus
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getTenantsBySlugCorpusById
      x-operation-id-source: derived
    put:
      tags:
      - corpus
      summary: Update a corpus entry
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:write
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      - schema:
          type: string
          format: uuid
          description: Corpus entry UUID.
        required: true
        description: Corpus entry UUID.
        name: id
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCorpusBody'
      responses:
        '200':
          description: Updated entry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  corpus:
                    $ref: '#/components/schemas/CorpusEntry'
                required:
                - corpus
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: putTenantsBySlugCorpusById
      x-operation-id-source: derived
    delete:
      tags:
      - corpus
      summary: Delete a corpus entry
      security:
      - bearerAuth: []
      - apiKey: []
      - oauth2:
        - corpus:write
      parameters:
      - schema:
          type: string
          description: Tenant slug (URL-safe identifier).
          example: dr-martin
        required: true
        description: Tenant slug (URL-safe identifier).
        name: slug
        in: path
      - schema:
          type: string
          format: uuid
          description: Corpus entry UUID.
        required: true
        description: Corpus entry UUID.
        name: id
        in: path
      responses:
        '200':
          description: Deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                - success
      operationId: deleteTenantsBySlugCorpusById
      x-operation-id-source: derived
    servers:
    - url: https://api.animam.ai
      description: Production
components:
  schemas:
    ListCorpusResponse:
      type: object
      properties:
        corpus:
          type: array
          items:
            $ref: '#/components/schemas/CorpusEntry'
        pagination:
          type: object
          properties:
            page:
              type: integer
            limit:
              type: integer
            total:
              type: integer
            totalPages:
              type: integer
          required:
          - page
          - limit
          - total
          - totalPages
      required:
      - corpus
      - pagination
    UpdateCorpusBody:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 255
        content:
          type: string
          minLength: 1
        summary:
          type: string
          maxLength: 500
        priority:
          type: integer
          minimum: 0
          maximum: 100
        isActive:
          type: boolean
        segmentSlug:
          type: string
    CreateCorpusBody:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 255
          example: Opening hours
        content:
          type: string
          minLength: 1
          description: Full body of the entry.
        summary:
          type: string
          maxLength: 500
          description: Short summary surfaced in prompt; full content fetched on-demand via EXPLORE_CORPUS.
        segmentSlug:
          type: string
        priority:
          type: integer
          minimum: 0
          maximum: 100
          example: 0
        isActive:
          type: boolean
          example: true
        externalId:
          type: string
          maxLength: 255
          description: Idempotency key from caller (e.g. wp-post-42). Upserts on conflict.
        source:
          type: string
          maxLength: 50
        sourceUrl:
          type: string
          maxLength: 500
          format: uri
        locale:
          type: string
          maxLength: 10
          pattern: ^[a-z]{2}(-[a-zA-Z]{2})?$/i
          description: 2-letter ISO language code of the entry (en, fr, es, …). Used to scope retrieval per visitor locale on multilingual sites.
      required:
      - title
      - content
    BulkCorpusBody:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/CreateCorpusBody'
          minItems: 1
          maxItems: 50
          description: Up to 50 entries per call. Idempotent on externalId.
      required:
      - entries
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details: {}
        code:
          type: string
      required:
      - error
    CorpusEntry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        content:
          type: string
        summary:
          type:
          - string
          - 'null'
        priority:
          type: integer
        isActive:
          type: boolean
        externalId:
          type:
          - string
          - 'null'
        source:
          type:
          - string
          - 'null'
        sourceUrl:
          type:
          - string
          - 'null'
        segment:
          type:
          - object
          - 'null'
          properties:
            slug:
              type: string
            name:
              type: string
          required:
          - slug
          - name
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - title
      - content
      - summary
      - priority
      - isActive
      - externalId
      - source
      - sourceUrl
      - segment
      - createdAt
      - updatedAt
    SyncCorpusBody:
      type: object
      properties:
        url:
          type: string
          format: uri
          example: https://example.com/faq
        title:
          type: string
          maxLength: 255
        segmentSlug:
          type: string
      required:
      - url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key (ak_...) or JWT
      description: 'Static API key (`Authorization: Bearer ak_xxx`) or short-lived JWT issued by /oauth/token.'
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Alternative header for legacy integrations.
    oauth2:
      type: oauth2
      description: OAuth 2.1 + PKCE for MCP-style agent integrations.
      flows:
        authorizationCode:
          authorizationUrl: https://api.animam.ai/oauth/authorize
          tokenUrl: https://api.animam.ai/oauth/token
          scopes:
            corpus:read: Read knowledge base entries
            corpus:write: Create / update / delete knowledge base entries
            segments:read: Read segments
            segments:write: Create / update segments
            settings:read: Read tenant settings
            settings:write: Update tenant settings
            stats:read: Read analytics and usage data
externalDocs:
  url: https://animam.ai/llms-full.txt
  description: Agent-readable full documentation (Markdown).
x-refined-from:
- animam-ai-openapi.json
- animam-ai-original.json