Archive a knowledgebase document
const url = 'https://app.prefactorai.com/api/v1/knowledgebase_document/013xrzp12g3nqk8ns6jadrqmpgrjkeny/archive';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '"013xrzp12g3nqk8ns6jadrqmpgrjkeny"'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.prefactorai.com/api/v1/knowledgebase_document/013xrzp12g3nqk8ns6jadrqmpgrjkeny/archive \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '"013xrzp12g3nqk8ns6jadrqmpgrjkeny"'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A valid knowledgebase document ID
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyRequest Body
Section titled “Request Body”ID of the latest revision the caller has seen. The write is rejected when this is not the document’s latest revision
A valid knowledgebase document revision ID
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyResponses
Section titled “Responses”Success
object
Full details of a knowledgebase document
object
Document content from the latest revision. Empty content is allowed
SHA-256 of the content, as lowercase hex
MIME type of the document
A valid knowledgebase document ID
A valid knowledgebase ID
A valid knowledgebase document revision ID
Revision number of the latest document revision
Document path, relative, with segments separated by /
Size of the content in bytes
Whether this document is active or archived
Type of resource (always ‘knowledgebase_document’)
Response status when the operation succeeds
Example
{ "details": { "content": "# Setup", "content_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "content_type": "text/markdown", "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "knowledgebase_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "latest_revision_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "latest_revision_number": 1, "path": "guides/setup.md", "size_bytes": 128, "status": "active", "type": "knowledgebase_document" }, "status": "success"}default
Section titled “default”Error
object
object
object
object
Milliseconds until the client may retry.
object
A valid knowledgebase document revision ID
Example
{ "code": "bad_request", "status": "error"}