> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telepatia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Publisher document updates

> Tell Telepatia when one of your documents changes, so the knowledge library serves the new version

A publisher that licenses its content to Telepatia can tell Telepatia when a document changes.
Telepatia then fetches the new version from the publisher's API, prepares it, and serves it in the
knowledge library. Telepatia Intelligence cites the new version in its next answers.

The notice carries only the document id. It never carries content or a URL. Telepatia fetches the
document from the source that the publisher and Telepatia agreed on.

## Before you start

You need two things from Telepatia:

1. **An API key with the publisher permission.** The key carries `library:notify:<publisher>`, for
   example `library:notify:moc`. A key without this permission gets `403`. A key can notify for one
   publisher only.
2. **The agreed document id.** Every document has one `externalId`: your own id for it. Telepatia
   and you agree on the format of this id once. Telepatia stores it on each document.

## Send a notice

Send one request each time a document changes:

```bash theme={null}
curl -X POST https://scribe-api.telepatia.ai/v1/publishers/documents/changed \
  -H "Authorization: Bearer $TELEPATIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "oncology/breast-cancer/adjuvant-treatment",
    "eventId": "evt_01JBX7Z3Q9",
    "changedAt": "2026-11-03T14:00:00Z"
  }'
```

| Field | Required | Description |
| - | - | - |
| `externalId` | Yes | Your id for the document that changed. |
| `eventId` | Yes | Your unique id for this notice. |
| `changedAt` | No | When the document changed at your side. |

A `202 Accepted` response means that Telepatia queued the notice:

```json theme={null}
{
  "accepted": true,
  "eventId": "evt_01JBX7Z3Q9"
}
```

## What Telepatia does

1. Telepatia fetches the document from your API.
2. When the content is the same as the version that Telepatia serves, nothing changes.
3. When the content is different, Telepatia stores it as a new version and prepares it. The
   current version stays in service until the new version is ready.
4. When Telepatia does not have the document yet, Telepatia adds it to the library.

Notices for the same document are processed one after the other, in the order they arrive.

## Retries

* A retry with the same `eventId` is safe. Telepatia processes each `eventId` once.
* On `503`, retry with the same `eventId`. Use a backoff, for example 1, 5 and 30 minutes.
* Do not retry on `400`, `401` or `403`. Fix the request or the key first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.