Skip to content

Update a knowledge base item

PATCH
/api/v1/knowledge_base_items/{id}

Approving and unapproving are ordinary field updates — PATCH the aasm_state. Values outside the user-selectable set are ignored.

NameType
id
required
string

The record’s prefixed ID

Media typeapplication/json
object
knowledge_base_item
required
object
question
string
answer
string
aasm_state
string
Allowed values: new needs_input approved

Approve/unapprove; ignored unless user-selectable

applicable
boolean
rationale
string
category_id
integer

Numeric ID of a category (see category.id on the item)

auto_answer
boolean
answer_detail_level
string
default: normal
Allowed values: low normal high

The integer index (0, 1, 2) is also accepted

200

The updated item

Response body
Media typeapplication/json
object
id
string
web_link
string format: uri

The item’s page in the web app

question
string
answer
string | null
state
string
Allowed values: new ready_to_answer applicability_checked references_fetched needs_input auto_answered approved

Lifecycle state. approved items are used to answer questionnaires.

applicable
boolean | null

Whether the question applies to your organisation

rationale
string | null
auto_answer
boolean

Whether the AI may answer or re-answer this item

answer_detail_level
string
Allowed values: low normal high
confidence
string | null

0–1, encoded as a decimal string

confidence_as_words
string
Allowed values: Excellent Very good Good Ok Low
language
string
framework
string | null
Allowed values: nist-csf-2.0 hecvat-3.06 hecvat-4.1 rh-1.0 cjis-5 cjis-6
requires_attention
boolean

The confidence rating flagged points a human should review

category
object
id
integer

Numeric category ID, as accepted by category_id

name
string
area
string | null
created_at
string format: date-time
updated_at
string format: date-time

403

Insufficient scope, role, or credits

Response body
Media typeapplication/json
object
error
object
code
string

A stable machine-readable code

message
string
details
Array<string>

Present on validation errors; one entry per failed validation

404

No such record in this account

Response body
Media typeapplication/json
object
error
object
code
string

A stable machine-readable code

message
string
details
Array<string>

Present on validation errors; one entry per failed validation

422

The record could not be saved

Response body
Media typeapplication/json
object
error
object
code
string

A stable machine-readable code

message
string
details
Array<string>

Present on validation errors; one entry per failed validation