Skip to content

Metadata, entries and binding as one document

POST
/worldbook/{worldbookId}/document
curl --request POST \
--url https://api.harperharbor.com/open/v1/worldbook/example/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "metadata": { "name": "example", "description": "example", "tags": [ "example" ] }, "entries": [ { "entryId": "example", "name": "example", "content": "example", "keywords": [ "example" ], "secondaryKeywords": [ "example" ], "matchOptions": { "caseSensitive": true, "matchWholeWords": true, "selectiveLogic": 1 }, "category": "example", "isEnabled": true, "isConstant": true, "priority": 1, "sortOrder": 1, "lastUpdateTime": "example", "activationCount": 1, "op": "create" } ], "binding": { "roleId": "example" } }'
worldbookId
required
string
Media typeapplication/json
object
metadata
object
name
string
description
string
tags
Array<string>
entries
Array
object
entryId
string
name
string
content
string
keywords
Array<string>
secondaryKeywords

AND gate — the entry fires only when a main keyword and one of these both appear.

Array<string>
matchOptions

null for native entries; { caseSensitive, matchWholeWords, selectiveLogic } for tavern-format worldbooks.

object
caseSensitive
boolean
matchWholeWords
boolean
selectiveLogic

0 any · 1 not all · 2 none · 3 all of secondaryKeywords

integer
<= 3
category
string
isEnabled
boolean
isConstant
boolean
priority
integer
sortOrder
integer
lastUpdateTime
string
activationCount
integer
op
string
Allowed values: create update delete
binding
object
roleId
string

On update

Media typeapplication/json
object
createdEntryIds
Array<string>
updatedCount
integer
deletedCount
integer
bound
boolean
Examplegenerated
{
"createdEntryIds": [
"example"
],
"updatedCount": 1,
"deletedCount": 1,
"bound": true
}