Skip to main content
POST
Add a document from text

Authorizations

Authorization
string
header
required

A workspace API key: wdy_live_… / wdy_test_…. Created at POST /workspaces/{tenantId}/keys and shown exactly once.

Body

application/json
title
string
required
Required string length: 1 - 120
text
string
required

The content as plain text or Markdown. Never auto-translated.

Required string length: 1 - 200000
topics
array[]

Lowercase topic tags. An empty list makes the source universal.

Maximum array length: 12
agentId
object | null

The agent this belongs to; null/absent = the workspace pool.

Response

id
string
required
agentId
object | null
required

null = the workspace pool.

kind
string
required

upload, url or claim.

title
string
required
status
string
required

pending, ready, failed, …

lang
string
required

The canonical corpus language of the chunks.

translated
boolean
required
topics
string[]
required
chunkCount
number
required
tokenCount
number
required
summary
string
required

The index card: one English line naming what this covers.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
error
string

A machine-readable failure code.

sourceLang
string
fileName
string
contentType
string
byteSize
number
url
string
resolvedUrl
string
lastFetchedAt
string<date-time>
syncTtlMinutes
number
nextSyncAt
string<date-time>
claim
object