Create or update a trial
const url = 'https://api.harperharbor.com/open/v1/trial-cards/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","card":{},"welcome":{"roleWelcome":"example","alternates":["example"],"prologue":["example"]},"worldbook":{"name":"example","format":"tavern","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}]},"authorAsset":{"rules":[{"id":"example","name":"example","find":"example","replace":"example","enabled":true}],"mountTrigger":"example","mountLayer":"under"},"evict":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.harperharbor.com/open/v1/trial-cards/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "card": {}, "welcome": { "roleWelcome": "example", "alternates": [ "example" ], "prologue": [ "example" ] }, "worldbook": { "name": "example", "format": "tavern", "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 } ] }, "authorAsset": { "rules": [ { "id": "example", "name": "example", "find": "example", "replace": "example", "enabled": true } ], "mountTrigger": "example", "mountLayer": "under" }, "evict": true }'The body is the whole trial; the server hashes every section and writes only what changed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Names the trial; re-sending the same key updates it.
Request Bodyrequired
Section titled “Request Bodyrequired”The whole trial. A section that is absent is removed from the trial if it existed before.
object
Display name for the trial card.
Same fields as /role/:roleId/document; roleWelcome inside it is ignored — openings live in welcome.
object
object
object
Marks a SillyTavern-style world info book; omit for a native worldbook.
object
AND gate — the entry fires only when a main keyword and one of these both appear.
null for native entries; { caseSensitive, matchWholeWords, selectiveLogic } for tavern-format worldbooks.
object
0 any · 1 not all · 2 none · 3 all of secondaryKeywords
Display rules the canvas applies to AI output.
object
object
Replace the oldest trial when all slots are taken.
Responses
Section titled “Responses”Trial summary.
object
Earliest expiry time. Cleanup may run a few minutes later.
object
Sha256 per section
object
object
Examplegenerated
{ "clientKey": "example", "roleId": "example", "created": true, "expiresAt": "2026-04-15T12:00:00Z", "slots": { "used": 1, "max": 1 }, "sections": { "additionalProperty": "example" }, "changed": [ "example" ], "worldbook": { "worldbookId": "example", "entries": 1, "created": 1, "deleted": 1 }}trial_invalid_key · trial_invalid_body · trial_unsupported
object
Machine-readable code. unauthorized means authentication failed. Refresh the token; if refresh fails, request authorization again.
One English sentence a client may show verbatim.
Present on some 4xx errors with the offending part.
object
Example
{ "error": "unauthorized"}trial_slots_full — send the same PUT with evict true to replace oldest.
object
Machine-readable code. unauthorized means authentication failed. Refresh the token; if refresh fails, request authorization again.
One English sentence a client may show verbatim.
Present on some 4xx errors with the offending part.
object
Example
{ "error": "unauthorized"}trial_payload_too_large — detail says exactly which limit.
object
Machine-readable code. unauthorized means authentication failed. Refresh the token; if refresh fails, request authorization again.
One English sentence a client may show verbatim.
Present on some 4xx errors with the offending part.
object
Example
{ "error": "unauthorized"}worldbook_unavailable
object
Machine-readable code. unauthorized means authentication failed. Refresh the token; if refresh fails, request authorization again.
One English sentence a client may show verbatim.
Present on some 4xx errors with the offending part.
object
Example
{ "error": "unauthorized"}