RAG White-Label

Upsert a document

Push a markdown document into a customer's connection by your own stable id, creating or replacing it in one call.

Raw markdown guide for AI
Guide contents

Upsert markdown by a stable UID whenever the source data changes. The UID is yours, so re-pushing the same document updates it rather than adding a duplicate, and re-pushing unchanged content costs nothing.

Request fields

connection_idinteger
Required, in the path. The CONN_ID returned when you created the connection.
uidstring
Required, in the path. Your own stable id for the document, 1 to 255 characters of a-z, 0-9, hyphen, underscore or dot. Re-using it updates that document rather than adding another.
titlestring
Required. The document's title, up to 255 characters.
bodystring
Required. The document as markdown, up to 100KB. An empty body is a 422: delete the post instead.

Response fields

statusstring
What the upsert did: created, updated, or unchanged when the content matched what was already indexed.
postobject
The post as it now stands.
post.uidstring
The stable UID you addressed the post with.
post.titlestring
The title you sent with this upsert.
post.chunk_countinteger
Embedded passages the body was split into.
post.will_indexboolean
Whether the post is included in the index; an excluded post is a 409 rather than an upsert.
post.created_attimestamp
When the post was first pushed.
post.updated_attimestamp
When the post was last written.

A 201 means the post was created; an existing uid answers 200 with status of updated, or unchanged when the content already matched.

No polling step

Chunking and embedding happen inside the request, so once you have a 201 that content is already searchable by /context and /question.

For small ad-hoc notes you want back word for word rather than retrieved by meaning, use a namespace instead of a document.

Quotas

Standard custom-connection quotas apply: 1,000 posts and 100MB per connection, 100KB per post body, and up to 6 custom connections per API account within that account's ceiling of 10 connections.