Skip to content

Restore a KB entry version

POST
/api/kb-entries/{entryId}/versions/{versionId}/restore

Restores a previous version of a knowledge base entry by publishing its content as a new version. History is preserved: the prior published version is superseded rather than overwritten. When the restored content already matches the current content, no new version is created.

entryId
required
string format: uuid

The unique identifier of the KB entry.

versionId
required
string format: uuid

The unique identifier of the version to restore.

The version was restored and a new published version was recorded, or the restore was a no-op.

The result of restoring a version. A restore creates a new published version rather than mutating history. When the restored content matches the current content, no new version is created.

object
versionId
required

Identifier of the newly published version, or of the existing current version when the restore was a no-op.

string format: uuid
Example
v9a8b7c6-5432-10fe-dcba-0987654321ab
created
required

Whether a new version was created. False when the restored content already matched the current content.

boolean
Example
true
restoredFrom
required

The version number that was restored.

integer
Example
2

No KB entry or version exists with the given ID in the authenticated tenant.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]

The version’s question is held by another entry of the workspace. code is duplicate_question and entryId names the entry that holds it.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]