corpus

Create or upsert a corpus entry

Creates a new entry. If externalId is provided, performs an idempotent upsert (designed for CMS sync flows like the WordPress plugin).

post/tenants/{slug}/corpus

Request

  • Base URL: https://api.animam.ai
  • URL: https://api.animam.ai/tenants/{slug}/corpus
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key
    • OAuth 2 (authorization code, authorization URL https://api.animam.ai/oauth/authorize, token URL https://api.animam.ai/oauth/token, scopes: corpus:write)

Path parameters

slugstring required

Tenant slug (URL-safe identifier).

Example:dr-martin

Request body

titlestring required
contentstring required

Full body of the entry.

summarystring

Short summary surfaced in prompt; full content fetched on-demand via EXPLORE_CORPUS.

segmentSlugstring
priorityinteger
isActiveboolean
externalIdstring

Idempotency key from caller (e.g. wp-post-42). Upserts on conflict.

sourcestring
sourceUrlstring uri
localestring

2-letter ISO language code of the entry (en, fr, es, …). Used to scope retrieval per visitor locale on multilingual sites.

Example request

{
  "title": "Opening hours",
  "isActive": true
}

Response

Existing entry updated (upsert path).

createdfalse required

Changes

No recorded changes to this operation across all 1 revision of this API.