Skip to main content
Use the knowledge updates API to send facts from your systems to Caretta. Examples are release notes, price changes and product changes. Caretta learns each update as organisation knowledge and uses it in calls and chat. When an update contradicts a fact that Caretta already knows, Caretta replaces that fact if the published_at of the update is later than the date of each source of the fact. The date of a file or a taught text is the time that it was added to Caretta. You cannot edit an update. You can only send a new update or retract an old one. To correct an update, send a new update with a new id and a newer published_at. To retract an update, send DELETE.
Base URL: https://gateway.caretta.app

Quickstart

1

Create a key

As an organisation administrator, open Brain → Update feeds in Caretta. Select Create key. Give the key a name, for example “Release notes feed”.
2

Save the key

When Caretta shows the key, copy it. Caretta shows the key one time only. Keep it in a secrets manager.
3

Send an update

Send POST /v1/knowledge/updates with the key in the Authorization header.
4

Check the status

Send GET /v1/knowledge/updates. Find your update in the list. Its status starts as learning and changes to learned or to failed.

Keys

A key starts with ck_live_. Each key belongs to one organisation, and every request with that key acts on that organisation.
Do not put a key in source code, logs or URLs. A person who has the key can send, list and retract updates for your organisation.
An administrator can revoke a key at any time in Brain → Update feeds. Caretta rejects a revoked key at once, with 401 Unauthorized.

Authentication

Send the key in the Authorization header of every request:
For a missing, unknown or revoked key, Caretta returns 401 Unauthorized with the header WWW-Authenticate: Bearer realm="caretta".

Send an update

POST /v1/knowledge/updates The body is JSON, at most 4 MiB.
For a new update, Caretta returns 201 Created:
  • id is the Caretta id of the update. external_id is the id that you sent.
  • published_at is always in UTC.
  • status is learning, learned or failed. failed means that Caretta could not learn the update. Send the facts again as a new update with a new id. If it fails again, contact Support.

Retries are safe

If a request fails on the network, send the same body again. If the id, text and published_at are the same as a stored update, Caretta returns 200 OK with the stored update. Caretta does not store the update two times. If the retry has no published_at, Caretta compares only the id and the text. If a different update already uses the id, Caretta returns 409 Conflict:

Send a correction

You cannot edit an update. To correct it, send a new update with a new id and a newer published_at:

Retract an update

DELETE /v1/knowledge/updates/{id} Use the id that you sent, encoded for a URL path (for example, a space is %20). Caretta removes the update and the facts that it learned from the update.
Caretta returns 204 No Content. If no update has this id, Caretta returns 404 Not Found.

List your updates

GET /v1/knowledge/updates?limit=50&cursor=... This request lists the updates of your organisation by the time that Caretta got each one (created_at), newest first. The list also includes updates that AI agents sent through the Caretta MCP ("source": "mcp").
When next_cursor is null, there are no more pages.

Limits

  • You can send 120 requests each minute with each key. Above this limit, Caretta returns 429 Too Many Requests with a Retry-After header that gives the wait time in seconds. Wait for that number of seconds. Then send the request again.
  • The request body is at most 4 MiB. The text field is at most 1,000,000 characters.

Errors

Each error has a JSON body with error (a fixed code) and message (text for people). Use error in your code, because the message text can change.

What to send

Send facts about your products, prices and policies that your team must know in calls.
Do not send secrets, passwords or personal data. Caretta can use the facts that it learns in answers for every member of your organisation.

Get help

If you need help, see Support.